Skip to main content

Publish data from a device to the AirNgin MQTT server

Read the provisioning/login guide before publishing.

What is Publish?

In MQTT, Publish means sending a message to a named topic. The message has two main parts:

  • Topic: the routing channel.
  • Payload: the message body, such as text or JSON.

Direct Device publish topic

According to the Direct Device canonical contract, device data is published to:

projectCode/DeviceToServer

If the Direct Device AES layer is enabled for this encrypted topic, publish to:

projectCode/DeviceToServer/AES

All Direct Device topics are namespaced by projectCode.

The payload can be text or JSON depending on the selected integration model. When an Analyzer is used, the Producer-owned Direct Device Analyzer converts the manufacturer payload to AirNgin logical data. When your firmware already speaks the AirNgin logical format, use the direct command/state model.

For encryption details, see Device security.