Live healthy – for 19,50 Euro

In todays homes, the quality of the air is very poor. Homes are getting more and more tight. Because we want so save energy and take care of the environment, we install windows that don’t allow air exchange when they’re closed. Sounds stupid, because windows should be tight, that’s what we want. But modern windows are that tight, that you could use it in a submarin.

Additionally we mount styrofoam or something similar to the outside walls. This combination makes you’re home a very efficient one, in terms of energy consumption. But in terms of air quality, you loose.

It is worth to monitor your air quality to be able to see if you need an air exchange. You can buy Netatmo, which you probably already heart of. But it is rather expensive (around 140 Euro). REHAU offers at Amazon a USB stick that is able to measure VOC -Volatile Organic Compound. So it could be CO2, but it could also be any gas that you don’t want to have at home. Like evaporations from new furniture, carpets or wall paint. A detailed list of all VOC the stick can measure can be looked at


Here is the link to Amazon. They sell it for 19.50 Euro.

For Windows they offer a piece of software, but not for linux. Therefore in the following I will describe how you can use the USB stick with Linux. I use it on my Raspberry Pi in combination with OpenHab. OpenHab logs the values to a MySQL database.

This little program helps you to read the VOC value from the stick with Linux:

[download id=”446″]


Before compiling, please make sure that libusb is installed. On Debian based systems you can use this command:

sudo apt-get install libusb-dev

Then, you are able to compile the C program with the following command:

gcc -o airsensor airsensor.c -lusb

Now you’re done and you can grab the VOC value:

pi@pimaster ~/airsensor/airsensor $ ./airsensor
 2015-12-20 17:10:47, VOC: 860, RESULT: OK

As I said, I use OpenHab to monitor and store the VOC values (every 30 min a VOC value will be collected by OpenHab and saved to a database). Here is the graph of OpenHab:


To extract the VOC, I use this little shell script, which is executed by OpenHab:


WERTE=$(sudo /home/pi/airsensor/airsensor/airsensor -o)
Stamp=$(date +%Y%m%d%H%M%S)
voc=$(echo $WERTE | awk '{$0=substr($4,1,length($4)-1); print $0}')

echo $voc

Or download the script here: [download id=”451″]

Next step for me would be to install a ventilation system. I am thinking about using a computer fan, connected to the GPIOs of my Raspberry Pi. When the VOC value is higher than a defined value, the Raspberry will turn on the fan. But so far I did not find a cheap & good air-air-heat-exchanger. If you have any ideas, please let me know!


Leave a Reply

Your email address will not be published. Required fields are marked *

The maximum upload file size: 128 MB. You can upload: image, audio, video, document, archive, other. Links to YouTube, Facebook, Twitter and other services inserted in the comment text will be automatically embedded. Drop files here