Docs
Airthings
Airthings offers devices used for radon and indoor air quality monitoring. We provide a custom endpoint which can be used together with their webhook integration.
Goal
The goal is to set up an integration between a Airthings device and Blockbax.
Prerequisites
- Blockbax project
- Access to the Airthings dashboard
Steps to connect a device
Before you can connect your device you will first need to setup an ‘Inbound Connector’ in Blockbax.
- Open the Blockbax web app and go to ‘Settings’ -> ‘Inbound Connectors’.
- Press the ‘+’ icon or ‘Create Inbound connector’ button.
- Select the Airthings template under ‘Airthings’ -> ‘Default’ and press ‘Save changes’.
- The ‘Endpoint’ will be needed later for the configuration on the Digital Matter side.
To set up the integration from the side of Airthings perform the following steps:
Login to the Airthings dashboard
Go to ‘Integrations’ -> ‘Webhooks’ and click on ‘New Webhook’, choose a name and configure the webhook according to the table below:
field value Url Your inbound connector endpoint that you noted during the preparation HTTP header key Authorization
HTTP header value Your Blockbax access key starting with ApiKey
Set ‘Enable’ to on.
The inbound connector will automatically map the data coming from Airthings to ingestion IDs. Below is a list of available metrics by their external ID:
Type | External ID |
---|---|
Number | radonShortTermAvg |
Number | humidity |
Number | temp |
Number | co2 |
Number | pressure |
Number | tvoc |
Number | light |
Number | rssi |
Number | batteryPercentage |
Number | virusRisk |
Number | mold |
You can test if everything works by opening the Blockbax web app, creating a subject type with the previously mentioned metric external IDs and a subject with the device serial number as the subject external ID.