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
| Variable | Description | Example Value |
|---|---|---|
${account_id} | Account ID | e70436c6-877c-11e9-b532-0a0fcefe620c |
${location_id} | Location ID within the organization | 8ef8f04a-686f-473e-b122-c2c52ea085eb |
${serial_number} | Device serial number | 2930123456 |
${message_type} | sample for sensor data, metadata for hub status | sample |
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
| Field | Type | Description | Unit |
|---|---|---|---|
serialNumber | string | Device serial number | — |
recorded | ISO 8601 | Timestamp of reading | — |
temp | float | Temperature | °C or °F (per config) |
humidity | float | Relative humidity | % |
co2 | float | Carbon dioxide | ppm |
tvoc | float | Total VOCs | ppb or µg/m³ (per config) |
pressure | float | Barometric pressure | hPa or inHg (per config) |
radonShortTermAvg | float | Short-term radon average | Bq/m³ or pCi/L (per config) |
pm1 | float | Particulate matter less than 1 µm | µg/m³ |
pm25 | float | Particulate matter less than 2.5 µm | µg/m³ |
light | float | Ambient light | % |
lux | float | Illuminance | lux |
soundLevelA | float | A-weighted sound level | dBA |
rssi | int | Radio signal strength | dBm |
batteryPercentage | int | Battery level | % |
pressureDifference | float | Pressure difference | Pa |
sensorUnits | object | Units used for each sensor in this payload | — |
ratings | object | Health ratings per sensor (GOOD, FAIR, or POOR) | — |
deviceName | string | Human-readable device name | — |
locationName | string | Human-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
| Field | Type | Description |
|---|---|---|
serialNumber | string | Hub serial number |
recorded | ISO 8601 | Timestamp of status update |
connectionType | string/null | "ethernet" or "cellular" (null if unknown) |
lastSeenDevices | string[] | Serial numbers of connected devices |
devices | object | Map of serial number to device info |
devices[].lastSeen | ISO 8601 | When device last communicated with hub |
devices[].rssi | int | Signal strength to hub (dBm) |
devices[].type | string | Device type identifier |
devices[].productName | string | Human-readable product name |
deviceName | string | Human-readable hub name |
locationName | string | Human-readable location name |
Delivery behavior
| Property | Details |
|---|---|
| QoS | 0 (at-most-once) — messages are fire-and-forget with no delivery guarantee |
| Format | Single-line JSON, UTF-8 encoded |
| Publishing | Each sensor reading is published as a separate MQTT message |
| Connections | Airthings maintains long-lived persistent connections to your broker and reconnects automatically if the connection drops or configuration changes |
Updated 3 days ago