deanlyoung/homebridge-awair

Determine value weight

rgerr opened this issue · 8 comments

rgerr commented

Being able to determine which values weighs more or less to determine the HomeKit status of air quality like ‘excellent’ and ‘good’. Right now, it says my air quality is ‘good’ because the temperature is not perfect according to the Awair app (between 22 and 26 degrees Celsius).

This is a bit annoying when trying to trigger the mechanical ventilation in my home. When air quality is ‘good’, turn on MV. But in that case, the air quality will only get ‘worse’ since the MV will be sucking up hot air, temp goes down even more (or heating will work harder: more gas costs)

Ah, good feedback. I’ve been meaning to get back to the way the Air Quality is calculated. I believe Apple’s intention was to use AQI, but Awair’s Score mapped to the same isn’t 1-to-1 because it’s taking into account the 4-5 sensors instead of just TVOCs and PM.

rgerr commented

Is this something that can be implemented?

rgerr commented

Hi,

I see that you implemented air_quality_method in the plug-in. However, I cannot seem to change that. Whenever I change air_quality_method to aqi or nowcast_aqi, HomeKit says air quality is unknown. When I change it back to Awair-score, it works fine again. Any ideas on this?

@rgerr haven’t quite finished the implementation...

Sent with GitHawk

rgerr commented

Alright, could you give me a heads-up when it is ready to use?

Hey, @rgerr, sorry I haven't made too much progress on this yet... I haven't decided on how to implement it yet, but welcome any suggestions! "nowcast" turned out to be quite a bit more complicated than I had imagined, particularly because it requires fetching quite a bit of data from the Awair Developer API endpoints, averaging, and mapping to time buckets over the course of many hours or days. "aqi" should be a bit easier, but it won't be true to the actual definition since there is no TVOC input to the calculation (only CO, SO2, NO2, etc.) I'm thinking of another implementation that would use something like Awair Score / Index, which would map TVOC and PM2.5 Indices to the HomeKit levels, and whichever is worse will determine the Air Quality tile. That's kind of a hybrid of Awair Index & official AQI definitions.

rgerr commented

Thanks for getting back on this, perhaps a separate Awair score is a valid option.

added awair-aqi in air_quality_method

ffd9ac3