How can I receive over-the-platform centrally managed edge gateway device user data in own applications such as Node-RED?
- Armin Beck
How can I receive over-the-platform centrally managed edge gateway device user data in own applications such as Node-RED?
Please consider that over-the-platform data transmissions are subject to a managemenr platform subscription (pay-per-use) model.
Managed devices of the class "sensorEDGE" and "netFIELD" support establishing an MQTT-based communication channel for user data to their corresponding central management platform (www.sensoredge.io or www.netfield.io).
The user data published by the devices can be retrieved back from the platforms' hosted MQTT broker by any MQTT client (MQTT over websocket) capable application. The overall goal is to enable the distribution of locally generated device data to application that are remotly hosted in realtime.
The data transfer is eavesdrop-secure using Transport Layer Secuity (TLS) the whole way. The MQTT communication channel between the remote application and the platform is authenticated with a unique usernames and passwords as generated by the platform before.
In order to let an MQTT client subscribing to a plaform topic the following information is required
- Endpoint URL, where the MQTT broker is hosted
- Username, as first part of the authorization
- Password, as second part of the authorization
- Topic, the user data's name space of interest
The Endpoint URL, username and password can be received from the respective user dialog of the platform in use:
Platform | www.sensoredge.io | www.netfield.io |
---|---|---|
Dialog | Data Service Credentials → Data Service Credential Details → Data Service MQTT Credentials | API Key Manager → MQTT Subscribe/Publish |
Screen shot |
The topic(s) can be received from the platforms in the following dialogs as well:
Platform | www.sensoredge.io | www.netfield.io |
---|---|---|
Dialog | Data Manager → sensorEDGE-xxxxx → TOPICS → Data or Health | Device Manager → Device xxxxx → netFIELD App Plaform Connector → Topics → TOPIC |
Screen shot |
Having all parameters ready, you can now feed your MQTT client with them to subscribe to the data topic to receive data on any update. Here is an example how to do this in Node-RED
Drag and drop an MQTT In Node to your flow and open its parameter list with a double click
Click the pencil to add a new mqtt-broker...
Fill out the "Server" field with the Endpoint URL copied from the platform parameters above
Click the "Security" tab and fill out "username" and "password"
Click "add" and then fill out the topic to want to subscribe to at last
A click to "Done" finalizes your setup and you can then connect a "debug node" to the "MQTT in" node and deploy the flow.
In the debug node output window you can see the published data in a JSON format.
-
Page:
-
Page:
-
Page:
-
Page:
-
Page:
-
Page:
-
Page:
-
Page:
-
Page:
-
Page:
-
Page: