Installation of Node-RED on PC|Windows and Ubuntu

Node-RED is a visual programming tool for wiring together hardware devices and APs together. It is a browser based tool. It consists of the pallets containing the nodes which can be dragged on the flow Editor.The nodes can be wired together by applying some logic to create the interactive GUI for IOT based project. It is a very easy operate tool. The Node-Red has wide ranges of nodes to use.

The Node-RED is based on the Node.JS. The Node-RED platform can take the advantages of event drive and non-blocking model of Node-js. In order download Node-RED ,one has to download Node.js first and then can go for Node-RED. As it is light weight, it can run on low-cost hardware like Raspberry-PI.It has got huge Community for support.





Download Node-Red on Windows 10

Visit the Node.js  site here, to download the Node.js as per your OS.




Select option Windows from the choices as shown in the window above and download windows installer from Node,js.org and run the setup and get it installed on your Windows PC.Alternatively, the Winget or chocklatey can be used to intall Node.js on Windows PC.

Once the installation of Node.js is done, Install the Node-Red using the command as show below.

npm can be used to install Node-RED with command

npm install -g --unsafe-perm node-red

Node-RED can be installed with docker.


Download Node-Red on Ubuntu

Install npm use the command.

curl -fsSL https://deb.nodesource.com/setup_18.x | sudo -E bash -

After this use the command

sudo apt-get install -y nodejs

Once the Node.js is installed, use the following command to install Node-RED.

npm install -g --unsafe-perm node-red.


Running Node-RED

To start the Node-RED type the command node-red from the command prompt. in windows and terminal for Ubuntu.




Type the address http://127.0.0.1:1880 in the browser then Node-Red Editor is opened as shown in the image below.




The Two nodes Inject and Debug are shown wired in the above image. Deploy this Flow and press the button on inject Node. The debug window in the side panel shows output message in the form of time Stamp.

The core nodes which are used in the Node-RED

  • Inject Node
  • Debug Node
  • Function Node
  • Change Node
  • Switch Node
  • Template Node

Inject Node: This node can be used to trigger the flow by pressing the button within this node. This node pumps the timestamp by default but the message can also be pumped through this node. This node can be used to trigger the the Flows at regular interval. The message from this node can have topic and payload properties set.

Debug Node: The Debug node can be used for debug purpose. It displays the message in the sidebar pumped into it through other node. The message output of this node can be enabled or disabled with button present with this node. With the message it also shows which node has sent it and time stamp for the same.

Function Node: The Function Node allows the javas-cript code to process the message passing through it.

Change Node: This node can be used to modify the properties of the message and set the context properties. The operations available for this node are Set, Change, Move, Delete.

Switch Node: This node allows the message to be routed to different branches of the flow by evaluating the set of rules.

Template: The template can be use to generate the text using message properties to fill the template.

Adding the node to the pallete. The nodes can be added to the Palatte by using Manage Palettes  by opening main menu Palette Manager.


Other Blogs:

Integrate Tasmota with Node-RED




Post a Comment

Previous Post Next Post