Thingsee Operations Cloud comes with an MQTT broker that is available for you to subscribe. This is the preferred method for data integration unless you have some specific requirements or customization needs how the integration is done from Thingsee Operations Cloud to your cloud (e.g. direct Azure connection).
Topic Structure
cloudext/json/{groupId Prefix Environment}/{groupId Prefix Country}/{groupId CustomerId}/{tuid}/{messageId}
An MQTT client (your cloud) can subscribe
- to groupId level e.g. when data is needed from a logical group of devices
- Prefix env == pr
- Prefix country == county
- groupId == defined by customer
- Example: prfi00examplename
- More detailes How to use deployment Groups
- to tuid level when a data is needed from the specific device
- where tuid is the tsmTuid-property of the JSON message.
- to messageId level when the specific data needed from the specific device
- where messageId is the tsmId-property of the JSON message.
Connection details
An MQTT broker address and X.509 certificate is delivered as part of Thingsee Operations Cloud installation process.
Note that you must allocate and manage ClientId (MQTT), and make sure that only one connection per ClientId is established at the same time. If you need to use multiple connections, then you must use unique ClientIds per connection.
Published messages
Messages are published as a single JSON objects
Sample data
Environment message
Example message published to cloudext/json/pr/fi/prfi00samplegroup/TSEN01ABC12345678/12100
{
"tsmId": 12100,
"tsmEv": 10,
"airp": 101364.599,
"lght": 6,
"temp": 21.3,
"humd": 21.7,
"tsmTs": 1520416221,
"tsmTuid": "TSEN01ABC12345678",
"tsmGw": "TSGW06ABC12345678",
"deploymentGroupId": "prfi00samplegroup"
}
Presence message
Example message published to cloudext/json/pr/fi/prfi00samplegroup/TSPR04ABC12345678/13100
{
"tsmId": 13100,
"tsmEv": 10,
"moveCount" = 12
"tsmTs": 1520416221,
"tsmTuid": "TSPR04ABC12345678",
"tsmGw": "TSGW06ABC12345678",
"deploymentGroupId": "prfi00samplegroup"
}
Guidance to use MQTT explorer
Easy way to test MQTT connection is MQTT Explorer applications.
Application available for example: https://pcmacstore.com/en/app/1455214828/mqtt-explorer. Download and install to your PC/Mac.
- Create new connection:
- protocol: mqtt
- host: ....amazonaws.com (host address received from Haltian)
- port: 8883
- validate certificates: enabled
- encryption(tls): enabled
- Username and Password are not used.
- In “Advanced view”
- Add topic: cloudext/json/pr/# (with this topic you will receive all the messages)
- Remove example topics
- In “Certifications” view
- Add Certificates (.pem and .key files) that your have received from Haltian.
- Save the settings and Select “Connect”
- Notice that you need to have GW and sensors online to receive data.