By default, the Node-RED web interface is exposed locally only on the machine that is running Engine, at http://127.0.0.1:1880. If accessing the Node-RED web interface from a remote client, use methods such as SSH port forwarding to securely mirror the Engine server's 127.0.0.1:1880 to your machine's 127.0.0.1:1880.
Additional Node-RED nodes can be installed by running the below command on the machine running Engine:
docker exec -it node-red npm install <package-name>
docker exec -it node-red npm install node-red-contrib-azure-iot-hub
Engine connects to Node-RED via Node-RED's websockets modules (one for input and one for output). Drag an output websocket module into the Flow, double-click it and set the Type to
Listen onand the Path to
Node-RED Websocket output module
Messages coming out of the Node-RED websocket output should appear as console log output when debugging the Engine "Node-RED Websocket" module. The status variable "message_received" will also update to show the last string recieved. Simple strings may be used as inputs for Triggers.
The "Node-RED Websocket" driver can be used as a template for creating new drivers that take actions upon receiving messages from Node-RED, or send websocket messages to a Node-RED Websocket Input module. One example of this is the Pressac desk sensor driver, which uses Node-RED to subscribe to real time updates from Azure IOT Hub.