michaelahern / homebridge-airthings

A Homebridge plugin for Airthings air quality monitors via the Airthings Consumer API.
ISC License
38 stars 6 forks source link

Customization of Air Quality and CO2 Threshold #30

Closed andrewtzn closed 6 months ago

andrewtzn commented 1 year ago

First of all, thank you for creating the plug-in! Have been using it for almost a month now and I love it!

I would like to make a suggestion for a new feature. It will be great if we can customize the air quality standards. for example, exclude humidity and temperature from the air quality score and only use PM2.5 and VOC like the US EPA standards. Lastly, it will be great if we can customize the threshold for the CO2 sensor.

Thank you!

arcticfoxwpg commented 1 year ago

Custom CO2 threshold would be great.

lanierbl commented 1 year ago

Another vote for a custom CO2 threshold. The number of Apple Home warnings we get for elevated CO2 readings from our AirThings is about to force me to remove it. Thanks so much for a rock-solid plug-in!

michaelahern commented 1 year ago

I've made the CO2 sensor detection threshold configurable in v1.0.0 and made some improvements to the config screen. Please give it a spin!

Would like to brainstorm a bit how to make the air quality scores customizable. It could be quite simple to opt specific sensors in and out of the air quality scoring, but much more complex to configure custom values for each. Will leave this issue open to gather feedback..

arcticfoxwpg commented 1 year ago

Thanks a lot! Seems to be working wellfor me.

As for customizing the other sensors, do you mean notications for high VOC, PM2.5, etc?

lanierbl commented 1 year ago

This is a fantastic add to the plugin! Thanks so much for prioritizing it!

andrewtzn commented 1 year ago

I've made the CO2 sensor detection threshold configurable in v1.0.0 and made some improvements to the config screen. Please give it a spin!

Would like to brainstorm a bit how to make the air quality scores customizable. It could be quite simple to opt specific sensors in and out of the air quality scoring, but much more complex to configure custom values for each. Will leave this issue open to gather feedback..

Thank you so much for the update! Regarding the air quality, I think the TVOC and PM2.5 value can be fetched and calculated and will result in: EXCELLENT-POOR. Here's an example from another Homebridge plugin that calculates different scores. https://github.com/DMBlakeley/homebridge-awair2/blob/fdb7d210a642bd9696f10bb0318ecb9c564aa32b/src/index.ts#LL1641C4-L1641C4

michaelahern commented 1 year ago

The Air Quality service exposed by the plugin today incorporates Radon, PM2.5, VOC, CO2, and Humidity sensors (depending on which are supported by your device) and generates an Excellent to Poor rating as described in the README (and at https://github.com/michaelahern/homebridge-airthings/blob/main/src/plugin.ts#L331). Is your ask to exclude specific sensors from Air Quality (e.g. Humidity) or configure custom Air Quality thresholds for each sensor (e.g. redefine Poor PM25 as say >= 75 μg/m³ instead of >= 25 μg/m³)?

andrewtzn commented 1 year ago

Thanks for the reply! Yes, It will be the first one, excluding specific sensors from the Air Quality.

michaelahern commented 6 months ago

Version 1.1 includes the ability to configure which sensors are used in calculating the Air Quality value.