Node-Red I'm a fan

(8{)} ( .)

Lifetime Supporting Member
Join Date
Apr 2004
Location
Israel
Posts
625
Well actually I'm a person and not a fan but either way.


I'm an old in-my-60's PLC guy and I recently had a project which spec'ed for a Weidmueller Web PLC. The Web PLC on it's own was not capable of handling the the process (solar panels with sun-tracking) so I did the entire project using the built-in Node-Red. I was told that it wouldn't work but it works amazingly well and the customer now has a web-interface to the PLC and is overjoyed that he can startup his system from his cell-phone.


So yes, I am a fan. The learning curve for a scan-inputs-do-logic-scan-outputs guy to the event driven Node-Red required me to change my way of thinking but Node-Red is really something.


So here's my question: I'm seeing Node-Red appear more and more in industry; Opto-22, Sick, Wago, Weidmueller, and others. What do you think the future is for Node-Red in industry? Is it a novelty or will this be something that everyone will have to know?


Cheers!


Yosi
(8{)} :) .)
 
I've never used Node Red professionally, but I do make regular use of it at home. Generally I use it as an intermediate step in a few data flows to help format and modify incoming data.

My home network is riddled with different protocols and one-off projects, and Node Red is an excellent tool to help link it all together.

Node Red - Home Assistant add-on
OPCUA connectivity to Ignition Maker Edition (RPI)
S7 connectivity to an S7-1200 PLC in the garage


attachment.php


Speed Cam
MQTT intermediary:
RPi-based app to calculate the speed of cars passing by the house. Node Red receives data from the pi over MQTT, does a few calculations and inserts into InfluxDb. An upstream (Grafana) dashboard is used to visualize.

attachment.php



Stereo Amplifier
IP-based control of a stereo amplifier. The manufacturer publishes the interface specs. A Node Red web dashboard takes user input for volume control / source selection / etc and takes care of building and transmitting control packets to the amp. Allows easy control from a phone or any browser.


attachment.php


PiVPN (Wireguard)
Node Red is used to scrape pivpn logs & status, then formats and inserts into influxdb.

PiVPN (OpenVPN)
Node Red is used to scrape openvpn logs & status, then formats and inserts into influxdb.

Finally, here's an example where Node Red fit in nicely to link a few existing (but separate) mini-projects together - couple of temperature sensors, a heater contacter, etc. Node Red takes care of massaging some of the data from an RPi Pico.

attachment.php



And here's the final dashboard with all data integrated together:


attachment.php


Screenshot 2023-11-30 at 9.23.07 AM 2 (Small) (1).png Screenshot 2023-11-30 at 9.27.32 AM 2 (Small).png Screenshot 2023-11-30 at 9.28.49 AM 2 (Small).png Screenshot 2023-11-30 at 9.13.23 AM 2 (Medium).png Screenshot 2023-11-30 at 9.16.25 AM 2 (Medium).png
 
I think anyone that has a deep affinity for the ‘embedded’ world would probably flinch a bit about running a system on javascript. And it can be shaky when pulling in lots of nodes from npmjs. I like repeatability and I think this comic applies https://xkcd.com/2347/

Lately I’ve been trying to wrap up as much as I can in change nodes that leverage the JSONata script rather than hiding everything in a monolithic function node. It makes the flows longer but I have the ability to read them again/faster when I re-visit them months later.

Javascript itself is a bit blah. The only true hang-up I have with it is its preference to do everything as pass-by-reference. So you can invent flows that look logical but in-fact fail due to data loss/overwriting. Not dissimilar to creating a time loop/paradox.
 
The Pi4 in the screenshot above runs one instance of Node Red with several flows that talk to some RPi Picos scattered around the house.

Another separate instance of Node Red runs as an add-on in a Home Assistant VM. It is this instance that runs node-red-contrib-opcua and node-red-contrib-s7. The Node Red add-on has full integration with Home Assistant and this makes it really easy to map OPC tags to Home Assistant entities. Together, this makes it easy to extract data from Ignition's historical database or directly from the PLC.

In the 'garage heating' screenshots above, I started with an S7-1200 out in the (detached) garage 12-13 years ago. Originally it ran a simple KTP600 HMI, but later I added an Ignition Maker Perspective HMI for easy web access (Ignition is also running on another Pi).

Like many of us here, my home network serves as a test ground to stay current, but mostly just for fun.

I shudder to think what a client might say if I submitted a system architecture that uses 9 physical devices, 4 locations, and 5 data protocols to capture 2 temperature sensors and one contactor status!

-Trevor


Edit: The Node Red flow for the amplifier controller above is available on Docker Hub - really easy to spin up, but only works with Hegel amplifiers.
 
Last edited:
Haha, lots of PicoW's available these days, and tough to beat for $8 each.

Just took a quick count and here's what I'm using the Pico's for right now:

- 2 Pico's running OneWire temp sensors

- 1 Pico used as a handheld pH probe; pushes readings to a db over MQTT

- 1 Pico jammed into a standalone dehumidifier, connected to the 'bucket full' float switch. Only needs emptying every few weeks in the summer, and now I get a notification from the Pico when the bucket is full.

- 1 Pico that accepts 4 bbq probe inputs (thermistors) and allows me to watch meat temps in an electric smoker.
 

Similar Topics

Looking to tery and send some tags from wincc to node red dont have a wincc connectivity license so can use opc. Any suggestions ?
Replies
0
Views
74
Hello All, getting my feet wet currently with Node-red, curious if anyone has experience with the SMB share add-in(or whatever the terminology...
Replies
2
Views
297
Hey guys, last week I posted part 1 of a series of OPC UA articles in Node-RED. That article covered some important concepts of OPC UA and how...
Replies
8
Views
3,926
I have a spare 1734-AENT adapter laying around and was wondering if it would be possible to make a connection without a processor, specifically...
Replies
3
Views
1,713
Help will be Rewarded in the future I promise Good evening everyone I 'm working on a personal project, hope someone would be so kind and could...
Replies
5
Views
3,424
Back
Top Bottom