[example] Indoor Air Quality text sensor using CCS811 sensor

Ok ivf got it working. I had to enable auto discovery on HA and on the esp8266 Sonoff-Tasmota.
by entering “SetOption19 1” in the console. Now items where discovered in HA.
You also need to keep the “SetOption19” on. unless the entity s are removed

What sensors did you all settle on in the end? What are your recommendations?

Eventually I decided to use a MHZ19 sensor instead of the CCS811. It seems to measure more accurate CO2 levels however it does not measure TVOC levels. Other posts I read online also seem to recommend the MHZ19 sensor for CO2.

1 Like

First of all Thanks for sharing great ideas and projects. i am trying to do one of my own similir like what Bouke_Regnerus did. I got SHX30D working but when I am trying to setup CCS811 with ESPhome I always get the error “Communication failed! Is the sensor connected?” and when I try with the same connection on Audrino it work and give me values in serial monitor.
Any idea?

I’m afraid I can not help you without any logs. You could try to put the logger component in debug mode and see if the I2C component actually finds the sensor or not.

Sorry but I have no experience with ESPHome. But I would like to try soon.

What pins are you using for i2c : sda and sca?

Because the one given on the sensor page read as D0 and D1, didn’t work for me.
Try with the ones on i2c page of esphome sca as D1 and sda as D2 (this is for D1 mini).

I was about to start the exact same thing with the MH-Z19, with the addition of a display. Would you mind sharing your configuration so far? Thanks!

I tried the code in the beginning of this topic, but I’m not getting any data from the sensor or the board. Could someone tell me what pins to connect on the CCS811 and HDC1080 sensor (VCC, GND, SCL, SDA, WAK, INT, RST, ADD) to the board? And what numbers to fill in in the code after sda en scl?

Did you see in the logs if at least one sensor have been found?
Only Vcc, GND, SCL and SDA are needed
The pins for SCL and SDA are up to you, they depend on what MCU you’re using. With ESPHome you only have to choose 2 free pins

I’m getting this readings, it’s kind of weird that are exactly the same graphs, isn’t it?
Do you guys see the same with your sensors? (CCS811)
image

Hello, i have CSS811 and I have this readings too. It is because CCS811 doesn’t measure eCO2 value. CCS811 measure TVOC only. eCO2 is calculated from TVOC. So this is only estimation based on some expected number of person in room and expected production of CO2 by this persons. It is not accurate, eCO2 readings are almost unusable.

Yes, I read about it some days ago. So the valuable reading is TVOC.
Now, I see different versions of Baseline calibration, what are your experiencies/recommendations?
I did the burn-in, and later tested some days, but even after 2 or 3 hours the baseline keeps changing

I just started to using CCS811 few days ago. For now I use it only with arduino, not with home assistant. I am unable to read baseline value with current library. But my readings are too high. I don’t know if it will change over time but it is running for more than 48 hours now. I need to switch to different library to be able read baseline and set it after reset of microcontroller.

So i changed to sparkfun library to be able read and restore baseline. Now my TVOC and eCO2 readings are lower than before. Baseline jumps during the day from 4000 to 60000 (in decimal units) and i don’t see any correlation to TVOC value. But it seems strange.

Yep, for what I´ve read, I understood that the baseline will estabilize after a period, but it doesn´t

I have CCS811 and SGP30, only problems with esphome: weird readings, big jumps to 6000-not realistic, disconnection, not starting HA if sensor is disconnecter or no wifi,…

Then I found that tasmota supports nodemcu and these sensors. I had to compile for CCS811 to change arduino library address from 0x5A to 0x5B and for SGP30 update arduino library to 1.3.
Normal readings, stable and no baseline problems with tasmota.

can you share the configurations for both of those sensors on tasmota?

For tasmota just use tasmota-sensors.bin and these settings, I have also dht22 connected:

That’s easy. So using the tasmota-sensors.bin had all of the required libraries and didn’t require a recompile?