Getting started

How to get started using Airthings MQTT

It's necessary to create Airthings MQTT client with its ID and certificate. You can either get a certificate and a private key from us or upload a self-signed certificate to authorize your client.

For the purpose of demonstration, MQTT explorer will be used to connect and subscribe to the MQTT broker.

Requirements

  • Access to an Airthings for Business account and its accountId
  • An onboarded, online device within the account

Create Airthings MQTT client

  1. Navigate to MQTT Integration in dashboard

  2. Create a client

  3. Download/upload a certificate to activate the client. Uploading a certificate only allow file types of .cert
    and .pem

  4. Add the location(s) you want the client to subscribe to

After a client is created, you are now ready to connect and receive data from us.

Connect to Airthings MQTT Broker

Use the following connection details:

FieldValue
Protocolmqtts or mqtt with Use TLS/SSL option
Hostmqtt.airthings.com
Port8883
Client IDAirthings MQTT client ID, e.g. 00000000-0000-0000-0000-0000000000
CA FileDownload this file
Certificate FileUse -cert.pem you downloaded/uploaded from/to Airthings dashboard
Key FileUse -key.pem you downloaded/uploaded from/to Airthings dashboard

Note: Airthings MQTT does not use username and password

Here is an example using MQTT explorer:

Subscribe to Device Data

A wildcard-subscription can be made to the topic {accountId}/# to receive the first samples via MQTT.
See Topics to read more about all available topics.

Here is an example of a subscription to data from all accessible locations in the account using MQTT explorer: