MQTT
MQTT: It is standard messaging protocol that allows to subscribe to a stream of data. It allows to get live data & sensor values from the devices.
- MQTT messages visible on mqtts://mqtt.regent.cloud:8883
- Authentication with OAuth 2.0 over https://auth.regent.cloud
- Use resulting token as password and choose any username
Topic structure
The data is published under the following topic structure:
{MDA-VERSION}/{ORGANIZATION-ID}/data/{DEVICE-ID}
- MDA-VERSION: The MDA version currently in use
- ORGANIZATION-ID: Your organization unique identifier
- DEVICE-ID: The device unique identifier
Examples
Topic:
mda2/xxx/data/d4:f9:99:aa:ff:3c
- Desk usage
- Temperature
Payload:
{
index: 1,
payload: {
value: 1,
sensor_type: "deskinuse",
}
unix_time_s: 10,
sequence: 1,
device_id: 'd4:f9:99:aa:ff:3c'
}
The value = 1 so the desk is currently in use.
The index indicate which head of the luminaire sent the information (between 1 and 4)
Payload:
{
index: 0,
payload: {
value: 25,
sensor_type: "temperature",
unit: "celsius"
}
unix_time_s: 10,
sequence: 1,
device_id: 'd4:f9:8d:07:ff:3c'
}