The thingsHub's built-in MQTT broker allows to quickly connect to the thingsHub, and observe data being processed by the system. The broker is accessible only via websockets and at `https://<tenant>`. Since release 3.12, the credentials (username and password) used for accessing the REST API can be used to access the MQTT broker, too.

thingshub/devices/:device-id/stateDevice state updates and decoded messages
thingshub/devices/:device-id/uplinkRaw device uplinks

A description of the message formats can be found at Native Output Format.

The timeout of the MQTT connection must be set below 60 seconds (with a margin), otherwise the thingsHub built-in reverse proxy will consider the connection timed out and terminate it.

How To ...

... subscribe to all devices at once

MQTT's wildcards can be used to subscribe to all uplinks for all devices with a single subscription: thingshub/devices/#/uplink. Similarly all state updates of all devices can be subscribed using thingshub/devices/#/state.

... subscribe to a selected subset of devices

Due to the way MQTT's wildcards work, it is only possible to subscribe to a single device or all devices at the same time, but not to a specific subset of devices. To do this, it is necessary to create an MQTT integration. This integration's selector can then be used to select an arbritrary subset of devices which shall be received on the same topic.