BETA -- IoT Edge Deployment and the associated ECY Server Firmware are in beta.
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. Node-RED.
In order to use an edge device with the Cloud Relay, the following requirements need to be met/installed:
Navigate to the main page of your IoT Edge Device. Select "Set modules" followed by "+ Add" --> "+ IoT Edge Module" shown in the images below.
To add Node-RED you will need to fill out the "IoT Edge Module Name" and the "Image URI". You can choose the name you want for the container but it's recommended to make it something that is easy to identify later by yourself or others. The Image URI needs to be exact. In this case it will be "nodered/node-red
".
Next we need to configure our variables. Towards the center of the page you should see a tab labeled "Environment Variables". Select this and enter for the following for the first variable.
NAME: NODE_TLS_REJECT_UNAUTHORIZED
TYPE: Number
VALUE: 0
The last step in configuring our module is to specify some information in the "Container Create Options". Copy and paste the information below into the provided box. Formatting is important here so ensure that what you paste in to the options box looks like the image below.
Feel free to change the port which is set for 50080 below. After setting your port select "Add".
NOTE: The useable port range on an ECY-APEX is
50000 - 50500
. Any ports outside of these will cause the deployment to fail.
{
"HostConfig": {
"Memory": 268435456,
"CpuPeriod": 25000,
"CpuQuota": 50000,
"CpusetCpus": "0",
"PortBindings": {
"1880/tcp": [{
"HostPort": "50080"
}]
},
"Mounts": [{
"Target": "/data",
"Source": "node-red",
"Type": "volume",
"ReadOnly": false,
"Consistency": "default"
}]
}
}
You should see "nodered" listed under "IoT Edge Modules" now. This does not mean it has been deployed yet. Select "Review + create" from the bottom left of the pane to go to the next step.
A summary of what will be deployed to the controller should now be visible. Please review and select "Create" from the bottom left of the pane.
Log back into your ECY-APEX controller and navigate to the IoT section. You should now see nodered listed as running.
Open your web browswer and navigate to the IP address/hostname of your controller at port 50080. You should now see Node-RED.
The example below will allow you to sync an iCal link to the exception schedule in an ECLYPSE controller. It will write to the schedule using the ECY RESTfull API. Please import the json file below into Node-RED to use. The example program supports both API calls to the Azure IoT Hub with Cloud Relay and local calls.
DOWNLOAD ---> nodered-schedulesync-v1.json