Homey Community Forum

HomeyDuino CO2 sensor

Just for who might be interested.

I was already looking for a long time for a good CO2 meter but either they were too expensive or too unreliable. So finally I decided to create one myself with the help of Homeyduino. The sensor itself is from Senseair (S8, auto calibrating), a reliable company when it concerns these type of sensors. The sensor is connected (via UART) to a TTGO ESP32 with display so the CO2 value can also be read directly. When the CO2 value exceeds 1000 parts per million I will be notified by my Google Home.

I must admit the enclosure looks horrible but by the lack of some good tools and patience it became what it is. At least it works perfectly well.


Hey Lars,

Nice one! Could you give a little more information how you did this?

Thanks in advance,

Cool! I also planned to go that way, bought a senseair s8 sensor, but never put it together. Have now three Netatmo healthy home coaches as CO2-sensors which is connected through Homey to control my roof fan.

But now I can just copy your code, hehe?

Hi Wilfred,

The device was constructed with:

The code was flashed to the ESP32 with the Arduino IDE. The libraries used are: TFT_eSPI and HomeyDuino. The TTGO communicates via UART/Serial2 to the Senseair sensor. If you’re handy with Arduino programming and soldering you can easily do it yourself. Most of the code I just borrowed from some samples and adapted it for my own purpose.

The total costs were about 50 Euro which is not much compared to what is available on the market. The sensor was most expensive but I wouldn’t recommand cheap Chinese rubbisch. They are not very accurate, brake easily or are not auto calibrating. Maybe there are some good ones but I haven’t seen any.

With Homey Insights every measurement is logged which can be seen in some nice graphics. When the CO2 values become too high the ventilation system is switched on automatically which prevents me from hallucinating (only when I am not on other stimulants of course) and other nasty things.

If you want I can send you the C++ code.

Hi Lars,

This is unfortunately a little too complex for me.


You don’t feel like experimenting with the VOC-sensor BME680. Seems to be the best VOC sensor, but the issue seems to convert the resistance value you get to ppm.https://www.bosch-sensortec.com/bst/products/all_products/bme680