Skip to the content.

Control the LED Alert Colors from the Cloud

Lab Objectives

In this lab you will modify / control your Device program to receive MQTT commands from your Node-RED instance and build a Node-RED flow to dynamically change the LED color of the device depending on Alert thresholds. You will learn:

Introduction

Remote management and control of IoT Devices is critical to managing the flow of sensor data to the Cloud. Hard coded values in the IoT Device should be replaced by dynamically controlled logic in the Cloud.

This section will build a Node-RED flow where you can change the LED color and temperature thresholds. A MQTT command will be published from Node-RED to the device. The device will receive the display update and set the LED color.

Step 1 - Import the Node-RED Dashboard Reporting Interval Form Flow

Node-RED Set LED Threshold Flow : Get the Code{target=_blank}

Node-RED Set LED flow screenshot

Step 2 - Node-RED Set LED Flow

Step 3 - Temperature Threshold

Node-RED Set LED switch node

Step 4 - Send MQTT Commands with MQTT Out Node

Step 5 - Inspect ESP8266 Program which Handles Display Device Commands


Click to return to the Part 3 homepage.