kongo09 / philips-airpurifier-coap

💨 Philips AirPurifier custom component for Home Assistant. Supports local CoAP protocol.
156 stars 22 forks source link

Air Quality Index: Sensor or Configuraton #121

Closed Uwe1971R closed 4 months ago

Uwe1971R commented 5 months ago

For the AC3033/10 the HA integration shows the Air Quality Index in the Sensors group:

image

This value (4=Fair) never changed here - even if the air quality really was bad. So I was playing with the Philips App and it looks to me that this might not be a sensor, but a setting of "Air Quality Index Level" for causing a notification (of the app):

WhatsApp Bild 2024-02-04 um 11 52 47_7fe1d102 When I change the setting in the App, then it is updated in HA.

For the AMF870/15 I overlooked this so far, but it works in the same way.

<html xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:x="urn:schemas-microsoft-com:office:excel" xmlns="http://www.w3.org/TR/REC-html40">

"D0312C" | 10 | Indoor Air Quality Level | 1=Good, 4 = Fair, 7=Poor, 10 = Very Poor -- | -- | -- | --

Any change of the App-setting will change D0312C. This value will remain the same until it is changed in the app.

Maybe this should/could be corrected and added to both devices as a Configuration with a drop down menu and the name "Indoor Air Quality Notifcation Level". Or it could be completely removed as it only seems to be a setting for the notification of the Philips App and is not related to the functionallity of the purifiers.

kongo09 commented 5 months ago

Very interesting. But if there is a notification triggered, there should also be a sensor?

Uwe1971R commented 5 months ago

I had exactly the same idea. This is why I was searching around in the App if the Air Quality Index is visible anywhere and I couldn't only find this text-explanations below, but not a real value (e.g. from 1 to 10).

This is what is shown for the AC3033: "The air quality in the room is fair at this moment." WhatsApp Bild 2024-02-04 um 13 59 13_d2e6bed6

And that is the sensor overview of the AMF870: "The air quality is looking good at this moment." WhatsApp Bild 2024-02-04 um 14 03 01_557a8668

I also can nor find/see the air quality index (value) on the displays of the purifiers. So maybe this is not a sensor, but the air quality index is just calculated based on the data of the allergene, PM2.5 and Gas sensors. Or there is a sensor which is stored in a different register, which I could not identify so far. At the least the currently used registers seem to be the setting for the notofication level and not an indication for a measured or calculated value.

That could also explain why the value of the air quality index in HA is not changing regularly. image

The" 6 hours ago" that are shown there indicate the moment, when I changed the value vial the App last time.

Uwe1971R commented 4 months ago

Here is some data:

1) App iaql 2/12 App pm25 6 App tvoc 1 App Air Quality: good App Indoor Air Quality Level (Notfication): Very Poor (aqit 10?)

{"name": "Wohnzimmer", "type": "AC3033", "modelid": "AC3033/10", "MCUBoot": true, "swversion": "Ms3331", "language": "EN", "DeviceVersion": "3.3.1", "range": "Mar sME", "Runtime": 2137200, "rssi": -43, "wifilog": false, "free_memory": 45872, "W ifiVersion": "AWS_Philips_AIR@69.1", "ProductId": "9efe665a13c111e9bc680202495307 5e", "DeviceId": "2783de680c9b11ecb31b1ea1489bfd4d", "StatusType": "status", "Con nectType": "Online", "om": "1", "pwr": "1", "cl": false, "aqil": 10, "uil": "1", "uaset": "A", "mode": "M", "pm25": 6, "iaql": 2, "aqit": 10, "aqit_ext": 0, "tvoc ": 1, "ddp": "1", "rddp": "1", "err": 0, "fltt1": "A3", "fltt2": "none", "fltsts0 ": 594, "fltsts1": 2976, "fltsts2": 65535, "filna": "0", "filid": "0", "flttotal0 ": 720, "flttotal1": 4800, "flttotal2": 65535}

2) App iaql 2/12 App pm25 8 App tvoc 1 App Air Quality: good App Indoor Air Quality Level (Notfication): Fair (aqit 4?)

{"name": "Wohnzimmer", "type": "AC3033", "modelid": "AC3033/10", "MCUBoot": true, "swversion": "Ms3331", "language": "EN", "DeviceVersion": "3.3.1", "range": "Mar sME", "Runtime": 1741973, "rssi": -45, "wifilog": false, "free_memory": 43432, "W ifiVersion": "AWS_Philips_AIR@69.1", "ProductId": "9efe665a13c111e9bc680202495307 5e", "DeviceId": "2783de680c9b11ecb31b1ea1489bfd4d", "StatusType": "status", "Con nectType": "Online", "om": "1", "pwr": "1", "cl": false, "aqil": 10, "uil": "1", "uaset": "A", "mode": "M", "pm25": 8, "iaql": 2, "aqit": 4, "aqit_ext": 0, "tvoc" : 1, "ddp": "1", "rddp": "1", "err": 0, "fltt1": "A3", "fltt2": "none", "fltsts0" : 594, "fltsts1": 2976, "fltsts2": 65535, "filna": "0", "filid": "0", "flttotal0" : 720, "flttotal1": 4800, "flttotal2": 65535}

