Skip to content

Commit

Permalink
Updated Awair Score methodoloty
Browse files Browse the repository at this point in the history
* Incorporates updated Awair Score methodology for Awair Element (Firmware v1.4.0) and Awair Omni (Firmware v1.8.0) introduced by Awair in Dec 2023. NOTE that updated methology does not apply to Awair R2. See Awair [Reference](https://support.getawair.com/hc/en-us/articles/19504367520023#h_01HE1QVJ85K55N7QS8NAVBXWJM) and plugin README for additional details.
* Change default IAQ method to `awair-score`.
  • Loading branch information
DMBlakeley committed Dec 28, 2023
1 parent 26c5427 commit 32c8f41
Show file tree
Hide file tree
Showing 7 changed files with 250 additions and 364 deletions.
2 changes: 1 addition & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"files.eol": "\n",
"editor.codeActionsOnSave": {
"source.fixAll.eslint": true
"source.fixAll.eslint": "explicit"
},
"editor.rulers": [ 140 ],
"eslint.enable": true
Expand Down
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

All notable changes to this project will be documented in this file. This project uses [Semantic Versioning](https://semver.org/).

## v5.11.0
* Incorporates updated Awair Score methodology for Awair Element (Firmware v1.4.0) and Awair Omni (Firmware v1.8.0) introduced by Awair in Dec 2023. NOTE that updated methology does not apply to Awair R2. See Awair [Reference](https://support.getawair.com/hc/en-us/articles/19504367520023#h_01HE1QVJ85K55N7QS8NAVBXWJM) and plugin README for additional details.
* Change default IAQ method to `awair-score`.

## v5.10.9
* Add plug-in Setting option to select temperature units (C or F) and time format (12hr or 24hr) when Display Modes are enabled.

Expand Down
18 changes: 17 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,22 @@ This is a second generation Homebridge Dynamic Platform plugin for the Awair fam

<u><h3 align=center>NOTES:</h3></u>

`v5.11.x` Incorporates updated Awair Score methodology for Awair Element (Firmware v1.4.0) and Awair Omni (Firmware v1.8.0) introduced by Awair in Dec 2023. See [Reference](https://support.getawair.com/hc/en-us/articles/19504367520023#h_01HE1QVJ85K55N7QS8NAVBXWJM).

The IAQ Score System integrates readings from five sensors: Temperature, Humidity, Volatile Organic Compounds (VOC), Carbon Dioxide (CO2), and Particulate Matter (PM2.5). In the previous system, each factor contributed equally (approximately 20%) to the total score. The new air quality scoring system begins with normalizing sensor data to a scale where 0 represents good quality and 1 indicates the worst, assigning values that correspond to a range of scores. The final Indoor Air Quality (IAQ) score is a composite of the highest normalized values from CO2, VOC, and PM2.5 readings.

The new Awair Score level is displayed in Homebridge on the Accessory tile for Awair Element and Awair Omni in addition to the Homekit level. Awair r2 only displays the Homekit level. Unfortunately, HomeKit levels are defined by the HomeKit API and cannot be customized.

Score | new Awair level | HomeKit level
:-: | :----: | :---:
1 | GOOD | EXCELLENT
2 | ACCEPTABLE | GOOD
3 | MODERATE | FAIR
4 | POOR | INFERIOR
5 | HAZADAROUS | POOR

iOS Awair app version 4.7.3 is required to view the updated scores.

`v5.10.x` removes support for Awair v1 (including Awair Baby), Awair Glow, and Awair Glow-C. These devices have been "sunsetted" by Awair as of 30 November 2022. These devices are no longer supported by the Awair iOS app or the Awair Cloud which the plugin relies on. Additional details can be found [here](https://support.getawair.com/hc/en-us/articles/9948422782999-How-to-identify-device-models-and-features-that-will-close-by-Nov-30-2022).

`v5.9.x` introduced binary limit switches for VOC and PM2.5. The switches are implemented as dummy `occupancy sensors` and can be used to trigger HomeKit automations.
Expand Down Expand Up @@ -80,7 +96,7 @@ Parameter | Optional? | Description
`platform` | | The Homebridge Accessory (REQUIRED, must be exactly: `Awair2`)
`token` | | Developer Token (REQUIRED, see [Installation](#installation)) above.
`userType` | Y | The type of user account (Default = `users/self`, options: `users/self` or `orgs/###`, where ### is the Awair Organization `orgId`)
`airQualityMethod` | Y | Air quality calculation method used to define the Air Quality Chracteristic (Default = `awair-aqi`, options: `awair-aqi`, `awair-pm`, `awair-score` or `nowcast-aqi`)
`airQualityMethod` | Y | Air quality calculation method used to define the Air Quality Chracteristic (Default = `awair-score`, options: `awair-aqi`, `awair-pm`, `awair-score` or `nowcast-aqi`)
`endpoint` | Y | The `/air-data/` endpoint to use (Default = `15-min-avg`, options: `15-min-avg`, `5-min-avg`, `raw` or `latest`)
`limit` | Y | Number of consecutive data points returned per request, used for custom averaging of sensor values (Default = `1` i.e. one `15-min-avg`). Defaults to 1 for `latest`.
`carbonDioxideThreshold` | Y | The level at which HomeKit will trigger an alert for the CO2 in ppm. (Default = `1000`)
Expand Down
4 changes: 2 additions & 2 deletions config.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@
"airQualityMethod": {
"title": "Air quality calculation method",
"type": "string",
"default": "awair-aqi",
"default": "awair-score",
"enum": ["awair-aqi", "awair-pm", "awair-score", "nowcast-aqi"],
"description": "Air quality calculation method used to define the Air Quality Chracteristic. Default = 'awair-aqi', Options: 'awair-aqi', 'awair-pm', 'awair-score' and 'nowcast-aqi'. Awair-pm and Nowcast-aqi are only available for Omni, Mint, Awair, Awair-R2 and Element. When 'awair-pm' selected, the HomeKit Air Quality tile only reflects the particulates value, which is useful for automating air purifiers. When 'nowcast-api' selected, 'endpoint' defaults to '15-min-avg' and 'data points returned' to '48. The 'awair-score' method maps the Awair Score to an Air Quality value."
"description": "Air quality calculation method used to define the Air Quality Chracteristic. Default = 'awair-score', Options: 'awair-aqi', 'awair-pm', 'awair-score' and 'nowcast-aqi'. Awair-pm and Nowcast-aqi are only available for Omni, Mint, Awair-R2 and Element. When 'awair-pm' selected, the HomeKit Air Quality tile only reflects the particulates value, which is useful for automating air purifiers. When 'nowcast-api' selected, 'endpoint' defaults to '15-min-avg' and 'data points returned' to '48. The 'awair-score' method maps the Awair Score to an Air Quality value."
},
"endpoint": {
"title": "The 'air-data' endpoint",
Expand Down
Loading

0 comments on commit 32c8f41

Please sign in to comment.