Node-RED Screen Shot

My Fave – Node-RED

My Favourite Software

Every once in a while, I come across software that blows my mind.  It's usually something well written, unique, or best in its class.  I like to present software that impresses me so that other people can use it too, especially if it's low-cost or free. So here is one piece of software that I love and recommend.
You can find the rest of the list here:

Node-RED

https://nodered.org/

Node-RED is the Swiss-Army knife of home automation and programming. 

Using a drag and drop interface in your browser, you add, delete and edit “Nodes” to build up your program.  Nodes are functional blocks of pre-built code that you can use in your “flows”.  Each Node has a specific job, such as receiving an HTTP request, receiving an MQTT message, detecting an open door, making decisions, changing parameters or injecting information.

Node-RED Screen Shot

The simple example above has one “flow” labelled “Flow 1”. Flows are the equivalent of a program, and Node-RED can contain multiple flows.

In the screen capture above, you see a node titled “[get]/hello.”  This node receives a web page request from a browser for the page “hello.” Once a request has been received, the request is passed to the “template” node, where presumably some HTML is generated. Once that HTML is ready, it’s passed to the “HTTP” node, which returns a webpage to the browser.

No matter how complex your flow is, the pattern is always the same

  • An event triggers a flow to execute. Either a new HTTP request or MQTT message, a timer expires etc.  In this case, a new HTTP request comes into [get]/hello.
  • Process the Event. Using the standard Nodes, or ones you installed or wrote,  you can process the event and make some decisions. In this case, we’re simply adding HTML to the request.
  • Act on the event.  Often events require a response. For example, requesting a webpage needs a webpage to be produced and sent back to the browser.

Node-RED is expandable through its community of plug-in developers.

Reliability

Node-RED is actively developed on GitHub and runs on Node.js.  I have been running Node-RED on my home server for several years without complaint. It never crashes, and since it’s running on Node.js, it’s quick and agile, even for smaller servers like a Raspberry Pi.

Cost

Node-RED is free.

Conclusion

Do yourself a favour – if you need any monitoring or automation, give Node-RED a look. With its plug-in base, you can receive events from hundreds of sources, including IFTTT.com, HTTP, MQTT, Timers, Email, Date and more.

With the included Nodes, you can whip up a response to those events and, if required, write your own custom Javascript (under Node.js) to handle events or process data.

And, when you’re all done with the event, you can choose to send email notifications, send out control messages over MQTT, HTTP or one of the hundreds of other destinations.

It really is the Swiss-Army knife of home automation, and I love it!

Leave a Comment