Skip to content

Reporting

The gateway will report from devices by publishing to the following generic topic structure:

  • t/{tenant-id}/{d}/...

where {tenant-id} is a unique identifier of a tenant the devices belong to, {d} is device MAC address. The format of MAC addresses is 12 lowercase hex digits.

The message payload is an UTF-8 encoded JSON object and always contains a property time. This is the time of the message in ISO-8601 format.

heartbeat

t/{tenant-id}/{d}

Device heartbeat.

Properties

  • type: type of a reported property
  • time: time in ISO-8601 format.
  • seq: sequence number 0-255
  • status: a device status value. Non-zero values are used to indicate device error/warning.
  • lastCount: number of heartbeat messages received for last/previous heartbeat. lastCount will be 0 (unknown) for the first heartbeat. For devices in connected mode this value will typically be 1. For devices in unconnected mode this value can vary and indicates how many of the heartbeat advertisements the network is able to pick up.

Example

t/Meshtech/c0141f68fc3d

{
  "type": "heartbeat",
  "time": "2021-06-29T11:05:45.058Z",
  "seq": 17,
  "status": 0,
  "lastCount": 1
}

property-decoded

t/{tenant-id}/{d}

A device reported a property value.

Properties

  • type: type of a reported property
  • id: identifier of a reported property
  • time: time in ISO-8601 format
  • value: the property value (JSON)
  • ext: value extensions (JSON object, optional)
  • seq: sequence number 0-255 (optional)

Example

t/Meshtech/ddc571e972f5

{
  "type": "property-decoded",
  "id": "motion",
  "time": "2021-06-29T11:10:31.039Z",
  "value": 0
}

event-decoded

t/{tenant-id}/{d}

A device fired an event.

Properties

  • type: type of a reported property
  • id: identifier of a reported property
  • time: time in ISO-8601 format.
  • value: value associated with event (JSON, optional)
  • ext: value extensions (JSON object, optional)

Example

(Button press)

t/Meshtech/ddc571e972f5

{
  "type": "event-decoded",
  "id": "button-0-counter",
  "time": "2021-06-29T10:47:18.905Z",
  "value": 7
}