eManager Node-RED Guide

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.

Note

By default, node-RED is running in the eManager managed as a service by systemd.

If it is your first time using Node-RED, you can check the Node-RED user guide to get familiar with it.

Creating your First flow in Node-RED

To access Node-RED, you only need to put URL 10.1.10.10:1880 in a browser. Then, if you want to create your first flow, you can start from the second step of the following tutorial:

--> Creating your First Flow Tutorial

Learn all the essentials about using the Node-RED editor following this tutorials.


Node-RED Palette Manager

You have thousands of nodes available so you can use Node-RED according to your needs. To manage the nodes, you can follow the following manual:

--> Palette Manager Manual

Note

The installation of the nodes in the Palette Manager can take 1 or 2 minutes, until they appear.


Modbus package

eManager Node-RED incorporates a Modbus TCP and a Serial node package to be able to communicate with most Modbus devices.

If you want to know more about this module, please check the following Modbus package tutorial.


Access security for Node-RED

Step 1. Generate the hash for the password

node-red-admin hash-pw

When it asks for the password, enter the desired password to access the Node-RED.

Step 2. Edit Node-RED configuration file

nano /etc/node-red/settings.js

Add the following content as an option inside module.exports (change the username and password you want):

adminAuth: { type: "credentials", users: [{ username: "admin", password: "<GENERATED HASH>", permissions: "*" }] },

Copy the hash generated in step 2 into <GENERATED HASH>.

Step 3. Restart service

systemctl restart node-red

Wait a few seconds for the service to restart and access from a browser in the client connected to eManager.


Watchdog

A watchdog have been incorporated to the Node-RED service to avoid that a service could get stucked when a certain flow is developed.

The watchdog is constantly monitoring Node-RED. If Node-RED does not respond during more than a specific time (2 minutes by default), this service will be restarted automatically.