Page 4 of 10

Re: ESP8266 Air quality sensor

Posted: Sunday 17 December 2017 22:15
by jvdz
joostnl wrote: Sunday 17 December 2017 21:38 Thanks for al your hard work! Can you supply a photo from your hardware set up? What kind of power supply and case are you using?
I still have to work on the encasing and want to make something myself, so currently have all still out in the open except for the MHZ19b, for which I've made a cardboard little box with holes in the side to left the airflow in but still protect it against light influence.
So not too much to show for yet, but will make some when I have the finish product. ;)
The Power supply is this one: https://nl.aliexpress.com/item/1-stks-h ... 55300.html

Jos

Re: ESP8266 Air quality sensor

Posted: Sunday 17 December 2017 23:21
by nixalsschrott
jvdz wrote: Sunday 17 December 2017 22:07 @nixalsschrott,
Is the MHZ19 working now for you as you post seems inclusive for me or is the Bold part added later and I should stop reading there? :D

The Bmp180 & DHT22 are connected as described in this webpage: https://diyprojects.io/esp-easydht22bmp ... -barometer
....
Dear Jos,

yes, MHZ19B is running and also delivering values. Seems OK now. Also BMP180 is running, collecting values, but since there is no corresponding virtual sensor in Domoticz I cannot visualize the values there. Only have temp, temp & huminity and temp & huminity & barometer. Even if selecting the last one, the values don‘t show in dashboard.

Re: ESP8266 Air quality sensor

Posted: Sunday 17 December 2017 23:24
by jvdz
I am using a dummy "Temp + Baro" device to receive the information from the BMP180.

Jos

Re: ESP8266 Air quality sensor

Posted: Monday 18 December 2017 22:36
by nixalsschrott
Dear Jos,

Everything up and running now. All sensors collecting values and deliver values to Domoticz virtual switches accordingly.
From my point of view a very cheap way to get a sensor for co2 air condition inclusive temp, huminity and baro. Great.
Therefore thanks a lot for support and description.

Kind regards and a happy XMAS.

Re: ESP8266 Air quality sensor

Posted: Tuesday 19 December 2017 0:01
by jvdz
You're welcome und Fröhliche Weihnachten to you too!

Jos

Re: ESP8266 Air quality sensor

Posted: Wednesday 20 December 2017 17:08
by nixalsschrott
By the way - does the sensor need calibration e.g. outdoors with the abc function on?
Is it possible simply going out and activate abc for a short time. Indoors deactivate abc again or deactivate already outside?
How to do it best?

Re: ESP8266 Air quality sensor

Posted: Wednesday 20 December 2017 17:25
by jvdz
I have ran it with ABC disabled and now run it with ABC enabled for weeks as the air refreshes during the night to a "standard" level.
So, when I understand it correctly, with ABC enabled, the calibration is done regularly and there is no need to do this outside.
Main purpose for my usage is not to do exact science with the value but really to activate the central ventilation system and set it to LOW/MEDIUM/HIGH depending on the PPM level.

Jos

Re: ESP8266 Air quality sensor

Posted: Wednesday 27 December 2017 12:05
by nixalsschrott
Dear all,

regarding the calibration from my testing it is also possible to switch on the ABC normal for e.g. 24 to 48 hours, best case nobody is at home during that time. If the ventilation was very good before or inbetween, then the lowest values will be adjusted to 395 ppm. Afterwards it is possible to switch off ABC normal again. The calibration will not Switch back. Therefore you do not need to calibrate outside or with a special gas. It seems to be pretty reliable. We are using automatic ventilation system with heat recovery, where air inside a room is refreshed 2-3 times within 24 hours.

My graph is now looking like this:
AF3D89A6-7C94-43AC-BC34-8A1B63F4AFA2.png
AF3D89A6-7C94-43AC-BC34-8A1B63F4AFA2.png (81.66 KiB) Viewed 3896 times
Kind regards

Re: ESP8266 Air quality sensor

