Domoticz does not update ESPEasy MH-Z19B CO2 values

Everything about esp8266 and more.

Moderator: leecollings

Post Reply
User avatar
JHO01
Posts: 24
Joined: Wednesday 02 November 2016 13:59
Target OS: Raspberry Pi / ODroid
Domoticz version: Stable
Location: Netherlands
Contact:

Domoticz does not update ESPEasy MH-Z19B CO2 values

Post by JHO01 »

ESPeasy with MH-Z19B CO2 device is showing CO2 values, the virtual Domoticz device is being updated (timestamp is changing according to ESPEasy settings) but CO2 value remains zero.

Connecting to Domoticz via HTTP or MQTT, both give the same results :cry:
I have tried all the obvious, update, upgrade, reboot but so far no luck. What could be the problem?

Domoticz Version 4.9700, RPI
ESP Easy: mega-20180625 on Wemos D1 mini
Sensor 1: CO2: MH-Z19B
Sensor 2: CRTC 5000, connected to an incremental counter working flawless.
Of course I doubled, doubled checked the idx of the CO2 sensor (1951)

Logfile ESPEASY:
670659: Domoticz: Sensortype: 1 idx: 1926 values: 0
675668: MHZ19: PPM value: 350 Temp/S/U values: 32/0/0.00
675694: Domoticz: Sensortype: 6 idx: 1951 values: 350;32.0;0
680660: Domoticz: Sensortype: 1 idx: 1926 values: 0
685668: MHZ19: PPM value: 350 Temp/S/U values: 32/0/0.00
685691: Domoticz: Sensortype: 6 idx: 1951 values: 350;32.0;0
690661: Domoticz: Sensortype: 1 idx: 1926 values: 0
690702: WD : Uptime 12 ConnectFailures 0 FreeMem 19200
695658: MHZ19: PPM value: 350 Temp/S/U values: 32/0/0.00
695682: Domoticz: Sensortype: 6 idx: 1951 values: 350;32.0;0
700659: Domoticz: Sensortype: 1 idx: 1926 values: 0
705666: MHZ19: PPM value: 350 Temp/S/U values: 32/0/0.00
705690: Domoticz: Sensortype: 6 idx: 1951 values: 350;32.0;0
710662: Domoticz: Sensortype: 1 idx: 1926 values: 0
715668: MHZ19: PPM value: 350 Temp/S/U values: 32/0/0.00
715691: Domoticz: Sensortype: 6 idx: 1951 values: 350;32.0;0
720659: Domoticz: Sensortype: 1 idx: 1926 values: 0
720702: WD : Uptime 12 ConnectFailures 0 FreeMem 19200
725667: MHZ19: PPM value: 352 Temp/S/U values: 32/0/0.00
725690: Domoticz: Sensortype: 6 idx: 1951 values: 352;32.0;0

any ideas?
Screen Shot 2018-07-07 at 21.01.31.png
Screen Shot 2018-07-07 at 21.01.31.png (40.51 KiB) Viewed 4100 times
Screen Shot 2018-07-07 at 21.01.31.png
Screen Shot 2018-07-07 at 21.01.31.png (40.51 KiB) Viewed 4100 times
Screen Shot 2018-07-07 at 21.01.31.png
Screen Shot 2018-07-07 at 21.01.31.png (40.51 KiB) Viewed 4100 times
Attachments
Screen Shot 2018-07-07 at 20.55.02.png
Screen Shot 2018-07-07 at 20.55.02.png (23.98 KiB) Viewed 4099 times
Screen Shot 2018-07-07 at 21.00.20.png
Screen Shot 2018-07-07 at 21.00.20.png (65.5 KiB) Viewed 4099 times
RPI-3, Z-stick Gen5, RFlink, Zigbee2mqtt, 1-wire DS18B20, Fibaro switches, various RF-433 sockets, BMP018, Somfy, Wemos, Tradfri.
User avatar
jvdz
Posts: 2328
Joined: Tuesday 30 December 2014 19:25
Target OS: Raspberry Pi / ODroid
Domoticz version: 4.107
Location: Netherlands
Contact:

Re: Domoticz does not update ESPEasy MH-Z19B CO2 values

Post by jvdz »

When you are running the standard ESPEASY MHZ19 code and use HTTP to update domoticz, you need to make a rule to do the update as the ESPEASY device definition is a 3 value sensor, which sends the wrong information to domoticz.
In this topic i've explained my setup and also defined the rule required: http://www.domoticz.com/forum/viewtopic ... 20#p156773

Jos
New Garbage collection scripts: https://github.com/jvanderzande/GarbageCalendar
User avatar
JHO01
Posts: 24
Joined: Wednesday 02 November 2016 13:59
Target OS: Raspberry Pi / ODroid
Domoticz version: Stable
Location: Netherlands
Contact:

Re: Domoticz does not update ESPEasy MH-Z19B CO2 values

Post by JHO01 »

Thank you very much Jos, applied the following steps on the ESPEasy:

-Tools, advanced, check rules, Submit
-Devices, edit MH-Z19 sensor, memorize Name :D (in may case CO2), uncheck Send to Controller, Submit
-Rules: add

Code: Select all

on CO2#PPM do
 SendToHTTP,192.168.2.30,8080,/json.htm?param=udevice&type=command&idx=1951&nvalue=[CO2#PPM]
endon
Submit.
and the CO2 levels are showing up in Domoticz. Great!

Now we need some actions to get the CO2 level down :oops:
RPI-3, Z-stick Gen5, RFlink, Zigbee2mqtt, 1-wire DS18B20, Fibaro switches, various RF-433 sockets, BMP018, Somfy, Wemos, Tradfri.
User avatar
jvdz
Posts: 2328
Joined: Tuesday 30 December 2014 19:25
Target OS: Raspberry Pi / ODroid
Domoticz version: 4.107
Location: Netherlands
Contact:

Re: Domoticz does not update ESPEasy MH-Z19B CO2 values

Post by jvdz »

JHO01 wrote: Sunday 08 July 2018 10:45 Now we need some actions to get the CO2 level down :oops:
It is quite interesting to see the result of cooking (on gas) and more people in a room, what the does to the CO2 levels. :)

Jos
New Garbage collection scripts: https://github.com/jvanderzande/GarbageCalendar
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest