Ventilation based on Co2 levels


There’s a ventilation system in our house that’s running 24/7. This ensures that there’s always enough fresh air in the house. One of the problems with the system is that it sucks warm air from the house and that the new cold air has to be heated again. That’s why i thought of a solution. Limit the time the ventilation is running while making sure there’s enough fresh air when needed.

My setup:

Ventilation: Storkair comfofan CMF 14T
Sensors: 3 Wemos D1 with MH-Z19 Co2 sensors
Switch: Sonoff with Tasmota firmware (flashed using OTA mechanism)

I monitor Co2 in three rooms in the house. My trigger runs every 10 minutes. When the ppm in one of the rooms is higher than 600, and the ventilation is off, the ventilation is switched on. When the ppm in all the rooms are lower than 600 and the ventilation is on, the ventilation is switched off.

Thoughts i have/had:

I monitor humidity too because humidity is one of the reasons 24/7 ventilation is installed in dutch houses to prevent the humidity becoming too high (and thus increasing the chance of getting mold). In our house the humidity is always too low because we have a wooden floor with floor heating. We’re currently run a humidifier to make sure that the humidity is high enough. Switching off the ventilation helps increasing the humidity.

When we’re at home, the ppm in one of the rooms is always higher than 600 so the ventilation runs always when we’re at home. I’ll monitor and maybe change the limit.

Maybe i should run the ventilation at least one hour a day when we’re not home.


Changed the ventilation system so here’s an update.

I found out that the Storkair comfofan CMF 14T uses 35 Watt and it will use a lot of energy because it’s on very often (previously 24 hours a day, 365 days a year). That’s why i bought an Itho CVE ECO RFT. The Itho uses DC instead of alternating current and only uses 5 Watt keeping same airflow. This will save me 40 euros a year.

An added bonus is that you can control it with a remote and you can get the current speed (low, medium, high).

The remotes are pretty expensive but you can use an ESP8266 and CC1101 868Mhz transmitter to control the fan.

I used this code for ESPEasy on my Wemos D1 Mini:

after reading DIY: Itho ventilatie aansturen via 868Mhz transmitter (dutch) on


Great! Ordered a Wemos and c1101 myself and will try it soon


Let keep the experience in the original thread in home-assistant:


Do you think its possible to use this solution on this (see page 6):

Or if its possible to control voltage with Sonoff?


I think you can put the Sonoff between number 4 and 3 (from figure 9). It’s an on/off solution. Not a variable speed solution.


Ok… i will test it.
Thanks for info :slight_smile:


Hi @nldroid. Do you have any tutorial on how to connect Wemos D1 with MH-Z19 CO2 sensor?


You can find info about the pin layout here:"CO2_Sensor_MH-Z19"

Function: Pin MH-Z19 ESP8266
VCC 6 5V
RX 2 1st GPIO specified in Device-settings
TX 3 2nd GPIO specified in Device-settings