Being a Krakow citizen, I know the struggle of breathing during the winter time.
People burning trashes in their tiled stoves in the city is one of main reasons why we have to deal with air pollution.
The first time I heard of Air quality index was when I moved to Krakow.
I was thinking about extending my home automation system with a feature that would warn me each time the air quality is bad.
After some online research I found AQIcn.org service that seemed perfect to my needs.
It has an open API, is fairly well docummented and needs just my e-mail address to get me started.
Shortly after I played around with the API, I’ve submitted a tutorial on openHAB community forum showing how to utilize the AQI data in the home automation setup.
But that wasn’t enough. The API was so powerful that I planned it to serve as a separate binding for openHAB!
With some trials and errors, reading through the openHAB Coding Guidelines and an amazing support from other openHAB developers, I’ve managed to submit my first pull request to the
Here’s the latest AirQuality binding source coude available in the openHAB repository.
So now my home automation system contains a set of rules that utilizes the
AQI value in my area.
I’m tracking the AirQuality every hour. Here you can see the Grafana chart showing the AQI from last two months in Krakow/Skawina:
For the automation I wrote a simple rule that would change my Xiaomi Gateway light color whenever AQI value changes:
Check out the documentation of AirQuality binding that’ll hopefully get you started.