When I recently started to work on Bluemix, I was honestly a little confused about what Node-RED is, how it relates to the Node.js Bluemix runtime and how it relates to the Internet of Things service. Since some of my readers might be in the same situation, let me quickly try to explain.
Node-RED is a visual tool for wiring the Internet of Things, but it can also be used for other types of applications to quickly assemble flows of services. The name is not the most intuitive name. The reason why ‘Node’ is in the name is because the tool is implemented as Node application but from a consumer point of view that’s really only an internal implementation detail. Node-RED is available as open source and has been implemented by the IBM Emerging Technology organization.
Node-RED is included in the Bluemix Internet of Things starter application, but you can also deploy it as Node.js application separately. To use Node-RED for Internet of Things scenarios you need to add the Internet of Things Foundation service to your Bluemix application. The IoT service allows to register and connect different types of devices. After this you can use the incoming and outgoing MQTT nodes in your flows. Take a look at the existing Bluemix Internet of Things samples. Most of them use Node-RED to define flows where either incoming sensor data from ‘things’ is handled, e.g. stored in databases, or where commands are sent to devices.
Node-RED can not only be used for Internet of Things applications, but it is a generic event-processing engine. For example you can use it to listen to events from http, websockets, tcp, Twitter and more and store this data in databases without having to program much if at all. You can also use it for example to implement simple REST APIs. Ryan Baxter provided just last week a Node-RED sample that isn’t an IoT app. You can find many other sample flows on the Node-RED website.
There are also several good demos and videos. One demo I especially like is this one from Rodric Yates:
For a better description what Node-RED is and some of the history check out the article How IBM’s Node-RED is hacking together the internet of things from Nick Heath.
If you want to try out Node-RED hosted in the cloud, you can get an account on the IBM Cloud and use the Node-RED boilerplate to get started quickly.