Topics

MQTT Publisher topic templates, payload formats, and delivery behavior

Topic structure

Topics are generated from a configurable template. The default template is:

${account_id}/${location_id}/${serial_number}/${message_type}

Template variables

VariableDescriptionExample Value
${account_id}Account IDe70436c6-877c-11e9-b532-0a0fcefe620c
${location_id}Location ID within the organization8ef8f04a-686f-473e-b122-c2c52ea085eb
${serial_number}Device serial number2930123456
${message_type}sample for sensor data, metadata for hub statussample

Template rules

  • Maximum 512 characters
  • Allowed characters: alphanumeric, -, _, /, and template variables
  • No spaces or special characters outside the allowed set
  • Unrecognized ${...} variables are rejected

Custom topic examples

airthings/${account_id}/devices/${serial_number}/${message_type}
iot/building/${location_id}/${serial_number}/data
${account_id}/${message_type}/${serial_number}

Sample Feed payload

Published when sensor readings are received from a device. The ${message_type} resolves to sample. Each device sample is published as an individual MQTT message.

{
  "serialNumber": "2930123456",
  "recorded": "2026-03-23T12:30:45Z",
  "rssi": -65,
  "batteryPercentage": 87,
  "temp": 22.5,
  "humidity": 45.2,
  "co2": 420,
  "tvoc": 150,
  "pressure": 1013.25,
  "pressureDifference": 0.5,
  "radonShortTermAvg": 48.0,
  "pm1": 2.5,
  "pm25": 5.5,
  "light": 75.0,
  "lux": 500,
  "soundLevelA": 42,
  "sensorUnits": {
    "temp": "c",
    "pressure": "hpa",
    "radon": "bq",
    "voc": "ppb"
  },
  "ratings": {
    "temp": "GOOD",
    "humidity": "GOOD",
    "co2": "POOR"
  },
  "deviceName": "Conference Room Sensor",
  "locationName": "Oslo Location"
}

Field reference

FieldTypeDescriptionUnit
serialNumberstringDevice serial number
recordedISO 8601Timestamp of reading
tempfloatTemperature°C or °F (per config)
humidityfloatRelative humidity%
co2floatCarbon dioxideppm
tvocfloatTotal VOCsppb or µg/m³ (per config)
pressurefloatBarometric pressurehPa or inHg (per config)
radonShortTermAvgfloatShort-term radon averageBq/m³ or pCi/L (per config)
pm1floatParticulate matter less than 1 µmµg/m³
pm25floatParticulate matter less than 2.5 µmµg/m³
lightfloatAmbient light%
luxfloatIlluminancelux
soundLevelAfloatA-weighted sound leveldBA
rssiintRadio signal strengthdBm
batteryPercentageintBattery level%
pressureDifferencefloatPressure differencePa
sensorUnitsobjectUnits used for each sensor in this payload
ratingsobjectHealth ratings per sensor (GOOD, FAIR, or POOR)
deviceNamestringHuman-readable device name
locationNamestringHuman-readable location name
📝

Not all fields are present on every device. Fields are omitted if the device does not have that sensor.

Hub Metadata payload

Published when hub status updates are received. The ${message_type} resolves to metadata.

{
  "serialNumber": "2820012345",
  "recorded": "2026-03-25T22:09:25Z",
  "lastSeenDevices": [
    "3110012345",
    "2969012345",
    "2930112345"
  ],
  "devices": {
    "2930112810": {
      "lastSeen": 1774476565,
      "rssi": -46,
      "type": "wavePlus",
      "productName": "Space Plus"
    },
    "2969040888": {
      "lastSeen": 1774476565,
      "rssi": -41,
      "type": "viewPlusBusiness",
      "productName": "Space Pro"
    },
    "3110006139": {
      "lastSeen": 1774476565,
      "rssi": -48,
      "type": "spaceCo2Mini",
      "productName": "Space CO₂ Mini"
    }
  },
  "connectionType": "ethernet",
  "deviceName": "Office Hub",
  "locationName": "Oslo Location"
}

Field reference

FieldTypeDescription
serialNumberstringHub serial number
recordedISO 8601Timestamp of status update
connectionTypestring/null"ethernet" or "cellular" (null if unknown)
lastSeenDevicesstring[]Serial numbers of connected devices
devicesobjectMap of serial number to device info
devices[].lastSeenISO 8601When device last communicated with hub
devices[].rssiintSignal strength to hub (dBm)
devices[].typestringDevice type identifier
devices[].productNamestringHuman-readable product name
deviceNamestringHuman-readable hub name
locationNamestringHuman-readable location name

Delivery behavior

PropertyDetails
QoS0 (at-most-once) — messages are fire-and-forget with no delivery guarantee
FormatSingle-line JSON, UTF-8 encoded
PublishingEach sensor reading is published as a separate MQTT message
ConnectionsAirthings maintains long-lived persistent connections to your broker and reconnects automatically if the connection drops or configuration changes