ebaauw / homebridge-deconz

Homebridge plugin for deCONZ
Apache License 2.0
135 stars 6 forks source link

VINDSTYRKA - VOC Density - where does it come from? #207

Closed tomtefuchs closed 5 months ago

tomtefuchs commented 6 months ago

Hi Erik,

I am just exploring the relativly new sensor from the IKEA smarthome collection - VINDSTRYKA. I am using it via deconz/conbee II and homebridge-deconz.

I am also reading a lot about the internal sensor54 and his possibilities and output values. In my homebridge logs the deconz plugin constantly monitoring the value of "VOC Densitiy" - eg

[1/14/2024, 1:05:37 PM] [deCONZ] ParticulateMatter 20: VOC Density: set to 1869 µg/m³ (from 2239 µg/m³)

Where does it come from? - all datasheets just mentioning the TVOC index - something between 1-500 ppm(?) Is there a way to capture this value eg for storing in a datebase?

Any background infos very appreciated! Thanks! Thomas

ebaauw commented 6 months ago

See https://github.com/dresden-elektronik/deconz-rest-plugin/pull/7297

tomtefuchs commented 6 months ago

ok. read https://github.com/dresden-elektronik/deconz-rest-plugin/pull/7297 a few times. Still can not figure out where the values in the log is coming from - even in the phoscon/pwa/debug-api.html I don't get any value thats close to the µg/m³ values.

PM 2.5 Density - Homebridge log:

[1/15/2024, 7:30:54 PM] [deCONZ] ParticulateMatter 20: VOC Density: set to 1010 µg/m³ (from 987 µg/m³)

PM 2.5 Density - deconz api:

  ```
          {
"capabilities": {
    "measured_value": {
        "max": 999,
        "min": 0,
        "quantity": "density",
        "substance": "PM2.5",
        "unit": "ug/m^3"
    }
},
"config": {
    "on": true,
    "reachable": true
},
"ep": 1,
"etag": "058684851de5dffa10a613d6cc4cb8a6",
"lastannounced": null,
"lastseen": "2024-01-15T18:30Z",
"manufacturername": "IKEA of Sweden",
"modelid": "VINDSTYRKA",
"name": "Luftqualität1",
"productid": "E2112",
"state": {
    "airquality": "excellent",
    "lastupdated": "2024-01-15T18:30:07.319",
    "measured_value": 4,
    "pm2_5": 4
},
"swversion": "1.0.11",
"type": "ZHAParticulateMatter",
"uniqueid": "a4:6d:d4:ff:fe:50:d0:f7-01-042a"

}

ebaauw commented 6 months ago

PM 2.5 Density - Homebridge log

No, that’s the VOC density.

tomtefuchs commented 6 months ago

yes, that is what I am questioning - where is the "VOC density" (value eg "1010 ug/m3") in that homebridge log coming from?? The deconz API is not offering anything that is described as "VOC density" - no data at all - even when I connect to the websocket via node-red and reading all data. The only response that I am getting is the one above - mixing up "PM2.5" substance with quantity "densitiy" and unit as "ug/m3" and values in state giving "pm2_5" correctly as as "ppm" value (eg 4) - makes no sense.

Might it be a problem, that I am using deconz gateway version 2.25.1 ?! But still where eg is the "1010 ug/m3" coming from... is it somehow calculated homebridge-deconz?

ebaauw commented 6 months ago

deCONZ exposes the VINDSTYRKA using four resources: ZHATemperature, ZHAHumidity, ZHAParticulateMatter, and ZHAAirQuality. The latter exposes VOC level (in ppm, computed from the index reported by the sensor), which Homebridge deCONZ translates to VOC density (by multiplying it by 4.57).

tomtefuchs commented 6 months ago

thanks a lot - this was the missing information!!

I was so afraid of having a "VOC Problem" - with values of the VOC Density above 10.000 µg/m³ and even more I am far above every govermental defined critical threshold (< 300 µg/m³ is ok for example) !! But I do not think that this is really a problem, because the sensor itself and the chain of value translations seem to be scientificly weak...

to sum it up:

IKEA VINDSTYRKA delivers a so called VOC Index defined from the manufacturer of the internal sensor SEN54 - (https://sensirion.com/media/documents/02232963/6294E043/Info_Note_VOC_Index.pdf)

This value than in deconz is converted into a tVOC value measured in ppb by taking a "conversion table" of a different sensor manufacturer (but I am not really sure if they may be using the same sensors?! - both swiss companies - but in a way how they describe their indizes they seem to have a totally different index-building algorithm) (https://learn.kaiterra.com/en/resources/understanding-tvoc-volatile-organic-compounds)

At the end in homebridge-deconz - to match it into homekit VOC density - it is converted again by a commonly used factor of 4.57 from ppb to µg/m³ (https://github.com/simont77/fakegato-history/issues/107)

For me the big ??? is in the 2nd conversion happening in deconz. But nevertheless these sensors can only show trends in the actual airquality. May be it's to ambitious to think that these sensors are actually showing you real pollutions of formaldehyd etc. - even when compannies like Dyson claim that ther sensors can do that and also their air purifiers can "clean" he air ;)

tomtefuchs commented 6 months ago

From the manufacturer of the sensor I found a interesting paper to convert directly from the VOC Index to the VOC density - https://sensirion.com/media/documents/4B4D0E67/6436C169/GAS_AN_SGP4x_BuildingStandards_D1.pdf

Putting in the range of the index 1-500 lead into VOC density values between 25 and 6.221 µg/m³ - that makes more sense to me...

Is the "raw" VOX Index value available & accessable somewhere in deconz?

ebaauw commented 5 months ago

Yes, in the GUI. It’s not exposed by the APi, though.