TLDR: I wrote a tiny personal project in Go to pull air quality data from an Awair Element device and store it in InfluxDB.

1

Earlier this year, I wanted to get a better understanding of my indoor air quality at home. I looked for a device that could measure CO2 + particulate matter + VOC, and that most importantly had a local API. I don’t want to rely on a vendor’s cloud service or app that might be discontinued in 6 months. I ended up buying an Awair Element which fit these requirements perfectly. The local API has to be enabled on the Awair Element. Awair has instructions on how to do that here.

While I consider myself far more of a network engineer than a software developer, the company I work work for now makes heavy use of Go - so I’ve been trying to use Go for some personal projects lately. This was another good opportunity, particularly to try to understand the hexagon design pattern better.

I wrote this small Go service to collect and store the measurements from the Awair Element device. It polls the Awair API on the sensor itself and stores the retrieved measurements in InfluxDB, where they can be easily monitored using other tools like Grafana.

GitHub Link