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.
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.
accountId is added in replacement for userGroupId in query parameter of all endpoints.
Consider using accountId instead of userGroupId in your requests.
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.
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 :
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.
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.