August 14, 2022

Node-Red quick install

Updated 2022-08-14 !

Node-Red(NR) is Flow-based programming for the Internet of Things

This post isn't made as a complete install guide, there are several, just some links to the best information I have found.

The best thing is that even if you don't are a skilled programmer, but like logic flows, you can make really advanced things. It's pre-installed on some Raspberry Pi(RPi) distributions.


Introduction
Node-Red V 3.0 is released, 14 July 2022, and since earlier there are some nice videos at Youtube.

Another good, but old, Youtube tutorial with a twist of MQTT is found here.

The "bricks" of NR is Nodes. Nodes is black-boxes with a certain function with, almost always, an input and output.

Nodes connected together make a flow, and as usual with "Open source" software many people have contributed. In NR there is several prebuilt Nodes and flows.

Installation
In my case NR is installed on a RPi but it could be installed on several other hardware platforms.

If you use RPi and have used a distribution without NR preinstalled I really recommend the installation script which is used both in a new install and for an update.

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

It does a lot of things and can be run again to keep your NR installation updated. 

Settings
There been added a command sudo node-red admin init. Check an example setup below.

Start
Continue with command

sudo systemctl enable nodered && sudo systemctl start nodered

which will make NR autostart at power on and failures. Check status with

sudo systemctl status nodered

(After an update just use sudo systemctl restart nodered)

If you just want to start, without an autostart, just use node-red-start.

To check the NR log use 

node-red-log


SignalK have Node-Red as a plugin, which should be used instead !

Access
Once the installation is made, and NR is running, point a browser at

http://your_host:1880/

where "your_host" is the name or IP adress where NR is running. If NR is running on the same device where you use the WEB-browser, change to name localhost or IP 127.0.0.1

The GUI URL, if node-red-dashboard is installed, is


http://your_host:1880/ui/

Test an application
If you would like to start up NR with something simple and useful I have written a post where your Internet speed is measured in selected interval. Or check out how the RPi is running.

Other NR posts
Here you find the other NR posts on this site.

Init
Node-RED Settings File initialisation

=====================================

This tool will help you create a Node-RED settings file.


Settings file · /home/pi/.node-red/settings.js


User Security

=============

Do you want to setup user security? · Yes

Username · pi

Password · *********

User permissions · full access

Add another user? · No


Projects

========

The Projects feature allows you to version control your flow using a local git repository.


Do you want to enable the Projects feature? · Yes

What project workflow do you want to use? · manual - you must manually commit changes


Editor settings

===============

Select a theme for the editor. To use any theme other than "default", you will need to install @node-red-contrib-themes/theme-collection in your Node-RED user directory. · dark


Select the text editor component to use in the Node-RED Editor · monaco (new for 2.0)


Node settings

=============

Allow Function nodes to load external modules? (functionExternalModules) · Yes


No comments:

Post a Comment

Feel free to leave a comment ! ... but due to a lot of spam comments I have to moderate them. Will reply ASAP !