CO2 Sensors that work with Openhab

I’m looking for a simple plug and play CO2 sensor that will work with Openhab. It must be able to be used in a high humidity condition. I have been looking at using a MH-Z19 CO2 Sensor with an Arduino and ESP8266, communicating data back to Openhab to control a relay and fan (possibly via MQTT). I have the fan relay part figured out. I could even go directly from a raspberry pi to the sensor hardwired if need be. I have that all in place all ready.

If at all possible I would like to keep things simple.

Any ideas here are appreciated!

Thanks!!

Joe

1 Like

I use the indoor module from the netatmo weather station.

It’s probably overkill for your needs, but it does come with other handy metrics (humidity, noise level, temp, pressure) and it does meet your preference for simplicity. The pairing with OH has been very reliable (about 4 years and counting)

3 Likes

Nice find!

Awesome find!! Thanks so much for sharing! That’s why I love the Openhab Community!

To be frank it isn’t CO2 but VOC. Then again, that’s usually a better measure for air quality to look after.

I’m looking at their products right now. It looks like they have some eCO2 sensors. I"m going to reach out to them and see what they offer. I believe this should work. I need CO2 or equivalent CO2 levels. This sensor should work. Either way, this is a great find and I think it should help out a lot of us looking for a solution like this.

I have tested several sensors, the CCS801, the MICS-VZ-89TE and the MH-Z19, connected to an ESP8286 module running ESPEasy. All are working fine, I just had problem with the CCS801 because I did not proceed with the burn-in procedure properly.

I prefer the MICS-VZ-89TE as it is working with the I2C bus, that can be also directly connected to a Raspberry Pi. I bought 5 of those modules through Aliexpress.

1 Like

Thank you for the reply! I’ll check the MICS-VZ-89TE out as well.

Do you have any code examples?

I have code example for the Raspberry Pi and for the ESP8266/32 as module for the ESP Easy framework I can send you directly.

ehm, or you post it here for others to see. :stuck_out_tongue:

I have put some examples for the MICS-VZ-89TE here: https://github.com/iot6466/CO2-Sensors

Here the things:

   Thing topic rbpt2 "mqtt-rbpt-2" {
            Type number : CO2         "CO2"         [ stateTopic="/rbpt-2/VZ89/CO2" ]
            Type number : VOC         "VOC"         [ stateTopic="/rbpt-2/VZ89/VOC" ]
    }
   Thing topic wemos1 "mqtt-wemos-1" {
            Type number : CO2         "CO2"         [ stateTopic="/wemos-1/VZ89/CO2" ]
            Type number : VOC         "VOC"         [ stateTopic="/wemos-1/VZ89/VOC" ]
            Type string : LWT         "LWT"         [ stateTopic="/wemos-1/status/LWT" ]
    }

and the items:

Number VOCBuro               "VOC   Buro [%.2f ]"	            		    (gDatalog,gMonitor)		{ channel="mqtt:topic:mosquitto:wemos1:VOC" }
Number CO2Buro               "CO2   Buro [%.2f ]"	            		    (gDatalog,gMonitor)		{ channel="mqtt:topic:mosquitto:wemos1:CO2" }
String LWTBuro    			 "LWT   Buro [%s]"                                                      { channel="mqtt:topic:mosquitto:wemos1:LWT" }

Number CO2Wozi               "CO2   Wozi [%.2f ]"	            		    (gDatalog,gMonitor)		{ channel="mqtt:topic:mosquitto:rbpt2:CO2", expire="11m" }
Number VOCWozi               "VOC   Wozi [%.2f ]"	            		    (gDatalog,gMonitor)		{ channel="mqtt:topic:mosquitto:rbpt2:VOC" }
3 Likes

I am working since nearly 1y successfully with OH and am also interested in such CO2 sensors to extend my possibilities. This connection RPI/ESP8266/MICS-VZ-89TE needs advanced knowledge with soldering and programming as far as I understood, right? So this USB-stick seems to be the better out-of-the-box solution - but this is sold out :frowning:

Does anyone have a step by step description for the integration of MICS-VZ-89TE?

Thanks!

1 Like

I am using this one: https://www.amazon.de/gp/product/B01EN3M0YS/

It is connected to a RPI, running a Python script that queries the sensor every X seconds and uses the openHAB REST API to report the values.

Script:

1 Like

I would be curious how “correct” those $10 USB Sticks are, compared to a solution like this: https://www.air-q.com/

@sidamos: Did you do some comparisons?

No, I did not do comparisons myself. But I read some online review that said that the sensor, that I got from Amazon, is pretty OK.

Is there any chance of getting a little more detailed explanation how to deal with a MICS-VZ-89TE in combination with a esp8285?

at best as an soldered extension to a single channel sonof relais :wink:

that would be wonderful :slight_smile:

I have the MICS-VZ-89TE running on the latest ESPEasy (as of 20-02-21), with @jclugeon’s plugin.

For those who don’t know how to compile this plugin, I have the file here:

https://cloud.hijnn.net/nextcloud/index.php/s/7KfZWRJE8H3WR8o

After 4 days of usage these are the results:

Green is the CO2 measured, blue the VOC.

Orange is a MH19-sensor in my bedroom.

After powering up the sensor it takes a while before the CO2 is measured, until then it stays at 400. There are some “incorrect” readings, but overall the sensor is OK to do some basic ventilation automation.

I have used with good success the sensair S8 together with ESPEASY. I tried before with CCS811 sensors, but found these gave some very strange data frequently.

FYI nice comparison between the 2 sensors. Comparison of CO2 sensors MH-Z19B vs Senseair S8 - eMariete
I remember there is another site that has comparisons of 4-5 different sensors, but could not 123 find it back.

1 Like

I use Awair Element to monitor temp, humidity, co2, pm2.5, voc. It seems to be sensitive, accurate, and stable as far as I can tell. Fresh air co2 =400pm. Detects the other half with her creams and potions and quickly detects co2 rise when someone enters the room. It’s not cheap!! It has a phone app and API possibilities. It calibrates when the room is ventilated and has built-in fan to force air over the sensors. The fan is a bit noisy for bedroom use and sensitive ears. Mains powered, no battery

Here is the write-up I made on how to get the data into openhab and Grafana