From the beginning of programming, one of the industry’s main challenges has been to facilitate the applications development to simplify the integration between the hardware devices, the software and us, the humans. Thanks to Node-RED we are much closer of this goal. Programming, without programming.
What is Node-RED and what is it for?
Node-RED is an open-source development tool based on visual programming that was created by IBM to connect hardware devices, APIs and online services.
Node-RED is a solid tool, easy to learn, and it does not require any programming knowledge. It has been consolidated as one of the main applications for real-time data management and transformation for IoT and Industry 4.0 solutions.
Node-RED allows to graphically connect predefined blocks, called nodes, to develop a concrete task. The nodes connection, usually a combination of input nodes, processing nodes and output nodes, when wired together, make up a flow.
Among all the available nodes we can find standard protocols as MQTT, REST, Modbus, OPC-UA, Bacnet, Websocket; and third party API integrations as Microsoft Azure, Amazon Web Services, Twitter, Facebook and many more.
Where can I install Node-RED?
Node-RED is built on Node.js, taking full advantage of its power and assuring scalability, liability and low hardware requirements. These features allow to run Node-RED in personal computers, cloud servers and low-cost embedded hardware.
If you want to take your first steps in Node-RED you just need to click here to access to all the documentation. Follow step by step how to install the tool on your computer, your cloud services regular provider or your embedded device eManager.
The nature of the tool, being open source, and the facility to develop new nodes, come together into a nodes library which grows each day with new community contributions.
Nowadays we can find more than 2500 available nodes in the Node-RED official library, including Smart Home integrations, converters between IoT protocols, geolocation functions, OAuth2 authentication and many more.
Hello world in Node-RED
To conclude this article there is no better way than taking your first steps on Node-RED generating the classic Hello world. Below, we show step by step the process to achieve it:
Message creation with Inject node
- If you are running Node-RED on your computer, you can access http://127.0.0.1:1880 or whatever address or hostname you’re using
- If it is our first time in Node-RED, we will see a flow named Flow 1
- On the node palette on the left side of the Node-RED, we will select the Inject node and will drag it onto our flow
- In order to edit the node we will double click on it. After that, we will select string on the Payload field and we will write Hello world!
- Once we finish the previous steps, we click Done
Printing our message
- In order to add a destination for our message we will select the Debug node. We will click and drag it onto our flow. It’s very important to place it on the right-hand side of the Inject node
- To connect both nodes we just need to click the Inject node's output and drag it to the Debug node's input. A wire that links both nodes will be created
- Debug node will automatically print the message to the console window as we will see in the next step
- In order to start our application you must click on Deploy button
- Now click the Debug tab in the right-hand side of the editor window
- Finally, to launch our message you will click on the blue button coming out from the left-hand side of the Inject node
- “Hello world” will appear on the Debug screen. Welcome to Node-RED!
As PickData, we firmly believe in solutions like Node-RED, because those allow you to focus on what really matters, bring our added value to the solutions and skip losing time between ins and outs of the usual programming.
If you are interested in learning more about topics related to Internet of Things, Big Data, Industry 4.0 and Analytics, do not hesitate to continue reading our publications in the News section.
Documentation and other information