Industrial ConnectivityNov 1, 2026
Node-RED for Industry: Read PLCs and Publish to MQTT
What Node-RED is, how plants use it to read PLCs over Modbus or OPC UA and publish to MQTT, and the practices that keep a test flow from ending up in production with no backup.

Node-RED is an open-source tool for building data flows by wiring blocks together in a web editor. In a plant it is used mainly for three things: reading a PLC or a meter over Modbus or OPC UA, transforming the value (scaling, filtering, calculating) and publishing it to MQTT, a database or a dashboard. It is quick to start with, and for that very reason it is easy to end up with a critical flow that nobody backs up. This guide explains how to use it well.
What is Node-RED? #
Node-RED was born at IBM and today is a project of the OpenJS Foundation. It runs on Node.js and is programmed in the browser: each node does one thing (read, change, decide, send) and messages pass from one to the next along wires. Nodes for industrial protocols come from the community and are installed from the editor's palette. The official documentation is at nodered.org.
What is Node-RED used for in industry? #
| Use | Example | Typical nodes |
|---|---|---|
| Read equipment | Registers from a PLC or an energy meter every 5 seconds | Modbus TCP/RTU, OPC UA, S7 |
| Transform | Convert an integer to °C, discard impossible readings, calculate a per-minute average | function, change, switch, smooth |
| Publish | Send to an MQTT broker with a topic organized by plant, line and equipment | mqtt out |
| Store | Write to a time-series database or to SQL | database nodes |
| Display | A simple dashboard or an Andon screen | dashboard |
| Alert | A message when a temperature stays above a threshold for more than 10 minutes | trigger, email, messaging |
How do you read a PLC over Modbus and publish to MQTT? #
The minimum flow has four nodes. The order matters more than the tool:
- Read. A Modbus node reads, for example, holding registers 100 to 109 from the device every 5 seconds. Set the IP address, the slave ID and the register type. If you do not have the device's register map, get it first: reading blind gives numbers that look reasonable and are wrong.
- Interpret. A function node turns the registers into values with units: two 16-bit registers form a 32-bit float, an integer divided by 10 is the temperature. Note in the node itself where each factor came from.
- Filter. A switch node discards the impossible (a cold room at 300 °C) and a smoothing node or per-minute average keeps you from sending noise.
- Publish. An MQTT out node sends a message with value, unit and timestamp to a topic such as
plant/line-1/tunnel/temperature. If the network is unstable, publish with QoS 1 and let the broker hold what is pending.
If you are going to organize many topics, a common schema such as Sparkplug B helps. How it differs from OPC UA is covered in MQTT Sparkplug B vs OPC UA, and the step from Modbus to MQTT in the guide to the IIoT gateway.
Which practices prevent problems in production? #
- Read-only for monitoring. A flow that writes to the PLC can move a machine. To measure, reading is enough; writing is a decision for whoever is responsible for control.
- Reasonable polling rate. Reading every 100 ms a value that changes once a minute loads the PLC and the network for no gain. Match the interval to what you are measuring.
- Error handling. Use a catch node and an alert when a device stops responding. A flow that fails silently is worse than having no flow.
- Version the flows. Turn on projects mode with git or export the flows' JSON to a repository. A change with no history cannot be rolled back.
- Password-protected access. Configure
adminAuthin the settings file and do not expose the editor port (1880 by default) outside the plant network. - Local buffer. If the destination is in the cloud, store in the plant whatever could not be sent and resend it when the network comes back.
Where does Node-RED run in a plant? #
On an industrial computer inside the plant network, close to the equipment it reads. Not on someone's laptop or on a server that depends on the internet: if the link drops, reading has to continue and be stored. Separate the control network from the office network; the zone-based architecture is covered in the Purdue model in practice.
At iGromi, that industrial computer is the edge: it reads PLCs, sensors and cameras in read-only mode, keeps measuring without internet and can run Node-RED as an isolated module for each plant's own logic. How to build a dashboard there is in the wiki: building dashboards with Node-RED. What the full edge does is covered in industrial edge computing.
When is Node-RED no longer enough? #
When there are hundreds of signals across several plants, when several people edit the same flows or when the data has to reach the ERP with a trail of who changed it. At that point the logic is better moved to a layer with a data model, permissions and history, leaving Node-RED to what it does well: moving and transforming at the edge. If what you need is to log data over time, also look at what an industrial data logger is.
Frequently asked questions #
What is Node-RED?
An open-source tool for programming flows by wiring nodes together in a web editor. It runs on Node.js and is a project of the OpenJS Foundation.
Is Node-RED fit for production or only for testing?
It is fit for production if you treat it as software: versioned flows, password-protected access, error handling and a dedicated machine in the plant.
Can Node-RED write to the PLC?
Technically yes, but for monitoring it is better to read in read-only mode. Writing to a PLC from a flow with no change control can move a machine.
Where is Node-RED installed in a plant?
On an industrial computer inside the plant network, close to the equipment it reads, so it keeps working without internet.
Does Node-RED replace a SCADA?
No. Node-RED moves and transforms data; a SCADA supervises and controls the process. The differences between HMI, SCADA and PLC have their own guide.
Topics
- node-red industrial
- node-red plc
- node-red modbus
- node-red mqtt
- node-red opc ua
- node-red production
- node-red edge

About the author
Víctor RuzCEO
Automation and Robotics Engineer (Universidad Andrés Bello, 2012). More than twelve years in robotics and industrial automation. Founder and CEO of iGromi, where he connects machines, systems and plant people with secure industrial AI.

