Skip to content

Commit

Permalink
Add option to enable/disable VOC and PM2.5 binary limit switches
Browse files Browse the repository at this point in the history
* [Enhancement] Add option to enable/disable VOC and PM2.5 binary limit switches.
* [Housekeeping] Update dependent node modules to latest versions.
  • Loading branch information
DMBlakeley committed Feb 20, 2022
1 parent 82de4d1 commit 5bf982e
Show file tree
Hide file tree
Showing 8 changed files with 558 additions and 719 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.9.5
* [Enhancement] Add option to enable/disable VOC and PM2.5 binary limit switches.
* [Housekeeping] Update dependent node modules to latest versions.

## v5.9.4
* [Security] Update `minimist` dependecy to version `>=0.2.1` to address [CVE-2020-7598](https://github.com/advisories/GHSA-vh95-rmgr-6w4m) security advisory.
* [Housekeeping] Improve error logging for `updateAirQualityData`, `getBatteryStatus` and `getOccupancyStatus` to include `accessory.context.serial` in logging output.
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ Parameter | Optional? | Description
`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`)
`enableTvocPm25` | Y | Whether to enable Total VOC and PM2.5 threshold binary sensors.
`tvocThreshold`(*) | Y | Total VOC level at which HomeKit will trigger an alert in µg/m³. (Default = `1000`)
`tvocThresholdOff`(*) | Y | Total VOC level at which HomeKit will turn off the trigger alert in µg/m³ to ensure that it doesn't trigger on/off too frequently. Choose a number less than `tvocThreshold`. (Default = `800`)
`pm25Threshold`(*) | Y | The level at which HomeKit will trigger an alert for PM2.5 in µg/m³. (Default = `35`)
Expand Down
1 change: 1 addition & 0 deletions config-sample.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
"limit": 1,
"carbonDioxideThreshold": 1000,
"carbonDioxideThresholdOff": 800,
"enableTvocPm25": false,
"tvocThreshold": 1000,
"tvocThresholdOff": 800,
"pm25Threshold": 35,
Expand Down
26 changes: 22 additions & 4 deletions config.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -58,29 +58,46 @@
"placeholder": 800,
"description": "The CO2 level in ppm at which HomeKit will turn OFF the trigger alert for the CO2 to ensure that it doesn't trigger on/off too frequently. Must be a number lower than 'carbonDioxideThreshold'. Default = '800'."
},
"enableTvocPm25": {
"title": "Total VOC and PM2.5 - Whether to enable binary limit switches.",
"type": "boolean",
"default": false
},
"tvocThreshold": {
"title": "Total VOC Threshold - On",
"type": "integer",
"placeholder": 1000,
"description": "Total VOC level in µg/m³ at which HomeKit will turn ON the trigger alert for Total VOC. Default = '1000'."
"description": "Total VOC level in µg/m³ at which HomeKit will turn ON the trigger alert for Total VOC. Default = '1000'.",
"condition": {
"functionBody": "return model.enableTvocPm25 === true;"
}
},
"tvocThresholdOff": {
"title": "Total VOC Threshold - Off",
"type": "integer",
"placeholder": 800,
"description": "Total VOC level in µg/m³ at which HomeKit will turn OFF the trigger alert for the Total VOC to ensure that it doesn't trigger on/off too frequently. Must be a number lower than 'tvocThreshold'. Default = '800'."
"description": "Total VOC level in µg/m³ at which HomeKit will turn OFF the trigger alert for the Total VOC to ensure that it doesn't trigger on/off too frequently. Must be a number lower than 'tvocThreshold'. Default = '800'.",
"condition": {
"functionBody": "return model.enableTvocPm25 === true;"
}
},
"pm25Threshold": {
"title": "PM2.5 Threshold - On",
"type": "integer",
"placeholder": 35,
"description": "The PM2.5 level in µg/m³ at which HomeKit will turn ON the trigger alert for the PM2.5. Default = '35'."
"description": "The PM2.5 level in µg/m³ at which HomeKit will turn ON the trigger alert for the PM2.5. Default = '35'.",
"condition": {
"functionBody": "return model.enableTvocPm25 === true;"
}
},
"pm25ThresholdOff": {
"title": "PM2.5 Threshold - Off",
"type": "integer",
"placeholder": 20,
"description": "The PM2.5 level in µg/m³ at which HomeKit will turn OFF the trigger alert for the PM2.5 to ensure that it doesn't trigger on/off too frequently. Must be a number lower than 'pm25Threshold'. Default = '20'."
"description": "The PM2.5 level in µg/m³ at which HomeKit will turn OFF the trigger alert for the PM2.5 to ensure that it doesn't trigger on/off too frequently. Must be a number lower than 'pm25Threshold'. Default = '20'.",
"condition": {
"functionBody": "return model.enableTvocPm25 === true;"
}
},
"vocMw": {
"title": "Reference Gas Molecular Weight",
Expand Down Expand Up @@ -169,6 +186,7 @@
"limit",
"carbonDioxideThreshold",
"carbonDioxideThresholdOff",
"enableTvocPm25",
"tvocThreshold",
"tvocThresholdOff",
"pm25Threshold",
Expand Down
Loading

0 comments on commit 5bf982e

Please sign in to comment.