Adding a Node-RED connection
What is a Node-RED connection?
Node-RED is a browser-based flow editor that is used for building Internet of Things applications. It provides you with code blocks known as nodes, each node describing a task. When linked together, the nodes make up a flow. The Node-RED editor is accessible from the ThingPark Enterprise user interface with Single Sign-On (SSO).
To learn more about Node-RED, see the Node-RED documentation.
Using Node-RED connections is optional on self-hosted ThingPark Enterprise, it may be activated via Cockpit. For activation/deactivation through Cockpit, contact your System Integrator. Node-RED type of connection is not supported on ThingPark Enterprise SaaS.
Adding a connection to Node-RED
This procedure is valid only for self-hosted ThingPark Enterprise.
Only one Node-RED connection is supported per self-hosted TPE subscription. This single connection allows exchanging uplink and downlink packets between the ThingPark Enterprise Network Server and the Node-RED application. Nevertheless, via this single NS - Node-RED connection, you may configure several application connectors through Node-RED to interface with your external Application Servers.
To learn more, see Parameters required for connecting to a Node-RED application.
-
Select Connections, and click ADD CONNECTION in the Connections page, or from Dashboard, go to the CONNECTIONS widget, and click.
-
Click the Node-RED type of connection.
-
Choose a name for your connection.
Note Parameters marked with * are mandatory.
Important The Tunnel Interface Authentication Key is already auto-generated.
-
Copy the Tunnel interface authentication key from this form. This key is auto-generated by the ThingPark Enterprise user interface and must be configured in the Node-RED application as required in step 9.
-
Click ADD.
-> A notification appears on the upper right side of your screen to confirm that the connection has been created.
-
Click View the connection to access its details.
-> You are redirected to the Connection Information frame.
-
In the Information panel, click OPEN NODE-RED EDITOR.
-> You are redirected to the Node-RED application. The following frame appears:
-
In the frame that displays, click Sign in with ThingPark Enterprise.
-> You are now on the Node-RED application, where you can manage your nodes.
To learn more, see Node-RED docs.
-
From the Node-RED user interface, configure the downlink parameters:
-
Double-click the "downlink " block (widget) in the application as shown in the preceding capture.
-> The Node-RED application window opens.
-
Paste the auto-generated value of the Authentication Key from the ThingPark Enterprise user interface in the related field.
-
Copy the Application ID from the connection that you created in the ThingPark Enterprise user interface.
-
Paste it in the App ID.
-
Update the default Fport used to send downlink LoRaWAN® frames through this application, if needed.
-
Label the node, as desired.
-
Click Done.
-
Parameters required for connecting to a Node-RED application
The Node-RED configuration in ThingPark Enterprise is already personalized with two blocks: one for uplink and another for downlink. These two blocks are initially associated with an example MQTT connector, but they can be reused for any connector flow you create using the Node-RED application.
Parameter | Definition |
---|---|
Name | Friendly name given to your connection. |
Tunnel Interface Authentication Key (TIAK) | A 32-hexadecimal digits with a high entropy that is associated with the application to secure the uplink and downlink packets. This system-generated security key should be configured in Node-RED as explained in this topic. Click " button to generate a new key. Important: You must configure the regenerated key with Node-RED application instead of the older one. |
Additional information | Any useful information that is related to the connection. |
Even if the permission segregation based on domains has been enabled on your ThingPark Enterprise subscription, the Node-RED connection cannot be associated with any domain. Hence, it is always cross-domain, which means that the connection is visible to all users.