Skip to content

Commit

Permalink
Updates to README.md and Config Schema
Browse files Browse the repository at this point in the history
 * [Enhancement] Update config schema titles to provide better description and consistency across titles.
 * [Enhancement] Update README.md to be consistent with config schema changes. Clarify that when upgrading from 5.6.4 to 5.7.x that you should first uninstall plug-in, reboot, reinstall, configure and reboot. This is due to change in device accessory cache format.
  • Loading branch information
DMBlakeley committed Feb 5, 2021
1 parent 489dc73 commit 55b6cd6
Show file tree
Hide file tree
Showing 5 changed files with 36 additions and 29 deletions.
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.7.2
* [Enhancement] Update config schema titles to provide better description and consistency across titles.
* [Enhancement] Update README.md to be consistent with config schema changes. Clarify that when upgrading from 5.6.4 to 5.7.x that you should first uninstall plug-in, reboot, reinstall, configure and reboot. This is due to change in device accessory cache format.

## v5.7.0 & v5.7.1
* [New] Added functionality to control Awair display and brightness. Only applies to Omni, Awair-R2 and Element. <p align = center><b>NOTE:</b></p> <p>When migrating from `v5.6.3` to `v5.7.0` please first uninstall `homebridge-awair2` (copy your Developer Token first), restart Homebridge to clear 'homebridge-awair' cached accessories, install `homebridge-awair2`, add your Developer Token, and finally restart Homebridge one more time.</p>

Expand Down
14 changes: 8 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ This is a second generation Homebridge Dynamic Platform plugin for the Awair fam
---

<u><h3 align=center>NOTE:</h3></u>
<p>When migrating from `homebridge-awair` to `homebridge-awair2` please first uninstall `homebridge-awair` (copy your Developer Token first), restart Homebridge to clear 'homebridge-awair' cached accessories, install `homebridge-awair2`, add your Developer Token, and finally restart Homebridge one more time.</p>
When migrating from `homebridge-awair` to `homebridge-awair2` or from `v5.6.4` to `v5.7.x` please first uninstall `homebridge-awair` (copy your Developer Token first), restart Homebridge to clear 'homebridge-awair2' cached accessories, install `homebridge-awair2`, add your Developer Token to configuration, and finally restart Homebridge one more time.

---

