Introduction to Node-RED

Introduction to Node-RED

Logo of Node-RED

Node-RED is a versatile tool designed for visual programming, making it easy to connect hardware devices, APIs, and online services. It offers a browser-based editor where users can create workflows by simply dragging and dropping components and linking them together. This approach is particularly useful in Internet of Things (IoT) and automation projects, where different elements need to work together smoothly. Pforzheim University employes a Node-RED Server under https://iot.hs-pforzheim.de/nodered/ accessible via VPN or within the Wi-Fi of the University. As an alternative low-code platform, the university also runs n8n at https://iot.hs-pforzheim.de/n8n/, which is covered in the next section.

What Does Node-RED Do?

In essence, Node-RED allows you to build workflows that integrate various IoT devices, online services, and APIs, creating a seamless system for managing these components. The tool makes it possible to process and transform data in real time, which is especially valuable for filtering or modifying information before it reaches its final destination. Actions can be triggered automatically based on the data received, such as sending notifications, adjusting settings, or controlling other devices. Node-RED supports various communication protocols, including MQTT, HTTP, and WebSockets, giving it great flexibility for different use cases.

Key Features of Node-RED

The interface is designed to be intuitive, letting you create complex logic flows by connecting visual components. You can choose from a large selection of pre-built nodes, which cover common tasks such as handling MQTT messages, communicating with databases, or sending HTTP requests. This simplifies the process of creating sophisticated automation workflows. Node-RED also allows for real-time data processing, which is critical for IoT applications. You can modify incoming data, send it to dashboards or databases, and keep track of the data flow visually, helping to spot and troubleshoot any issues that arise.

How Node-RED is Used in Our Setup

Overview of the Node-RED GUI

In our current IoT setup, Node-RED plays a key role. It receives data from MQTT topics, processes or filters the information, and then forwards the cleaned-up data to our InfluxDB storage. For instance, we can use Node-RED to improve the precision of sensor readings, eliminate noisy data, or even trigger alerts if certain thresholds are crossed. This combination of MQTT for data transport and Node-RED for processing ensures that our data flows smoothly and efficiently into long-term storage for further analysis.