Home Automation Hub using Node-Red

The Internet of Things (IoT) comes alive with the help of Node-Red, a Flow-Based Programming (FBP) tool designed to help link together sensors, switches, logic and displays. With hardware magic from Arduino’s, Raspberry Pi’s, low cost sensors and wireless switches. We can easily build a bespoke home automation and monitoring hub.

Having got into some electronics with my son over the last couple of years, I’ve found a new enthusiasm for doing some home automation and monitoring. In the process joining a much overhyped band of people creating the so-called “Internet of Things” (IoT)

Between Arduino’s and Raspbery Pi’s, some simple low cost sensors and a fair bit of patience, it is amazing what can be achieved.

One of the big tasks though is trying to link everything together. Generally, this involves either using a big pre-build tool such as the popular Domoticz or programming your own monitoring and control hub from the bottom up. Personally, I find the former approach too restrictive with the packages rarely doing what I need so that I am always fighting with them. But I find the latter approach too time consuming to ever get very far.

Thankfully, some great folks at IBM have come to the rescue by creating a tool called “Node-Red“. This uses an approach called “Flow-Based Programming” (FBP). Indeed, FBP was invented at IBM in the 1970’s so it seems only logical that the IBM Emerging Technology team should carry on the good work.

Node-Red ScreenshotFlow-based programming uses diagrams to connect together small functions, in this case referred to as “nodes”. Rather like putting together a flowchart. Node-Red is aimed at people creating connections between IoT things such as sensors and switches so it is ideal for what I wanted. Even better is that it is based on my chosen programming and automation tool, Node.JS which runs everywhere, is lightweight, fast, flexible and powerful. Node.JS uses Javascript as its programming language and so I only need to learn 1 language to programme for both the server (the back-end) and the client (browser, the front-end or user interface).

Why not give Node-Red a try? It is getting more and more attention with lots of new node types being contributed by the community. There is a site for reviewing new nodes and examples at flows.nodered.org. There is a Slack site and a lively Google news group. There is also some good documentation at the docs site.

You may also find Node-Red useful for a lot more than just IoT as it makes it easy to work through computing tasks, reducing coding to a minimum.