What is Node-RED?

What is Node-RED?
Node-RED is an open-source programming tool, for connecting hardware devices, APIs and online services creatively and easily. Primarily, it is a visual tool designed for the Internet of Things, but can also be used for other applications to very quickly assemble flows of various services.
It is put together using blocks of JavaScript-based software code, called nodes. These prebuilt nodes reduce software development risk exposure and accelerate time to market. The nodes are visually dragged and dropped to make IIoT application development simpler, easier to repeat, and faster to scale.

Node-RED runs on Windows, Mac, and Linux computers, plus industrial gateways and I/O. Some Advantech offerings such as the EKI-1241NR come with Node-RED pre-installed, and coming soon they are due to release a series of IoT gateways which are Node-RED compatible. Additionally, some of the Moxa US-series of RISC based devices also have the flexibility to install Node-RED, which we will demonstrate in our white paper 'How to Install Node-RED onto a Moxa device'.

The ability to put this kind of logic onto the edge of the network allows for data to be processed, reformatted, or sorted before it is passed further up the network or to the cloud. This reduces the traffic which is sent — a concept otherwise known as Fog Computing.

Key features of Node-RED:

  • Supports browser-based flow editing making it user friendly, accessible and visual
  • It is built on Node.js, which is a none-blocking, lightweight I/O model, making it lightweight and efficient
  • Flows created in Node-RED are stored using JSON, and can imported and exported and shared with ease
  • Node-RED can be run locally
  • Ability to run in cloud environments like Bluemix, MS-Azure, FRED etc
  • Node library is continuously growing
  • Built-in support for MQTT, Modbus, CoAP, AMQP, BLE, OPC UA, and even mDNS protocols
  • Simple user interface creation

Visualising node-RED

In this example we have run Node-RED on a virtual Linux platform, and used the Advantech WISE-4012E development kit and its built in RESTful API, to extract the digital input/output and the analog input values to a simple dashboard. The whole flow comprises 7 different types of nodes, with some nodes simply copied and pasted with a slight alteration to achieve the desired outcome.
The timestamp node sets the interval on how often the http request node GET method is called, using the WISE-4012E’s RestAPI interface. The http request node returns the specific RestAPI information as a parsed JSON object, which is sent to a switch node. The switch node is configured to set the msg.payload to the selected value within the original JSON object, and passes the value to a suitable dashboard node that presents the data to the UI. The odd function node was used to set status and warnings as seen below.
This was just a very brief example of bringing data from an edge device into a visual format and is by no means the only way of using Node-RED.

For more information on Node-RED, look out for our ‘how to install Node-RED on a Moxa device’ white paper, coming soon.

About the author

Matt Lundberg, Field Application Engineer at Impulse Embedded, holds a first class Bachelor of Engineering degree, along with over 10 years’ experience in the industrial computing market.

Matt has a particular interest in industrial networking so often gets involved in various networking projects ranging from serial devices to the latest cloud software, fieldbus protocols to cloud connection and wired or unwired communications supporting a range of customer requirements.
 
 
Get in touch
Our technical sales team are ready to answer your questions.
T: +44 (0)1782 337 800 • E: sales@impulse-embedded.co.uk
+44(0)1782 337 800
+44(0)1782 337 800