Node-RED

A favourite tool for processing IoT data

Node-RED is an Open Source development tool with a powerful graphical programming interface that makes it very simple to use.

In recent years, Node-RED has become a favourite tool for prototyping and developing data processing projects, especially in the maker environment because of its ease of learning and use, and thanks to the support of its huge user community, which has made more than 2,000 contributions. More information about this amazing project is on its website, nodered.org.

In many different IoT projects, Node-RED becomes especially useful to process and analyze data, or to create rules that automate behaviours in response to events produced by the readings of the IoT devices. It can also be used as an MQTT broker, since it has very valid contributions for it. However, its greatest potential is obtained in combination with an IoT platform like Thinger.io, each one in charge of its part:

Thinger.io

  • Data acquisition
  • Storage
  • Device management

Node-RED

  • Processing
  • Automation

With this approach, a few months ago we released a Thinger.io contribution to the Node-RED repository. It can be added to any project palette and includes nodes created ad hoc to simplify the integration of Node-RED flows with Thinger.io features: interacting with the IoT devices, data buckets or endpoints in a very simple way, just dragging and configuring nodes. This contribution was a great step to join two technologies that complement each other very well. However, there was still the problem of hosting the Node-RED server separately.

The plugin

Hosting Node-RED and Thinger.io Platform together

With that problem in mind we raised the bet: a plugin, usable on all Thinger.io private instances, that deploys a Node-RED instance and the Thinger.io Platform together in the same host, with just a couple of clicks.

The plugin lets our users exploit their IoT data with Node-RED in a simple and fast way, and offers Node-RED users a simple and economical way to host the service without limitations:

  • Deployed next to the platform, in the same host, with a couple of clicks
  • Running 24×7
  • No flow limits
  • A perfect alternative to using FRED or deploying the server in a cloud provider
The Plugins view of the Thinger.io console listing three plugins: Node-RED 1.0.1, Sigfox 1.1.1 and The Things Network 1.1.1
The Plugins view of a private instance in 2020, with Node-RED next to the Sigfox and The Things Network integrations.

The plugin is accessible on the Thinger.io Plugins Marketplace, where it sits on the plugin shelf with the other development tools. Its documentation (the integration, the Thinger.io nodes and example flows) is on its Marketplace page, and how plugins are installed and managed is in the documentation of the Plugins Marketplace.

Use cases

What users built while evaluating the integration

The combination of these technologies results in a system flexible enough to develop almost anything we can think of, including these use cases reported by our users during the evaluation of the new integration.

Geofencing

An interesting IoT use case, with many applications in asset management, fleets or package tracking: monitor the location of any device and create an alert when it leaves an area.

Data transformation

Recovering data in unwanted units or quantities is no longer a problem if we can convert a stream before storing the data.

MQTT integration

A Node-RED flow retrieves data from each topic and transforms it into data from a Thinger.io HTTP device, benefiting from all the platform's functionalities.
The Node-RED editor inside the Thinger.io console: a flow from a Device Location Update node through a geofence node to an Endpoint Call node, with the geofence editor open on a map of Spain and Portugal showing a rectangle, a circle and a triangle
A geofencing flow: the device location goes through a Geofence node, and an endpoint call raises the alert when the device leaves the area.

Creating this project with the Thinger.io Platform, it is possible to integrate any kind of IoT device, no matter if it uses 3/4G, Sigfox, TTN or even HTTP.

In 2020 it was not yet possible to integrate data from MQTT devices into the Thinger.io platform directly, and the Node-RED flow was the way to do it. MQTT is now one of the protocols on Device connectivity.

What's next

More nodes for the whole platform

In the coming months we will continue developing this integration, adding new nodes that allow easy interaction with 100% of the platform's functionalities, so stay tuned for the latest updates!

Node-RED also extends the alarms of the platform, for the reactions a threshold cannot express: see Alerts.

Run Node-RED next to your instance

Node-RED, Grafana and the other plugins install from the console of your instance.