MQTT

MQTT is a lightweight messaging protocol where a client can register to send/receive messages on publish/subscribe topics. These messages are forwarded to the users MQTT Broker (server) such as Mosquitto, where the messages can be held until a client requests the messages for a specified topic. The MQTT notifier will register a client to send messages on a Publish Topic and can optionally register to receive Downlink Requests on the Subscribe Topic. The Brokers Address is the IP Address/Hostname of the MQTT Server and the Client ID is an optional field where you can identify the Senet client connection to your MQTT Broker, if no Client ID is specified then the a unique Client ID will be generated starting with "clientid". Client IDs should be unique as the broker will disconnect an existing connection when a new connection is initiated with that same client id.

The Broker Port should be configured to match the port of your server. Typically, the default port is 1883 or 8883 for TLS.

Uplink messages will be forwarded in JSON format to the Publish Topic (See Default Data Fields).

Users have the ability using external tools to send/publish Downlink messages to this notifier's Subscriber Topic, the Senet Client can process these messages provided they are delivered in the following JSON format:

Downlink Message Format

    {
      “eui”:”00250C0000000001”,
      ”pdu”:”0123456789ABCDEF”
    }

Downlink Message Format with optional fields

    {
      “eui”:”00250C0000000001”,
      ”pdu”:”0123456789ABCDEF”,
      "port":0,
      "timeout":5,
      "confirmed":false
    }

Note: Downlink messages will only be processed if the EUI specified is registered with the Senet Development Portal.

The Senet Client uses the following QoS levels for the Publish and Subscriber topics:

Publish Topic = At Most Once (0)
Subscribe Topic = Exactly Once (2)

Authentication and Security

Platform Setup

Implementation specific.

Notifier Setup

Specify the Brokers IP Address and Publish Topic in the [Notification Target][notify] fields. The Subscribe Topic is only required if you are going to be processing downlinks. The Client ID is also optional and only required if your broker requires a specific Client ID.