Skip to Content
This is the Beta version of our new Learning Paths approach. Please email feedback.

Node-RED Low-Code Programming

Node-RED is a flow-based low-code programming platform for event-driven applications (such as IoT solutions that trigger actions based on sensor data or events). Node-RED 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. Some common tasks like connecting to MQTT brokers can be achieved without needing to write any code.

Node-RED provides a web browser-based flow editor, which can be used to create functions that coordinate this communication.

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.

Nodes and Flow-based Programming

Flow-based programming is a way of defining the functionality of an application as a series of tasks (or nodes as they are called in Node-RED). Each node has a similar process - it receives some data, performs some operations on the data and passes it to the next node.

This style of programming lends itself very well to a visual representation and GUI-based programming.

Here is an example of how Node-RED can be used:

Data received from IoT devices can have a high volume and velocity where you can receive many data values (if you have multiple sensors) and very rapidly (each sending a reading every second, for example). We may want to store every data value for subsequent analysis, but we wouldn’t want to read every single data value in real-time rather than that we want to be notified if a value meets certain criteria (for example, the temperature goes above or below a certain value, if motion is detected, if gas or smoke is detected, a door is opened, etc.).

Node-RED is the perfect solution for such a requirement. It can receive every data value and write every data value to the database, but it can program a function that will only send notifications if the conditions programmed in the function are satisfied.