What is Node-RED?

by Jan 14, 2019Node-Red

In this article, we will learn about Node-RED and its importance to the Internet of Things. It was developed in the year of 2013 by IBM Emerging Technology- Nick O’Leary and Dave Conway-Jones. The Node-RED is a visual tool that provides a web-based flow editor that can be used to create JavaScript functions.

So what is Node-RED, and what is the link to IoT?

In 2013, IBM developed this project as an open-source, to connect the hardware and devices to web-based services and software. In this way, the IoT devices are connected and control the real world. The Node-RED is a simple “wiring” of nodes or predefined code blocks to perform the tasks. One happy news is that it doesn’t need huge blocks of codes. No need to waste time running the code. It is a flow-based development tool in which the runtime is built on Node.js. The flows created are stored in JSON. By storing in JSON, we can share, import and export to the real world. An online flow library allows you to share your best flows with the world.

Node-RED Projects

Node-REDA Visual tool for wiring the Internet of Things

Node-RED Dashboard

A dashboard UI for Node-RED
Node generator Command line tool to generate Node-RED node modules
from several various sources, including Open API
document and function node’s source.
Node-RED Command Line Tool Command-line tool allows you to remotely administer a
Node-RED instance.

Installing Node-RED

The Node-RED can install on windows, on a device like Raspberry Pi, Arduino, Android, and BeagleBone Black. You must be having Node.js in your system. We recommend the use of Node.js LTS 8.x. Users of Node.js 6.x and 4.x should ensure they have the latest updates. Node-RED no longer supports Node.js 0.12.x or 0.10.x

For more information, Click here.

The Connected Nodes and the Flow

The connected nodes consists of the input nodes, the processing nodes, and the output nodes.

Connected nodes

Input nodes: It allows you to enter the input data into the flow. They have a grey square on their right side which you can connect to the other nodes. By connecting this node to another node, you can send the input data. You can also connect services like Twitter, Google, serial, web sockets and send those data as inputs to the other nodes. Or else you can manually enter the input data using the node called “inject”.

Output nodes: It allows you to send the data to the outside world, to other services for example twitter. It has a grey square on their left side which they can be connected to either input node or function. If you don’t want to send the data to any services like Twitter or email nodes, you can simply debug those messages by using the tab “deploy” on the top right corner of the editor.

Processing nodes: The processing nodes are used to process the data in which they have one input endpoint and one or more output endpoints. They are used to transform the data types, to write the custom codes and to trigger a message.

The examples of the connected nodes:

  • Input nodes: inject, catch, status, mqtt, etc
  • Processing nodes: comment, delay, function, switch, change, etc
  • Output nodes: debug, link, tcp, udp, websocket, http request, etc

Hello World – the first flow

The above image depicts an example of a simple flow of “Hello World”. I have signed up a free account using the Sensetecnic FRED cloud service. For more information, Click here.

So coming to the flow, on the left side of the image you can see the input nodes, the output nodes, and the function. Select an input node, in my case I have chosen the “inject node”, drag and place in the center of the workflow. Doubleclick on the node and chose the String option in the drop-down list and enter “Hello World”. On the Topic tab, enter you desired name. I have given as “iot4beginners” in the tab. Since I am not using any processing nodes here, I am directly using the output node.

I have used the debug node and connected with the inject node. Then I have clicked the tab Deploy on the top right corner to deploy the message “Hello World”. The message will be displayed in the sidebar debug. the deploy button is used when a flow has been constructed and ready to be given to the outside world. It will be deployed on the Node-RED system and executed.

Basic Node-RED structure

msg = {
payload:”message payload”
};

Various Examples of the Node-RED

The Node-RED can be used in weather reports or alerts, sending TCP requests, using Twitter or other social services to control Raspberry Pi, alerts when you are falling off a schedule, etc.

Creating a multiplication Skill in Alexa using python

Written By Monisha Macharla

Hi, I'm Monisha. I am a tech blogger and a hobbyist. I am eager to learn and explore tech related stuff! also, I wanted to deliver you the same as much as the simpler way with more informative content. I generally appreciate learning by doing, rather than only learning. Thank you for reading my blog! Happy learning!

RELATED POSTS

How to export and import flows-node-red

How to export and import flows-node-red