3) App iaql 2/12 App pm25 7 App tvoc 4 App Air Quality: very poor App Indoor Air Quality Level (Notfication): Fair (aqit 4?)

{"name": "Wohnzimmer", "type": "AC3033", "modelid": "AC3033/10", "MCUBoot": true, "swversion": "Ms3331", "language": "EN", "DeviceVersion": "3.3.1", "range": "Mar sME", "Runtime": 191451, "rssi": -44, "wifilog": false, "free_memory": 58400, "Wi fiVersion": "AWS_Philips_AIR@69.1", "ProductId": "9efe665a13c111e9bc6802024953075 e", "DeviceId": "2783de680c9b11ecb31b1ea1489bfd4d", "StatusType": "status", "Conn ectType": "Online", "om": "1", "pwr": "1", "cl": false, "aqil": 100, "uil": "1", "uaset": "A", "mode": "M", "pm25": 7, "iaql": 2, "aqit": 4, "aqit_ext": 0, "tvoc" : 4, "ddp": "1", "rddp": "2", "err": 0, "fltt1": "A3", "fltt2": "none", "fltsts0" : 595, "fltsts1": 2976, "fltsts2": 65535, "filna": "0", "filid": "0", "flttotal0" : 720, "flttotal1": 4800, "flttotal2": 65535}

4) App iaql 5/12 App pm25 22 App tvoc 3 App Air Quality: Poor App Indoor Air Quality Level (Notfication): Fair (aqit 4?)

{"name": "Wohnzimmer", "type": "AC3033", "modelid": "AC3033/10", "MCUBoot": true, "swversion": "Ms3331", "language": "EN", "DeviceVersion": "3.3.1", "range": "Mar sME", "Runtime": 36961, "rssi": -45, "wifilog": false, "free_memory": 58424, "Wif iVersion": "AWS_Philips_AIR@69.1", "ProductId": "9efe665a13c111e9bc6802024953075e ", "DeviceId": "2783de680c9b11ecb31b1ea1489bfd4d", "StatusType": "status", "Conne ctType": "Online", "om": "1", "pwr": "1", "cl": false, "aqil": 100, "uil": "1", " uaset": "A", "mode": "M", "pm25": 22, "iaql": 5, "aqit": 4, "aqit_ext": 0, "tvoc" : 3, "ddp": "1", "rddp": "2", "err": 0, "fltt1": "A3", "fltt2": "none", "fltsts0" : 595, "fltsts1": 2976, "fltsts2": 65535, "filna": "0", "filid": "0", "flttotal0" : 720, "flttotal1": 4800, "flttotal2": 65535}

Uwe1971R commented 4 months ago

This is from the AC3033 manual. Looks like the value of the AQI is determined by the worst value of the three other sensors (alergene, PM2.5, Gas).

image

kongo09 commented 4 months ago

Not all devices have all three sensors, but do you think the integration should calculate the air quality index as max(IAI, PM2.5, GAS)and display that as a extra sensor?

What would that mean for the setting field - if that is only relevant for the Philips app, I could remove that.

Uwe1971R commented 4 months ago

First the easy point: I would remove the settings field, because it has no impact on the purifier itself and also not on HA. Who wants to get a notificatin from the App on the mobile phone can/should setup this on the mobilephone.

For the "virtual" Air Quality Index" sensor, the situation is more more difficult. Philips indeed uses the sensors that are avilable. So for some purifiers this air quality index is based on PM25 or IAI only. That should be no problem. The major problem here is that for each of the existing sensors, there is a table (as shown in the comments above) that defines the correlation between sensor-data and its specific air quality level (good, fair, poor, very poor) and then the max of (good, fair, poor, very poor) of all sensors is used as "air quality index". It looks like this table is or can be different for each purifier model and that it might even depend on the country and year of sales. Here is an example of a purifier for China, India, Indonesia,... https://www.philips.co.in/c-f/XC000005753/what-do-my-philips-air-purifier%E2%80%99s-lights-mean

Based on this all manuals / FAQ sections of each purifier supported in the HA integration need to be checked for these correlation tables and these would have to be added to the integration. For me that sounds like a lot of work for a small benefit...

kongo09 commented 4 months ago

Thanks for all your research. My feeling is, we should just remove this from HA. If anyone wants to calculate their own index locally, that's possible inside HA and you could even do your European index even though your living in China, if you like.

kongo09 commented 4 months ago

fixed in 0.18.5-beta.1