Node-RED

The gateway has built-in the Node-RED tool. This chapter introduces the Node-RED software in this gateway.

Overview

Node-RED is a flow-based development tool for visual programming and wiring together hardware devices, APIs, and online services as part of the Internet of Things. Node-RED provides a web-browser-based flow editor, which can easily wire together flows using the wide range of nodes in the palette. For more details please refer to Node-RED official website.

Start the Node-RED



Steps:
  1. On the left bar, select APP > Node-Red page.

  2. Enable the Node-RED.
  3. If you require Node-RED web access via HTTPS, enable SSL Access option; if you require Node-RED web access via HTTP, disable SSL Access option.
  4. Click Apply to save the settings and start the Node-RED.
  5. Click Launch to open the Node-RED web GUI.
  6. Log into the Node-RED web GUI using the credentials the same as gateway web GUI.

Create a New Node-RED Flow

Here are the basic steps to create a Node-RED flow, for more details please refer to Node-RED User Guide.

Steps:
  1. Click "+" to add a new flow.
  2. Drag and drop any nodes onto the workspace.
  3. Configure the parameters of some nodes as required.
  4. Connect the nodes together to make a flow.
  5. Click Deploy in the upper right corner to save the settings.

  6. Trigger the flow and check the results.

Node-RED Library Update

Nodes are the basic building blocks for creating a flow. The device has preloaded the basic nodes from Node-RED official library and custom nodes from Milesight.

Install Node-RED Official Library Module
  1. Click Launch to open and log in to the Node-RED web GUI.
  2. Click in the upper right corner, select Manage palette.
  3. Select Install tab, search for the module name and select the target one to install. This requires the device access the Internet network.

    Note: If the device cannot connect to the Internet, please search and download the node-red module package from Node-RED official library, then upload the file to the device.

Update Custom Node-RED Library

The device has preloaded custom nodes related to the device's programs and applications:
Node Description
LoRa Input Input all received LoRaWAN® packets from the LoRaWAN® network.
LoRa Output Send downlink command to the specific LoRaWAN® end device.
Device Filter Filter out the input LoRaWAN® packets via device EUIs.
GW Info Monitor events of the device. This needs to enable the Event Notification first.
Email Output Send custom emails. If the SMTP Option is Same as gateway, it is necessary to configure the SMTP Client settings first.
SMS Input Receive SMS message. This feature is only available for -L08GL model and ensure the cellular connection is active.
SMS Output Send SMS messages. This feature is only available for -L08GL model and ensure the cellular connection is active.
To update this custom library, here are the steps:
  1. Receive the custom node library package from Milesight.
  2. Click Import to select the library package from local path, then click Upgrade.