Expand Down Expand Up @@ -93,25 +93,27 @@ See [config-sample.json](https://github.com/DMBlakeley/homebridge-awair2/blob/ma

## Descriptions

Reference [Wiki Chapter 3](https://github.com/DMBlakeley/homebridge-awair2/wiki/3.-Awair2-Configuration-Options) for additional details.

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 (Eefault = `users/self`, options: `users/self` or `orgs/###`, where ### is the Awair Organization `orgId`)
`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-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`)
`carbonDioxideThresholdOff` | Y | The level at which HomeKit will turn off the trigger alert for the CO2 in ppm, to ensure that it doesn't trigger on/off too frequently choose a number less than `carbonDioxideThreshold`. (Default = `800`)
`vocMw` | Y | The Molecular Weight (g/mol) of a reference gas or mixture that you use to convert from ppb to ug/m^3. (Default = `72.66578273019740`)
`vocMw` | Y | The Molecular Weight (g/mol) of a reference gas or mixture that you use to convert from ppb to &micro;g/m&sup3;. (Default = `72.66578273019740`)
`occupancyDetection` | Y | Omni Only - Enables Omni occupancy detection based on minimum environmental sound level detected. (Default = `false`)
`occupancyOffset` | Y | Omni Only - Used when `occupancy detection` enabled. Offset value in dBA above background sound level to set `not occupied` level, `occupied` is 0.5dBA higher. (Default = `2`)
`occupancyRestart` | Y | Omni Only - Enables restart of occupancy detection algorithm on Homebridge reboot. (Default = `false`, use historical data)
`occupancyRestart` | Y | Omni only - Reinitialize Occupancy detection measurement to determine unoccupied sound level on Homebridge reboot. (Default = `false`, use historical data)
`enableModes` | Y | Applies to Omni, Awair-r2 & Element - Enables creation of Display Mode and LED Mode accessories. (Default = `false`)
`logging` | Y | Whether to output logs to the Homebridge logs. (Default = `false`)
`verbose` | Y | Whether to log results from API data calls. Requires `logging` to be `true`. (Default = `false`)
`development` | Y | Enables Development mode to allow use of `test` Awair devices lacking `end user`/Awair OUI formatted Serial numbers. (Default = `false`)
`ignoredDevices` | Y | Array of Awair device macAddresses (12 characters in length) to be excluded from HomeKit (OPTIONAL). `End user` devices with begin with Awair OUI "70886B", `test` devices are concatnation of right 12 characters of '00000000000' + deviceId.
`development` | Y | Enables Development mode to allow use of `test` Awair devices lacking `end user/Awair OUI` formatted Serial numbers. (Default = `false`)
`ignoredDevices` | Y | Array of Awair device macAddresses (12 characters in length) to be excluded from HomeKit (OPTIONAL). `End user` devices with begin with Awair OUI '70886B', `test` devices are concatnation of right 12 characters of '00000000000' + deviceId.

Reference Wiki for detailed description of [Configurion Options](https://github.com/DMBlakeley/homebridge-awair2/wiki/3.-Awair2-Configuration-Options).

Expand Down
43 changes: 22 additions & 21 deletions config.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,17 +15,17 @@
"description": "Reference Installation Instructions - link provided in footer."
},
"userType": {
"title": "The type of user account",
"title": "The type of User Account",
"type": "string",
"default": "users/self",
"description": "The type of user account. Default = 'users/self', Options: 'users/self' or 'orgs/###', where ### is the Awair Organization 'orgId'."
"description": "The type of User Account. Default = 'users/self', Options: 'users/self' or 'orgs/###', where ### is the Awair Organization 'orgId'."
},
"airQualityMethod": {
"title": "Air quality calculation method",
"type": "string",
"default": "awair-aqi",
"enum": ["awair-aqi", "awair-score", "nowcast-aqi"],
"description": "Air quality calculation method used to define the Air Quality Chracteristic. Default = 'awair-aqi', Options: 'awair-aqi', 'awair-score' and 'nowcast-aqi'. Nowcast-aqi only available for Omni, Mint, Awair, Awair-R2 and Element. When 'nowcast-api' selected, 'endpoint' defaults to '15-min-avg' and 'data points returned' to '48."
"description": "Air quality calculation method used to define the Air Quality Chracteristic. Default = 'awair-aqi', Options: 'awair-aqi', 'awair-score' and 'nowcast-aqi'. Nowcast-aqi only available for Omni, Mint, Awair, Awair-R2 and Element. When 'nowcast-api' selected, 'endpoint' defaults to '15-min-avg' and 'number of data points returned' to '48."
},
"endpoint": {
"title": "The 'air-data' endpoint",
Expand All @@ -38,76 +38,77 @@
}
},
"limit": {
"title": "Data Points Returned",
"title": "Number of Data Points Returned",
"type": "integer",
"default": 1,
"description": "Number of consecutive data points returned per request. For example, used for custom averaging of sensor values from 'raw' endpoint. `endpoint` of `latest` defaults to `1`. Default = '1'.",
"description": "Number of consecutive data points returned per request. Used for custom averaging of sensor values from 'raw' Endpoint. Endpoint of 'latest' defaults to '1'. Default = '1'.",
"condition": {
"functionBody": "return model.airQualityMethod !== 'nowcast-aqi';"
}
},
"carbonDioxideThreshold": {
"title": "Carbon Dioxide Threshold",
"title": "Carbon Dioxide Threshold - On",
"type": "integer",
"default": 1000,
"description": "The CO2 level at which HomeKit will turn ON the trigger alert for the CO2 in ppm. Default = `0`."
"description": "The CO2 level at which HomeKit will turn ON the trigger alert for the CO2 in ppm. Default = '1000'."
},
"carbonDioxideThresholdOff": {
"title": "Carbon Dioxide Threshold Off",
"title": "Carbon Dioxide Threshold - Off",
"type": "integer",
"default": 800,
"description": "The CO2 level at which HomeKit will turn OFF the trigger alert for the CO2 in ppm, to ensure that it doesn't trigger on/off too frequently choose a number lower than 'carbonDioxideThreshold'. Default = `0`."
"description": "The CO2 level at which HomeKit will turn OFF the trigger alert for the CO2 in ppm, to ensure that it doesn't trigger on/off too frequently. Must be a number lower than 'carbonDioxideThreshold'. Default = '800'."
},
"vocMw": {
"title": "Reference Gas Molecular Weight",
"type": "number",
"placeholder": 72.66578273019740,
"description": "The Molecular Weight (g/mol) of a reference gas or mixture that you use to convert from ppb to ug/m^3."
"description": "The Molecular Weight (g/mol) of a reference gas or mixture that you use to convert from ppb to &micro;g/m&sup3;."
},
"occupancyDetection": {
"title": "Omni - Whether to enable Occupancy detection based on minimum sound level.",
"title": "Omni Occupancy Detection - Whether to enable Occupancy detection based on minimum sound level.",
"type": "boolean",
"default": false,
"description": "Omni only - enables occupancy detection based on minimum sound level + occupancyOffset value."
"description": "Omni only - enables occupancy detection based on detected background sound level + occupancyOffset value."
},
"occupancyOffset": {
"title": "Omni - used when occupancyDetection enabled.",
"title": "Omni Occupancy decibels Offset - used when occupancyDetection enabled.",
"type": "number",
"placeholder": 2.0,
"description": "Omni only - Used when `occupancy detection` enabled. Offset value in dBA above detected background sound level. Sets upper level for `not occupied`. The lower level for `occupied` is an additional 0.5dBA higher. See Wiki for full explanation.",
"default": 2.0,
"multipleOf": 0.5,
"description": "Omni only - used when `occupancy detection` enabled. Offset value in dBA above detected background sound level to set upper level for `not occupied`. The lower level for `occupied` is an additional 0.5dBA higher. See Wiki for further explanation. Default = '2'.",
"condition": {
"functionBody": "return model.occupancyDetection === true;"
}
},
"occupancyRestart": {
"title": "Omni - restart Occupancy detection measurement on next Homebridge reboot.",
"title": "Omni Reset Occupancy Status - reinitialize Occupancy detection measurement on Homebridge reboot.",
"type": "boolean",
"default": false,
"description": "Omni only - reinitialize Occupancy detection measurement on Homebridge reboot.",
"description": "Omni only - reinitialize Occupancy detection measurement to determine unoccupied sound level on Homebridge reboot.",
"condition": {
"functionBody": "return model.occupancyDetection === true;"
}
},
"logging": {
"title": "Whether to output logs to the Homebridge logs.",
"title": "Logging - Whether to output logs to the Homebridge logs.",
"type": "boolean",
"default": false
},
"verbose": {
"title": "Whether to include API data call results when logging is enabled.",
"title": "Verbose Logging - Whether to include API data call results when logging is enabled.",
"type": "boolean",
"default": false,
"condition": {
"functionBody": "return model.logging === true;"
}
},
"enableModes": {
"title": "Whether to enable Display Mode and LED Mode Accessories for Awair-Omni, Awair-R2 and Awair-Elemnt.",
"title": "Display Mode Switches - Whether to enable Display Mode and LED Mode Accessories for Awair-Omni, Awair-R2 and Awair-Elemnt.",
"type": "boolean",
"default": false
},
"development": {
"title": "Enables Development mode to allow use of 'test' Awair devices lacking production/Awair OUI formatted Serial numbers.",
"title": "Development Mode - Whether to enable Development mode to allow use of 'test' Awair devices lacking production/Awair OUI formatted Serial numbers.",
"type": "boolean",
"default": false
},
Expand Down
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"private": false,
"displayName": "Homebridge Awair2",
"name": "homebridge-awair2",
"version": "5.7.1",
"version": "5.7.2",
"description": "HomeKit integration of Awair air quality monitor as Dynamic Platform.",
"main": "dist/index.js",
"scripts": {
Expand Down

0 comments on commit 55b6cd6

Please sign in to comment.