Node-RED
The following example shows how to use Node-RED development tool to communicate with GUI-O application in MQTT (IoT) mode. Secure connection using SSL/TLS is also supported.
One possible scenario is to use GUI-O application as a remote dashboard for Node-RED projects.
Node-RED & GUI-O
This example uses GUI-O MQTT broker, but it is simple to migrate to any other broker (see HOW-TO GUIDES to setup a custom broker or migrate to a third-party broker).
Prerequisites
Setup your preferred Node-RED environment per instructions found here
Download BasicMQTT_NodeRed_Flow.json
Step 1: Create tokens for MQTT communication
Open GUI-O application and select "Add" from the top-right corner of the home screen
Select "IoT (Create device)" and add a new device (specifying arbitrary name and optional user name)
After adding a device, note the In and Out tokens which are required in the following step (tokens can be shared via email by pressing the "Share" icon)
Step 2: Deploy Node-RED flow
Run Node-RED and access Node-RED editor (if running locally, point your browser to http://localhost:1880)
Import the BasicMQTT_NodeRed_Flow.json flow
Double click on "mqtt in" block and set Out topic (created in Step 1)
Modify "Server" configuration by setting Username and Password fields under "Security" tab (username and password can be retrieved from the comment node in the editor)
Double click on "mqtt out" block and set In topic (created in Step 1)
Deploy the flow and open "Debug messages" window
Step 3: Using GUI-O application to interact with Node-RED flow
Open GUI-O application and select "Connect" from the top-left corner of the home screen
Tap on the device created in Step 1Â
Wait for successful connection and try the example
Connect . Create . Control