letscontrolit / ESPEasy

Easy MultiSensor device based on ESP8266/ESP32
http://www.espeasy.com
Other
3.22k stars 2.2k forks source link

Gases - CO2 MH-Z19 #3446

Open DangerD1024 opened 3 years ago

DangerD1024 commented 3 years ago

After powering on it shows zero values for a shrt time and sends that zeros to controller. It there any way to avoid sending zeroes to controller?

image

TD-er commented 3 years ago

Is it sent via a controller assigned to the task? Or do you send it via rules?

DangerD1024 commented 3 years ago

Just added controller here: image

TD-er commented 3 years ago

You don't even have the rules tab enabled, so it must then be sent via the task. Can you also show the controller setting of your task configuration? Also the set interval? And the communication statistics of the task? (nr. of successful/failed messages to/from the sensor)

DangerD1024 commented 3 years ago

Controller image Interval 10sec image

And the communication statistics of the task?

Where i can get that?

TD-er commented 3 years ago

Where i can get that?

You already gave those in the last screenshot. Checksum (pass/fail/reset)

They do look OK, as in there are not a lot of transmission errors.

What does look a bit tricky is the used GPIO pins. Probably not causing the symptoms you're describing in this issue, but they may prevent the ESP from booting and cause issues when flashing. (as GPIO-0 needs to be low to enter flash mode)

GPIO-0 must be high during boot and GPIO-15 must be low during boot. Both pins are now connected to a sensor, which may cause boot failured. So if possible, I suggest to at least use different pins for the MH-Z19.

TD-er commented 3 years ago

I labelled it as a bug, as it is possible to add a simple filter in this plugin to only consider a value valid if it is above 300-ish ppm (global CO2 level is already > 400 ppm, but it is possible to have a local concentration < 400 ppm)