Plotting Air Quality Measurements from Aranet4 Sensor

After reading How I Mastered the Art of Ventilating My Home, I decided once again to pay more attention to the air quality in my rooms. To start, I needed a sensor to monitor temperature, humidity and CO2. In the past I used a Raspberry Pi and the BME680 sensor together with some Python scripts and an Influx database. This works, but it takes time to get it all working and to keep it working.

Also, what was missing back then was a way to read the current measurements from the sensor directly. There are, of course, ways to attach a display to the Raspberry Pi. But for now I wanted a simpler solution.

Ideally, the sensor should display measurements on a screen, keep a history of measurements in memory, and be open to reading this history from a computer.

After some research, I settled on a rather expensive sensor: the Aranet4. What convinced me to buy this sensor in addition to fulfilling my wishes was the E-Ink display and its simplicity in design. I do not like having LCD displays flashing at me everywhere in my home. E-Ink displays are just beautiful!

The Aranet4 is easily integrated into a Home Assistent setup via Bluetooth. But since I do not have an existing setup and did not want to run a Bluetooth receiver all the time, I decided on reading the history data from the sensor using my computer on occasion. For that, I am using a little command line tool that outputs a CSV file.

Once the measurements are on my computer, I use Gnuplot to plot them to SVG files. Graphs are created for different time Intervals: 12 hours, 24 hours, 7 days and 30 days.

CO2 level over 24 hours

Together with some convenience helper, such as Bluetooth toggle, I put everything into a simple shell script, which is run on a hourly basis via cron. The result are uploaded to my my website. Since the line plots are simple SVGs its easy to adjust the colors to work with this website and with dark mode.

There are a two more things left for me to do:

I might update this post once I address some of the points above.

Looking at the measurements over time, what really surprised me was how easily CO2 concentration spikes to above 1000 ppm once I am in my room and the window is closed. This has been particularly striking over the cold nights where my window in the bedrooms was closed. Once the window has been opened in the morning, the CO2 level drops immediately.

PS: There is an App to read and display the history data from the Aranet4 sensor, which might be already enough for many people.

Published: 2025-04-11 Last updated: 2025-04-18