Flows are imported and exported from the editor using their JSON format. So,Node-red makes it easy to share flows with others. Exporting flows Step 1: Click on the node that you want to export and press CTRL, the node will be highlighted. Step 2: Go the top right side...

Installing and starting Node-red

Installing and starting Node-red

Node-red is a programming tool for wiring together hardware devices, APIs, and online services in new and interesting ways. Install Node-red  Open the official page for Node.js downloads and download Node-red for Windows by clicking the "Windows Installer" option...

How to create flow in Node-RED Admin Basics

How to create flow in Node-RED Admin Basics

You can easily create a flow in Node-RED by simply following the steps given below but before diving into How to create Flow in Node-RED we will first understand about Node and flow in Node-RED. For installation and tutorial of Node-RED click here. What is a Node? A...

How to create a basic Dashboard in Node-RED

How to create a basic Dashboard in Node-RED

You can create a basic Dashboard in Node-RED by following the steps given here. Firstly, the Dashboard is not built-in so you first need to install the Dashboard. Installing Dashboard and Initializing Node-RED Assuming you have already installed Node.js and Node-RED...

Node-RED Tutorial

Node-RED Tutorial

Introduction One of the most important factors that limit the development of the IoT(Internet of Things) applications is the lack of comfortable means to develop rules for IoT devices interacting with each other. IBM developed an Open-Source tool called Node-RED to...

VIDEOS – FOLLOW US ON YOUTUBE

EXPLORE OUR IOT PROJECTS

IoT Smart Gardening System – ESP8266, MQTT, Adafruit IO

Gardening is always a very calming pastime. However, our gardens' plants may not always receive the care they require due to our active lifestyles. What if we could remotely keep an eye on their health and provide them with the attention they require? In this article,...

How to Simulate IoT projects using Cisco Packet Tracer

In this tutorial, let's learn how to simulate the IoT project using the Cisco packet tracer. As an example, we shall build a simple Home Automation project to control and monitor devices. Introduction Firstly, let's quickly look at the overview of the software. Packet...

All you need to know about integrating NodeMCU with Ubidots over MQTT

In this tutorial, let's discuss Integrating NodeMCU and Ubidots IoT platform. As an illustration, we shall interface the DHT11 sensor to monitor temperature and Humidity. Additionally, an led bulb is controlled using the dashboard. Besides, the implementation will be...

All you need to know about integrating NodeMCU with Ubidots over Https

In this tutorial, let's discuss Integrating NodeMCU and Ubidots IoT platform. As an illustration, we shall interface the DHT11 sensor to monitor temperature and Humidity. Additionally, an led bulb is controlled using the dashboard. Besides, the implementation will be...

How to design a Wireless Blind Stick using nRF24L01 Module?

Introduction Let's learn to design a low-cost wireless blind stick using the nRF24L01 transceiver module. So the complete project is divided into the transmitter part and receiver part. Thus, the Transmitter part consists of an Arduino Nano microcontroller, ultrasonic...

Sending Temperature data to ThingSpeak Cloud and Visualize

In this article, we are going to learn “How to send temperature data to ThingSpeak Cloud?”. We can then visualize the temperature data uploaded to ThingSpeak Cloud anywhere in the world. But "What is ThingSpeak?” ThingSpeak is an open-source IoT platform that allows...

Amaze your friend with latest tricks of Raspberry Pi and Firebase

Introduction to our Raspberry Pi and Firebase trick Let me introduce you to the latest trick of Raspberry Pi and Firebase we'll be using to fool them. It begins with a small circuit to connect a temperature sensor and an Infrared sensor with Raspberry Pi. The circuit...

How to implement Machine Learning on IoT based Data?

Introduction The industrial scope for the convergence of the Internet of Things(IoT) and Machine learning(ML) is wide and informative. IoT renders an enormous amount of data from various sensors. On the other hand, ML opens up insight hidden in the acquired data....

Smart Display Board based on IoT and Google Firebase

Introduction In this tutorial, we are going to build a Smart Display Board based on IoT and Google Firebase by using NodeMCU8266 (or you can even use NodeMCU32) and LCD. Generally, in shops, hotels, offices, railway stations, notice/ display boards are used. They are...

Smart Gardening System – GO GREEN Project

Automation of farm activities can transform agricultural domain from being manual into a dynamic field to yield higher production with less human intervention. The project Green is developed to manage farms using modern information and communication technologies....