ModPackQTModPackQT
Node-RED ExamplesResourcesSign up
HomeResourcesNode-RED ExamplesLive Modbus Dashboard with Gauges
IntegrationNode-RED Modbus Example

Live Modbus Dashboard with Gauges

Display live Modbus values in a Node-RED Dashboard with gauge and chart widgets. This example polls 4 registers and displays them as real-time gauges — useful for a quick monitoring view on a tablet or monitor.

What you need

  • Node-RED v3+
  • node-red-contrib-modbus installed
  • @flowfuse/node-red-dashboard installed (npm install @flowfuse/node-red-dashboard)
  • Modbus device with process values

Flow Overview


Modbus poll ──▶ Function (split 4 values)
                    │
          ┌─────────┼──────────┬──────────┐
          ▼         ▼          ▼          ▼
      Gauge        Gauge      Gauge      Gauge
    Temperature  Voltage    Current    Power
       °C          V           A          W
         └─────────┴──────────┴──────────┘
                  Dashboard /ui

Node-RED Flow JSON

Node-RED Flow JSON
[
  {"id":"inj14","type":"inject","name":"Poll 2s","repeat":"2","once":true,"wires":[["req14"]],"x":120,"y":1400},
  {"id":"req14","type":"modbus-flex-getter","name":"Read 4 regs","dataType":"HoldingRegister","adr":0,"quantity":4,"server":"srv1","wires":[["fn14"],[]],"x":310,"y":1400},
  {"id":"fn14","type":"function","name":"Split to 4 msgs","func":"const d = msg.payload.data;
const msgs = [
  { payload: d[0]/10, topic:'temp' },
  { payload: d[1]/100, topic:'voltage' },
  { payload: d[2]/1000, topic:'current' },
  { payload: d[3], topic:'power' }
];
return [msgs[0], msgs[1], msgs[2], msgs[3]];","outputs":4,"wires":[["g14a"],["g14b"],["g14c"],["g14d"]],"x":520,"y":1400},
  {"id":"g14a","type":"ui-gauge","name":"Temperature","group":"grp14","label":"Temperature","suffix":"°C","min":0,"max":100,"wires":[],"x":730,"y":1360},
  {"id":"g14b","type":"ui-gauge","name":"Voltage","group":"grp14","label":"Voltage","suffix":"V","min":0,"max":300,"wires":[],"x":730,"y":1390},
  {"id":"g14c","type":"ui-gauge","name":"Current","group":"grp14","label":"Current","suffix":"A","min":0,"max":50,"wires":[],"x":730,"y":1420},
  {"id":"g14d","type":"ui-gauge","name":"Power","group":"grp14","label":"Power","suffix":"W","min":0,"max":15000,"wires":[],"x":730,"y":1450},
  {"id":"grp14","type":"ui-group","name":"Modbus Live","page":"pg14"},
  {"id":"pg14","type":"ui-page","name":"Modbus Monitor","ui":"ui14"},
  {"id":"ui14","type":"ui-base","path":"/dashboard"},
  {"id":"srv1","type":"modbus-client","name":"My Slave","clienttype":"tcp","tcpHost":"192.168.1.100","tcpPort":502,"unit_id":1}
]

To import: open Node-RED → Hamburger menu → Import → paste this JSON → Deploy.

Expected Output

// Browser at http://localhost:1880/dashboard shows 4 live gauges
// updating every 2 seconds with Modbus values

Common Gotchas

  • The function node must have 4 outputs configured (double-click and set Output count to 4).
  • Use @flowfuse/node-red-dashboard (v4+) not the older node-red-dashboard package — APIs differ.
  • Set appropriate min/max on each gauge or values outside the range will clip visually.
  • If you want a historical chart, add a ui-chart node in parallel with the gauge.
  • For RTU connections over serial port, replace the modbus-client tcpHost with the serial port path and change clienttype to 'serial'.

Same in ModPackQT — in 30 seconds

ModPackQT has a built-in GraphPanel that plots any register value live with configurable time ranges and refresh rates — no dashboard node setup required. Click the graph icon in any register row.

Was this example helpful?

More Integration examples

All Node-RED Modbus Examples (30)

ModPackQT · Node-RED Modbus Examples · Updated 2026