Node-RED
Node-RED is a visual programming, low-code development tool that allows you to exchange data between hardware devices, microcontroller circuits, components, APIs and online services to create an Internet of Things (IoT) solution with minimal programming. Node-RED provides a web browser-based flow editor, which can be used to create functions that coordinate this communication.
To use Node-RED you do need a computer and the circuits sending or receiving data need to be connected to the computer with an USB cable. This is an alternative approach to using wireless communication to send data to an MQTT broker over WiFi. The advantage of this approach is that you can configure Node-RED for the required functionality with very little code whereas if you want to use the ESP32 WiFi and MQTT capability you need to download libraries and write the required code.
For the solution variant that uses Node-RED, the ESP32 circuit is not required and neither is any inter-baord communication. The Nano and Pico circuits will be connected to a Raspberry Pi and will exchange data directly with Node-RED.
We will be using a Raspberry Pi to run Node-Red.
In addition to its core value that it allows you to build solutions with minimum programming, Node-RED offers other possibilities that can add value to your solution. We will specifically demonstrate the following:
-
Simplified no-code (configuration only) connections to MQTT Brokers on the cloud for both publishing data from sensors for display on the app and subscribing to control signals from the app and sending them to the circuits.
-
Values received from one circuit will be processed by the Node-RED flow and if they meet any programmed condition a control signal will be sent to the other circuit without requiring any human intervention and creating an autonomous self-decisioning system.
-
Values from multiple circuits and sensors will be read and a contextual decision will be taken consdiering all the data before sending an update to the mobile app.
-
A formatted display text will be sent back to the sending circuit once its data is processed to add the required text (such as parameter units) to make the displayed text more user friendly.
The flows for each of the circuits are described in the following sections.