browse
Here is an article about how to configure your Datastream MQTT.
A Datastream MQTT is an MQTT communication between our Wattsense Backend and your Cloud based MQTT broker.
Available only with a Tower subscription, when our backend will receive either a value, an event or an alarm from the Tower, it will be automatically send to your MQTT Broker.
Datastream MQTT architecture
Requirements to configure a MQTT Datastream
To properly configure MQTT communication, it is necessary to obtain the crucial information from your broker parameters, which Wattsense does not provide. This information will enable our Backend to connect to your MQTT broker, which could be AWS, Azure, IBM, or a custom one.
Broker URL |
The broker URL following by the ":" and MQTT communication port. |
Topic | Topic name for each flow : Event / Alarms / Values |
Client ID |
Has to be unique, will help you to identify the connection requester. |
Quality of Service |
QoS level 0 : “At most once” - The message is send without acknowledgement QoS level 1 : “At least once” - The message is send with acknowledgement QoS level 2 : “Exactly once” - The message is send with acknowledge (avoid message duplication mechanism) |
Broker Type |
We will let you select between this broker type |
Certificates |
We will let you the possibility to add certificates if your MQTT broker requires it.
|
Authentication |
Basic Authentication (with username/password) No Authentication |
Step by step configuration
Connector configuration
First of all, click on the "Organization" tab, select the Organization where you want to create your MQTT datastream and click on "Add a connector".
You can create several MQTT connector per datastream |
Name your MQTT myMqttDataStream and fill the blanks according to your broker requirements:
Triggers configuration
Once the communication setup is done, you will have to create the Triggers :
Triggers define what is required to call the connector and what values to send.
When you click on the " Create new trigger" button, here is the interface you'll have to fill :
- Select what type of trigger you want to receive in your MQTT broker.
- Add the Tower(s) in the list in the scope of the trigger. (Note that you'll only see Towers in the current Organization, not from an other one.)
Activate the Datastream
At the end of the configuration, don't forget to activate the datastream by enabling the toggle button
Data format
The data is sent with the following structure :
deviceId: String,
property: String,
timestamp: Long,
payload: Any,
receivedAt: Long?
scaledPayload: Number?
name: String?
unit: String?
externalId: String?
propertyId: String?
equipmentId: String?
gatewayInterfaceId: String?
slug: String?
isOutOfService: Boolean?
tags: Map<String, String>
The ? at the end of the line means that the field can be null.
Here's an example :
If you need any additional information, please contact us here.
Comments
0 comments
Please sign in to leave a comment.