# New SCADA ui nodes

**URL:** <https://discourse.nodered.org/t/new-scada-ui-nodes/101844>\
**Category:** Share Your Nodes\
**Created:** [1 October 2026 03:02 UTC](https://discourse.nodered.org/t/new-scada-ui-nodes/101844 "2026-10-01T03:02:22Z")\
**Posts on this page:** 1\
**Showing post:** 26

<div class="post-metadata">

**Author:** ![dynamicdave](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dynamicdave/32/96_2.png) [@dynamicdave](https://discourse.nodered.org/u/dynamicdave)\
**Post date:** [4 October 2026 07:38 UTC](https://discourse.nodered.org/t/new-scada-ui-nodes/101844/26 "2026-10-04T07:38:05Z")

</div>

**Please note:** This is only my second go at using 3DM, so not that clever or artistic at this stage.

Here's a screenshot of my NR flow...

 ![sunday_3dm_flow](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/e/7/e77a8f266b2311f31e4a1a9fa0a62b30fed2d3d1.jpeg)  
As you can see I have two sources of MQTT readings - one from my home sensors and the other from my experimental ESP32-NOW network. The two function nodes just rearrange the msg.payload and prepend it with the nodeID and node\_id. When I was constructing the ESP32-NOW network I inadvertently used a different name/value pair - hence the inconsistency.

The two function nodes basically do the same thing. The only different is the lower one sends the msg.payload **twice** - once to a specific node (e.g. NOW-20-B) and the other to a node that is sensitive to **all readings** (i.e. node-all) to act as a summary node.

Here's the JSON for the NR flow...

```auto
[{"id":"5de403a93aa19911","type":"group","z":"d4783c1c9529da57","name":"","style":{"fill":"#e3f3d3","label":true},"nodes":["1340df7ed3355365","bbeec3f84b593018","ecfecbc1c01836b9","6031cec64be4e441","e7a0646f388619a7","786fb697e580f955","36b1dd41c2819786"],"x":74,"y":79,"w":752,"h":362},{"id":"1340df7ed3355365","type":"smithtek-3dm-scada-canvas","z":"d4783c1c9529da57","g":"5de403a93aa19911","name":"","x":680,"y":260,"wires":[[]]},{"id":"bbeec3f84b593018","type":"mqtt in","z":"d4783c1c9529da57","g":"5de403a93aa19911","name":"","topic":"homie/ird/+/readings","qos":"2","datatype":"auto-detect","broker":"b56b6cd03320eb2a","nl":false,"rap":true,"rh":0,"inputs":0,"x":190,"y":180,"wires":[["6031cec64be4e441"]]},{"id":"ecfecbc1c01836b9","type":"debug","z":"d4783c1c9529da57","g":"5de403a93aa19911","name":"Adjusted msg.payload","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":680,"y":180,"wires":[]},{"id":"6031cec64be4e441","type":"function","z":"d4783c1c9529da57","g":"5de403a93aa19911","name":"Prepend msg.payload with nodeID","func":"const p = msg.payload;\n\nif (\n typeof p.temperature !== \"number\" ||\n typeof p.humidity !== \"number\" ||\n typeof p.pressure !== \"number\"\n) {\n return null;\n}\n\nconst nodeID = p.nodeID || \"node44\";\n\nconst now = new Date();\nconst timestamp =\n String(now.getHours()).padStart(2, \"0\") + \":\" +\n String(now.getMinutes()).padStart(2, \"0\");\n\nmsg.payload = {\n [nodeID]: {\n timestamp: timestamp,\n location: p.location || \"\",\n temperature: p.temperature,\n humidity: p.humidity,\n pressure: p.pressure\n }\n};\n\nreturn msg;","outputs":1,"timeout":0,"noerr":0,"initialize":"","finalize":"","libs":[],"x":300,"y":260,"wires":[["1340df7ed3355365"]]},{"id":"e7a0646f388619a7","type":"comment","z":"d4783c1c9529da57","g":"5de403a93aa19911","name":"Second go at using 3DM - 03/Oct/2026","info":"","x":250,"y":120,"wires":[]},{"id":"786fb697e580f955","type":"mqtt in","z":"d4783c1c9529da57","g":"5de403a93aa19911","name":"","topic":"espnow/+/sensors/#","qos":"2","datatype":"auto-detect","broker":"b9de3426f819c4a9","nl":false,"rap":true,"rh":0,"inputs":0,"x":190,"y":320,"wires":[["36b1dd41c2819786"]]},{"id":"36b1dd41c2819786","type":"function","z":"d4783c1c9529da57","g":"5de403a93aa19911","name":"Prepend msg.payload with node_id - send twice","func":"const p = msg.payload;\n\n// Check that the expected BME280 object exists\nif (\n !p ||\n !p.bme280 ||\n typeof p.bme280.temp_c !== \"number\" ||\n typeof p.bme280.humidity !== \"number\" ||\n typeof p.bme280.pressure !== \"number\"\n) {\n return null;\n}\n\n// Node ID\nconst nodeID = p.node_id || \"unknown\";\n\n// Current time HH:MM\nconst now = new Date();\nconst timestamp =\n String(now.getHours()).padStart(2, \"0\") + \":\" +\n String(now.getMinutes()).padStart(2, \"0\");\n\n// Reading\nconst reading = {\n timestamp: timestamp,\n location: p.location || \"\",\n temperature: p.bme280.temp_c,\n humidity: p.bme280.humidity,\n pressure: p.bme280.pressure\n};\n\n// Send to the specific node\nnode.send({\n payload: {\n [nodeID]: reading\n }\n});\n\n// Send to node-all, including the originating node ID\nnode.send({\n payload: {\n \"node-all\": {\n nodeID: nodeID,\n timestamp: timestamp,\n location: p.location || \"\",\n temperature: p.bme280.temp_c,\n humidity: p.bme280.humidity,\n pressure: p.bme280.pressure\n }\n }\n});\n\nreturn null;","outputs":1,"timeout":0,"noerr":0,"initialize":"","finalize":"","libs":[],"x":340,"y":400,"wires":[["1340df7ed3355365"]]},{"id":"b56b6cd03320eb2a","type":"mqtt-broker","name":"Home_152","broker":"192.168.1.152","port":"1883","clientid":"","autoConnect":true,"usetls":false,"protocolVersion":"4","keepalive":"60","cleansession":true,"autoUnsubscribe":true,"birthTopic":"","birthQos":"0","birthRetain":"false","birthPayload":"","birthMsg":{},"closeTopic":"","closeQos":"0","closeRetain":"false","closePayload":"","closeMsg":{},"willTopic":"","willQos":"0","willRetain":"false","willPayload":"","willMsg":{},"userProps":"","sessionExpiry":""},{"id":"b9de3426f819c4a9","type":"mqtt-broker","name":"","broker":"192.168.1.156","port":"1883","clientid":"","autoConnect":true,"usetls":false,"protocolVersion":"4","keepalive":"60","cleansession":true,"autoUnsubscribe":true,"birthTopic":"","birthQos":"0","birthPayload":"","birthMsg":{},"closeTopic":"","closeQos":"0","closePayload":"","closeMsg":{},"willTopic":"","willQos":"0","willPayload":"","willMsg":{},"userProps":"","sessionExpiry":""},{"id":"54e924de144c7984","type":"global-config","env":[],"modules":{"smithtek-3dm-scada-canvas":"2.3.1"}}]

```

I have two 3DM dashboards that match to the two MQTT feeds. There is an Action button on each dashboard to switch between the two.

Here's the JSON for the two dashboards...  
[scada-ESP32-layout.json](https://discourse.nodered.org/uploads/short-url/1rIjk79sEi71yYjDCHTg8oxWuJ7.json) (242.6 KB)  
[scada-house-layout.json](https://discourse.nodered.org/uploads/short-url/3br8XeP3HgT2pULWPJn1pTj24H1.json) (169.8 KB)

Here's the screenshots of the button to switch between dashboard layouts.

 ![sunday_sw_A](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/9/1/91cba8a724bdc61c3bc10b5438e53e0565e2d300.jpeg)  
 ![sunday_sw_B](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/f/4/f4e23421933482adb02d18c108233f09f4c029ac.jpeg)

Obviously, you will need to tweak my offering to suit your situation - but it should act as a good starting point. Good luck go with you.

---

_[View the full topic](https://discourse.nodered.org/t/new-scada-ui-nodes/101844)._