Posted: Tuesday 02 January 2018 22:53
by ThomasTelos
Hello Nixalschrott,
Ein Schönes Neujahr ;-)
I have the same error messages as you with my MHZ19.
I ordered a new one with no result.
I just followed all the steps in the instructions.
Also I changed the GPIO's in GPIO15 and GPIO13.
Using latest version ESP_Easy_v2.0.0-dev13_test_ESP8266_4096
Still no result ;-(
Can you, or an other one who read this mail please help me?

Regards, Thomas

Re: ESP8266 Air quality sensor

Posted: Wednesday 03 January 2018 8:17
by jvdz
Have you also double checked the wiring?

Jos

Re: ESP8266 Air quality sensor

Posted: Wednesday 03 January 2018 20:54
by ThomasTelos
Hello Jos,
Yes, that is why I used 2 different breadbords and 2 different mhz19.
Both test set ups gave the same error msge
My ESP are ESP32F on a flashable little board (from BG)

Re: ESP8266 Air quality sensor

Posted: Wednesday 03 January 2018 21:02
by ThomasTelos
Correction! Sorry
The tests are done with the ESP12F
(I am still waiting for the esp32 from China)
Thomas

Re: ESP8266 Air quality sensor

Posted: Wednesday 03 January 2018 21:21
by ThomasTelos
mhz19 Led is flashing

Re: ESP8266 Air quality sensor

Posted: Thursday 04 January 2018 8:26
by jvdz
The error you get means that it doesn't receive any data back from the MHZ19 after it has send the command for the current status.
So it should be either something with the GPIO settings ( Maybe wrong way around?) or the wiring unless you unit is broken.

Jos

Re: ESP8266 Air quality sensor

Posted: Thursday 04 January 2018 8:43
by nixalsschrott
Hi,

as you can see in my post before it seems that you are not using the correct and modified software version from jos.
Try flashing the correct version in MHZ19b branch.

https://github.com/jvanderzande/ESPEasy/tree/MHZ19b

Re: ESP8266 Air quality sensor

Posted: Thursday 04 January 2018 11:29
by jvdz
@nixalsschrott,
I think it should still show the correct values in the ESPEasy log for the MHZ19b. I made the separate version at the time since the b version wasn't supported (lack of s value) and also made some modifications to directly support the Domoticz integration without the need for an Rule.

Jos

Re: ESP8266 Air quality sensor

Posted: Wednesday 10 January 2018 19:25
by ThomasTelos
Mhz19 working now! I flashed a new ESP12 with only the Mhz19 connected.
(flash was latest Mega version)
Stupid beginners fault, I changed Tx and Rx didn’t see that all that time!
But….. I learned a lot about Domoticz and ESP with Letscontrolit flashing.
I have some other interesting projects to find out ;-) and some more interesting things to figure out and study.
I keep you informed when I find something “special” ánd have questions ;-)
One more question: the value U in the CO2 device is always zero? What is this U?

Re: ESP8266 Air quality sensor

Posted: Wednesday 10 January 2018 20:19
by jvdz
Good you got it working.
Don't really know but notices that the U value only changes when you have the ABC enabled.
The code contains:

Code: Select all

#define PLUGIN_VALUENAME3_049 "U"   // Undocumented, minimum measurement per time period?
Jos

Re: ESP8266 Air quality sensor

Posted: Thursday 18 January 2018 21:04
by Mads
Hey Jos.

Can you help me. Just got my mh-z19 sensor, and set it up with my esp226.
flashed the esp with espeasy 2.0 mega test from GitHub.

In the log I can see the sensor point out data, but I don't get the info in my Domoticz.

Log
2285034 : EVENT: co2#PPM=1320.00
2285053 : ACT : SendToHTTP 192.168.1.188,8080,/json.htm?param=udevice&type=command&idx=12&nvalue1320.00
2285170 : EVENT: co2#Temperature=28.00
2285260 : EVENT: co2#U=0.00
2286923 : WD : Uptime 38 ConnectFailures 0 FreeMem 20120
2295034 : MHZ19: PPM value: 1317 Temp/S/U values: 28/0/0.00
2295034 : EVENT: co2#PPM=1317.00
2295052 : ACT : SendToHTTP 192.168.1.188,8080,/json.htm?param=udevice&type=command&idx=12&nvalue1317.00
2295172 : EVENT: co2#Temperature=28.00
2295262 : EVENT: co2#U=0.00

domoticz hardware:
idx
12 Co2 Stuen Ja Dummy (Does nothing, use for virtual switches only) Opret virtuelle sensorer Deaktiveret

tryied to put in the rules, but that didn't help.

Re: ESP8266 Air quality sensor

Posted: Thursday 18 January 2018 21:09
by jvdz
Your rule is missing an equal sign after nvalue!
/json.htm?param=udevice&type=command&idx=12&nvalue=1320.00

Jos