MQTT Interface

MQTT is a lightweight publish/subscribe messaging protocol designed for M2M (machine to machine) telemetry and IoT applications in low bandwidth environments. The deviceWISE Cloud provides a rich MQTT interface to enable you to create applications that use the lightweight MQTT protocol to interact with any of the available services in the platform. MQTT is a binary based protocol were the control elements are binary bytes and not text strings. MQTT uses a command and command acknowledgment format.

Telit deviceWISE Cloud was updated to require a minimum version of TLS/DTLS v1.2. Additionally, access via CoAP (coap://api.devicewise.com), HTTP (http://api.devicewise.com/api), and MQTT (mqtt://api.devicewise.com:1883) has been deprecated.

Key facts about the MQTT interface

  • Protocol specification available from IBM: here
  • Supports all TR50 commands.
  • Supports additional Server Topics for most common APIs. 
  • Commands are sent on topic api, and replies are received on topic reply.
    The mqtt.receive event event cannot be used to listen to reserved topics api and apiz, and if the topic starts with 'thing', it will only listen to topics that have "custom" as the third element.
  • When you connect, you are automatically subscribed to the following topics:
    • reply/#
    • replyz/#
    • notify/#
  • QoS 0 and 1 are supported.

    QoS levels refer to the connection between a broker and a client. The QoS1 level guarantees that the message will be delivered at least once. In QoS1, the initiator of the request is the one generating the messageId. For example, when a client publishes a message on a topic it should generate a msgid that gets acked by the broker.