Installing Node-RED on RoadRunner

Node-RED is a programming tool for wiring together hardware devices, APIs and online services in new and interesting ways. It provides a browser-based editor that makes it easy to wire together flows using the wide range of nodes in the palette that can be deployed to its runtime in a single-click.

This article explains how to install Node-RED on the Roadrunner board running Raspbian Buster Linux distribution

Installation

To install Node-RED on the Roadrunner board type this command at Linux prompt:

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

Enable the systemd service by typing:

sudo systemctl daemon-reload
sudo systemctl enable nodered.service

Then start it:

sudo systemctl start nodered.service

Now open with a browser this URL:

Installing node-red-contrib-roadrunner

node-red-contrib-roadrunner is a Node-RED node created to manage the RoadRunner GPIO

Protect the access at Node-RED page

Install node-red-admin by typing:

sudo npm install -g node-red-admin

Create a password hash:

node-red-admin hash-pw

edit ~/.node-red/settings.js

nano ~/.node-red/settings.js

changes the module.exports session:

module.exports = {
    adminAuth: {
        type: "credentials",
        users: [{
            username: "admin",
            password: "put the password hash here",
            permissions: "*"
        }]
    },

Restart NodeRED:

sudo systemctl restart node-red.service

Log

To check any errors generated by NodeRED type:

sudo journalctl -f -u node-red -o cat

Enable the github content manager

Install git by typing:

sudo apt-get update
sudo apt-get install git

launch nano to edit the file ~/.node-red/setting.js:

sudo nano .node-red/settings.js

change this section:

    editorTheme: {
       projects: {
           enabled: false
       }
    },

in:

    editorTheme: {
       projects: {
           enabled: true
       }
    },

Restart NodeRED:

sudo systemctl restart node-red.service

Check for any errors at NodeRED startup:

sudo journalctl -f -u node-red -o cat

Links

Bruna Mandolino