Node-RED

2 minutes of reading
Proconductor: js.foundation
Availability: At nodered.org
Category: software
Type: tool di proprogramming / integration
Implementation difficulties: media

Node-RED flow

Node-RED is a development / integration software initially developed by IBM and designed to connect quickly and intuitively - also by hand of subjects not prepared on programmation - devices, APIs and online services: not by chance Node-RED he is one of his favorite tools in the domotic environment and, more generally, and production .

Node-RED provides a visual editor browser based which allows you to easily create JavaScript functions without the need for specific expertise in this language. This environment allows, starting from a library of basic elements (called “Nodi"), To create gods true e propri "flows" within which the information in transit is conveyed, treated, manipulated.

The possibilities they are almost endless: in addition to the elementary library supplied with the software, the open-source community develops further elements, the most disparate, making Node-RED usable in a very wide field of applicabilità.

An example

Let's imagine we have it available a home automation sensor of temperature able to deliver telemetry MQTT. In the absence of a personale HUB as an example) Home Assistant, every datum churned out by the sensor it can simply be consumed at the moment, until the following data is received.

But what to do, in case I want to consume this data but at the same time also save it to a database and maybe send it via email to a specific address?

Means Node-RED accomplishing this will be extremely simple. What you will need to do will be to select the nodes of interest, or (in this specific case):

  • a to subscribe to the MQTT topic from which to draw the data;
  • one able to write to my database (which we assume to exist);
  • one able to send an email via SMTP.

At this point, in an intuitive and visual way I will have to first configure the first node (MQTT) for then connect it with the two other nodes (db and email), configure them in turn (one to write on the db, the other to send the email) and, done that, click on "Deploy".

At this point - automatically - the mechanism I created will come to life (net of any errors) e prowill see to the execution of what I have "drawn".

The knots input and output (as well as processing) data are innumerable, therefore the limit is fantasy. Node-RED it is a tool that is as simple as it is portentous, and the one reported here is only an elementary example to let us understand what the functional logic isnamento. More information are available on the website of Node-RED come on on the site that collects already configured flows and additional nodes for our personal instance of this magnificent software.


Nb. To this theme we have dedicated a bet of our Podcast.
Su inDomus is also available a guide for installation on Raspberry Pi with Raspbian operating system.

Node-RED can also be installed How add-on di Home Assistant in distribution HASSIO.

Node-RED: how to install and configure it on Raspberry Pi


Please comment below