Introduction

Introduction to MQTT Publisher integration from Airthings

Configure Airthings to publish sensor data and hub metadata directly to your own MQTT broker in real-time as JSON payloads. You configure a connection to your broker, and Airthings maintains a persistent connection, publishing data as it arrives from your devices.

Event types

MQTT Publisher supports two event types:

Event TypeTopic ValueDescription
Sample Feed (MQTT_SAMPLE_FEED)sampleReal-time sensor readings from devices — temperature, humidity, CO₂, radon, TVOC, pressure, PM1/PM2.5/PM10, light/lux, sound level, battery percentage, RSSI, with health ratings.
Hub Metadata Feed (MQTT_HUB_META_DATA_FEED)metadataHub status information — connected devices, last seen timestamps, signal strength, device types, connection type (Cellular/Ethernet).

Protocols

ProtocolPortEncryption
MQTT1883Unencrypted
MQTTS8883TLS encrypted

Authentication

Two authentication methods are available:

MethodProtocol SupportDetails
Basic Authentication (username/password)MQTT and MQTTSOptional for MQTT, required for MQTTS (if not using certificates)
Certificate-Based (mTLS with client cert, client key, CA cert)MQTTS onlyNot supported with MQTT protocol

For MQTTS connections, you must provide at least one authentication method (username/password or certificates). Both methods can be used together.

Customizable topics

Topic structure is configurable using template variables:

  • ${account_id} — Account ID
  • ${location_id} — Location ID
  • ${serial_number} — Device serial number
  • ${message_type}sample or metadata

Default template: ${account_id}/${location_id}/${serial_number}/${message_type}

See Topics for the full reference on topic templates and payload formats.

Subscription filtering

Control which data Airthings publishes to your broker:

  • Locations — Subscribe to all locations in your organization, or select specific locations
  • Event types — Filter by event type (MQTT_SAMPLE_FEED, MQTT_HUB_META_DATA_FEED, or both)

Configurable sensor units

Customize the units used in published payloads:

MeasurementOptions
Temperature°C / °F
PressurehPa / inHg
RadonBq/m³ / pCi/L
VOCppb / µg/m³
Lengthm / ft

Connection management

  • Persistent connections — Airthings maintains long-lived connections to your broker and reconnects automatically if the connection drops or if the configuration changes
  • QoS 0 (at-most-once delivery) — Messages are fire-and-forget. If you need to recover potentially lost data, use the API alongside MQTT Publisher
  • Test connection — Verify broker connectivity before going live using a dedicated test endpoint

Limits

  • Up to 10 MQTT configurations per organization

Next steps

  • See Getting Started to create your first MQTT Publisher configuration
  • See Topics to explore topic templates and payload formats