✨ Improvement

  • Virus risk have now been completely migrated to the new webhook system. User will no longer receive data from the old webhook system.

📝 Documentation

  • We have update the documentation of Webhook Event Types with the latest changes regarding virus risk.
  • We have update the documentation of Webhook FAQ to answer how you can distinguish between payload coming from the old and new system.

🚀 Feature Release

Occupancy is now available publicly to all webhook users.

Occupancy can be enabled in webhook by adding occupancy-sample-feed when create/modify a webhook in the dashboard or the API

Below is an example payload of the occupancy sample feed.
Note that null values will not be encoded into the payload:

{
  "id": "d7254d54-0d83-4b86-a927-895231426a67",
  "type": "airthings-webhook-cloudevent-occupancy-sample-feed",
  "source": "https://dashboard.airthings.com/integrations/webhooks/9a7c4f92-340a-4414-8175-2d09966931cc?version=v2",
  "dataContentType": "application/json",
  "labels": {},
  "data": [
    {
      "serialNumber": "2930000000",
      "measurementSystem": "METRIC",
      "recorded": "2023-06-28T12:25",
      "occupantsUpper": 0, // can be null
      "occupants": 0,
      "occupantsLower": 0, // can be null
      "sensorUnits": {
        "occupants": "occ"
      }
    }
  ],
  "time": "2023-06-28T12:30:08.463483",
  "specVersion": "0.2"
}

✨ Improvements

We added support for using the Airthings MQTT clientId as the MQTT client ID when connecting to our MQTT broker. From now, it is possible to connect via generated Airthings MQTT client ID instead of client name.
The format of such client id is 00000000-0000-0000-0000-0000000000.

Using this ID is a preferred to avoid issues due to typos, etc. We plan to eventually deprecate connecting via client name.

To be able to use the client ID to connect for an existing MQTT client, the client itself has to be updated. The simplest way to do this is by clicking "Save" on the client after you've opened it in the Dashboard to copy the client ID. New clients will automatically be able to use the client ID to authenticate with the MQTT broker.

✨ Improvements

We changed the name of all our Airthings for Business devices a while ago, but we didn't replace the value of deviceType in responses from the API, to avoid breaking any existing integrations.

To keep supporting integrations that depends on the value of deviceType, we've added productName to any responses where deviceType is present, where the value will contain the current official name of the device.

Example response from get device endpoint:

GET /devices/{serialNumber}
{
    "id": "2930000000",
    "deviceType": "WAVE_PLUS",
    "productName": "Space Plus",
    "sensors": [
        "radonShortTermAvg",
        "temp",
        "humidity",
        "pressure",
        "co2",
        "voc",
        "light",
        "virusRisk"
    ],
    "segment": {
        "id": "00000000-0000-0000-0000-0000000000",
        "name": "Device Name",
        "started": "2019-12-11T14:31:33",
        "active": true
    },
    "location": {
        "id": "00000000-0000-0000-0000-0000000000",
        "name": "Location Name"
    }
}

✨ Improvements

accountId is added in replacement for userGroupId in query parameter of all endpoints.
Consider using accountId instead of userGroupId in your requests.

✨ Improvements

We are introducing the concept of "accounts" in place of "organizations" and "user groups" to make it simpler for clients to access our data.

As part of this update, a new endpoint is added for users to get their accounts information. The payload contains account ID and name:

GET /accounts
{
  "id": "95cf8d10-fd0d-47c4-bb48-11c01e36060e",
  "name": "An account"
}

✨ Improvements

sensorUnits is now removed from the request to create webhook.

We are in progress of improving the usage of sensor units in our webhook service. This field is therefore temporary removed from the request for creating webhook and will be added again in a future release.

✨ Improvements

There's a limit to the size of a response from our API, so to avoid breaking that limit, we've added pagination to the /devices endpoint.

The limit to number of devices returned from the request can be defined by using the limit parameter, with a maximum of 5 000 devices per page. If the parameter is not set, and there are more than 5 000 devices in the account, the API will provide a 400 Bad Request response and let you know that pagination should be used for the request.

The response from the /devices endpoint with pagination enabled will return the offset used to retrieve the next page, as well as the total amount of devices in the account.

Example response from GET /devices?limit=1&offset=50 :

{
    "devices": [
        {
            "id": "2930000000",
            "deviceType": "WAVE_PLUS",
            "sensors": [
                "radonShortTermAvg",
                "temp",
                "humidity",
                "pressure",
                "co2",
                "voc",
                "light",
                "virusRisk"
            ],
            "segment": {
                "id": "00000000-0000-0000-0000-0000000000",
                "name": "Device Name",
                "started": "2021-07-09T14:00:06",
                "active": true
            },
            "location": {
                "id": "00000000-0000-0000-0000-0000000000",
                "name": "Location Name"
            }
        }
    ],
    "limit": 1,
    "offset": 51,
    "total": 554
}

✨ Improvements

The response from the /devices and /segments endpoints can be used to identify when devices have been added or removed from accounts, but for accounts with a lot of registered devices, the response from these endpoints can become quite large. Parameters have been added to both these endpoints to help reduce the size of the response in case they are being used for this purpose.

segmentStartedAfter has been added as a parameter to the /devices and /segments endpoints, and will return all devices/segments registered/started after the specified time.

segmentEndedAfter has been added as a parameter to the /segment endpoint, and will return all segments ended after the specified time.

🚀 Feature release

Released the MQTT service as an integration option to complement our already existing RESTful API and Webhooks. Head over to the MQTT documentation to learn how you can get started setting up your MQTT client and subscribe to Airthings data.