How to Install Node-RED onto a Raspberry Pi PLC / Panel PC

Install Node-RED and start developing your own industrial applications in a very easy way!
January 19, 2022 by
How to Install Node-RED onto a Raspberry Pi PLC / Panel PC
Boot & Work Corp. S.L., Fernandez Queralt Martinez

Introduction

In this post, we are going to learn how to install and upgrade Node-RED onto our Raspberry Pi devices, like PLC (or Programmable Logic Controller) and Panel PC.

With the same command provided by Node-red's website, we will be able to install Node-RED and upgrade an existing install when a new release is available.

Finally, we will learn how to run Node-RED as a service, autostart on boot, and finally, open the Node-RED editor for creating amazing flows!

Index

Install Node-red

In order to install Node-RED, follow these steps:

1. Update & upgrade the package manager.

sudo apt update && sudo apt upgrade


2. Ensure npm is able to fetch and build any binary modules.

sudo apt install build-essential git curl


3. Install Node.js, npm and Node-RED. This script will work on any Debian-based operating system, including Ubuntu and Diet-Pi.

bash <(curl -sL https://raw.githubusercontent.com/node-red/linux-installers/master/deb/update-nodejs-and-nodered)

If you add --help  at the end of the line, you will see more parameters so that you can use them if you need them:

Odoo • Image and Text

For more information, please visit: nodered.org >>> 

Run Node-red without internet

If you want to install Node-RED locally without Internet, please go to

Run Node-red as a service

By default, the provided script from step 3 above, also sets it up to run as a service, which means that it can run in the background.

The following commands allow you to work with the service:

  1. node-red-start
  2. node-red-stop
  3. node-red-restart
  4. node-red-log

Autostart Node-red on boot

Enable the service to autostart by running the following command:

sudo systemctl enable nodered.service

To disable the service, run the command:

sudo systemctl disable nodered.service

Open Node-red editor

Once Node-RED is running, you can access the editor in any browser: recommended Chromium, Chrome or Firefox-ESR.

Find the hostname of the Pi by running:

hostname -I

Use the hostname or IP-address of the Pi:

http://<hostname>:1880
IP adress Node-red - How to Install Node-RED onto a Raspberry Pi PLC / Panel PC

Once running, start developing your own Node-RED applications!

Get some ideas in our Raspberry Pi Blog >>>

Latest Posts

Your Dynamic Snippet will be displayed here... This message is displayed because you did not provided both a filter and a template to use.

​Search in our Blog

How to Install Node-RED onto a Raspberry Pi PLC / Panel PC
Boot & Work Corp. S.L., Fernandez Queralt Martinez January 19, 2022

Looking for your ideal Programmable Logic Controller?

Take a look at this product comparison with other industrial controllers Arduino-based. 

We are comparing inputs, outputs, communications and other features with the ones of the relevant brands.


Industrial PLC comparison >>>