Topics

Topics available from MQTT

Note: Subscribing to a topic the MQTT client does not have access to leads to disconnection from the broker.

Samples

Used for receiving sensor data from devices.

Topics:

  • {accountId}/{locationId}/# (all samples in location)
  • {accountId}/{locationId}/devices/{serialNumber} (all samples for specific device)

... and in case your client has access to multiple locations:

  • {accountId}/# (all samples from locations to which the MQTT client has access)

See Concepts for guidance how to retrieve your accountId or a particular locationId.

Payload:

{
  "serialNumber": "2930046980",
  "sampleRecorded": "2023-07-04T11:25:31",
  // All fields below are nullable...
  "co2": 456, // carbon dioxide (ppm)
  "humidity": 43, // relative humidity (%)
  "light": 36, // relative light (%)
  "lux": 114, // light (lux)
  "radonShortTermAvg": 13,
  "temp": 24.33, // temperature (°C)
  "voc": 71, // volatile organic compounds (ppb)
  "pressure": 99166, // pressure (hPa)
  "pm1": 10, // particulate matter 1 µm (µg/m³)
  "pm25": 10, // particulate matter 2.5 µm (µg/m³)
  "soundLevel": 55, // sound level (dBA)
  "pressureDifference": null,
  "pm10": null,
}

Debugging Information

Used to receive events for a particular MQTT client, e.g. when a client connects to a broker or subscribes to a specific
topic.

Topics:

  • {mqttClientId}/# (information for a specific client)

Note: Airthings MQTT client can access only its client ID topic

Payload:

{
  "clientId": "00000000-0000-0000-0000-0000000000", // Airthings MQTT client ID
  "timestamp": 1688553899042,
  "eventType": "subscribed",
  "topics": [
    "00000000-0000-0000-0000-0000000000/#"
  ],
  "sessionIdentifier": "00000000-0000-0000-0000-000000000000",
  "principalIdentifier": "0000000000000000000000000000000000000000000000000000000000000000",
}