Page 1 of 1

air quality label in domoticz

Posted: Wednesday 28 February 2024 16:13
by remko2000
I measure the air quality in my living room via a sensor. The value is received on a dummy of the general, custom sensor type. This concerns a PPM value. Is there a possibility to translate this value into air quality, for example:
350 ppm healthy outside air level
600 ppm healthy indoor climate
800 ppm acceptable level
1000 ppm ventilation desired
1200 ppm ventilation required
2000 ppm negative health effect

So I create a separate dummy in which the ppm value of my sensor is translated into these types of labels?
How could I best do this or is there perhaps an example script or something similar available? I searched but couldn't find it.

Re: air quality label in domoticz

Posted: Wednesday 28 February 2024 16:44
by waltervl
How does the original ppm value is sent to Domoticz? As that same process could also fill the quality level sensor.

As there is already a special Air quality sensor https://www.domoticz.com/wiki/Dummy_for ... ir_quality that takes PPM and also has a quality indicator as text with the following rules:

Code: Select all

airquality < 700 status text: "Excellent"
airquality < 900 status text: "Good"
airquality < 1100 status text:"Fair"
airquality < 1600 status text: "Mediocre"
airquality > 1600 status text: "Bad"

There is also an Alert sensor (see the same wiki page) but that has only 4 levels (0=gray, 1=green, 2=yellow, 3=orange, 4=red) but you could have various airquality levels combined in 1

Re: air quality label in domoticz

Posted: Friday 01 March 2024 16:19
by remko2000
I tried a dummy of the typ 'airquality'. Somehow my values from my sensor MH Z19 (via a wemos d1 with esp easy) are not arriving at this dummy. My esp easy log says:
MHZ19: PPM value: 996 Temp/S/U values: 24/0/0.00
but this does not enter domoticz. This will be possible with a dummy of the general custom sensor type. What could be the cause of this? Possibly because the temperature and U value are also sent at the same time?
How can I solve this?

Re: air quality label in domoticz

Posted: Friday 01 March 2024 16:44
by waltervl
Yes it needs 1 value.

Code: Select all

/json.htm?type=command&param=udevice&idx=IDX&nvalue=PPM
IDX = id of your device (This number can be found in the devices tab in the column "IDX")
PPM = CO2-concentration


According topic https://www.domoticz.com/forum/viewtopi ... &start=160
You could add a EspEasy rule on your ESP (change the IP and port to your own Domoticz environment.:

Code: Select all

on MHZ19#PPM do
SendToHTTP,192.168.1.106,8080,/json.htm?param=udevice&type=command&idx=62&nvalue=[MHZ19#PPM]
endon

Re: air quality label in domoticz

Posted: Friday 01 March 2024 16:59
by jvdz
How did you configure the ESPEASY Device?
It has standardly 3 measurements, so it requires a rule to update domoticz properly.
I have shared this many moons ago:
https://www.domoticz.com/forum/viewtopi ... 30#p156230

Update just the PPM value:
https://www.domoticz.com/forum/viewtopi ... 73#p156773

Re: air quality label in domoticz

Posted: Saturday 02 March 2024 11:10
by remko2000
My problem was that I need a password/username when I use this rule so I used the modified esp easy bin (see the link in this tread) to solve this. It works fine now! Thx!