Skip to content

Commit

Permalink
add Aqicn and prepare for v1.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
donavanbecker committed Sep 16, 2024
1 parent a600449 commit e94fc9f
Show file tree
Hide file tree
Showing 8 changed files with 1,794 additions and 819 deletions.
18 changes: 15 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

<span align="center">

<a href="https://github.com/homebridge/verified/blob/master/verified-plugins.json"><img alt="homebridge-verified" src="https://raw.githubusercontent.com/donavanbecker/homebridge-air/latest/branding/Homebridge_x_Air.svg?sanitize=true" width="350px"></a>
Expand All @@ -10,7 +9,7 @@
<a href="https://discord.gg/8fpZA4S"><img title="discord-air" src="https://badgen.net/discord/online-members/8fpZA4S?icon=discord&label=discord" ></a>
<a href="https://paypal.me/donavanbecker"><img title="donate" src="https://badgen.net/badge/donate/paypal/yellow" ></a>

<p>The Homebridge <a href="https://airnow.gove">Air</a>
<p>The Homebridge <a href="https://airnow.gove">Air</a>
plugin allows you monitor the current AirQuality for your Zip Code from HomeKit and Siri.
</p>

Expand All @@ -35,6 +34,19 @@ plugin allows you monitor the current AirQuality for your Zip Code from HomeKit
3. Click Save
4. Restart Homebridge

## Supported Air Quality Providers

Currently supports AQI Services:

- [AirNow](https://www.airnow.gov/) which is limited to the USA. A valid ZipCode is required.
- [Aqicn](https://www.aqicn.org/) which has international support, provided by the [World Air Quality Index Project](http://waqi.info/).

Depending on where exactly you would like to monitor AQI, one service may be more appropriate than the other.

## Supported Air Quality Features

This plugin will create an AirQualitySensor element. The Home app works well, but the Eve app seems to show more measurements. Measurements retrieved are PM2.5, PM10, & O3 for AirNow. Aqicn adds NO2, SO2, CO...
This plugin will create an AirQualitySensor element. The Home app works well, but the Eve app seems to show more measurements. Measurements retrieved are PM2.5, PM10, & O3 for AirNow. Aqicn adds NO2, SO2, CO...

## Thanks

Thank you to [ToddGreenfield](https://github.com/ToddGreenfield) for the the work done on the accesorry based plugin [homebridge-airnow](https://github.com/ToddGreenfield/homebridge-airnow/blob/master/README.md).
49 changes: 33 additions & 16 deletions config.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"pluginAlias": "Air",
"pluginType": "platform",
"singular": true,
"customUi": false,
"customUi": true,
"customUiPath": "./dist/homebridge-ui",
"headerDisplay": "<p align='center'><img width='250px' src='https://raw.githubusercontent.com/donavanbecker/homebridge-air/latest/branding/Homebridge_x_Air.svg'></p>\n\nThe **Homebridge Air** plugin allows you monitor the current AirQuality for your Zip Code from HomeKit and Siri.",
"footerDisplay": "Your AirNow apiKey was linked. Please raise any issues on our [project page](https://github.com/donavanbecker/homebridge-air/issues).\n\nIf you would like to have other features, fill out [Feature Request Form](https://github.com/donavanbecker/homebridge-air/issues/new?assignees=&labels=&template=feature_request.md).",
Expand All @@ -25,16 +25,19 @@
"title": "Provider",
"type": "string",
"required": true,
"x-schema-form": {
"type": "email"
},
"default": "airnow",
"oneOf": [
{
"title": "Air Now",
"enum": [
"airnow"
]
},
{
"title": "Aqicn",
"enum": [
"aqicn"
]
}
]
},
Expand All @@ -46,8 +49,8 @@
"type": "email"
}
},
"locationName": {
"title": "Location Name",
"city": {
"title": "City",
"type": "string",
"required": true
},
Expand All @@ -59,25 +62,37 @@
"distance": {
"title": "Distance",
"type": "string",
"required": true
"required": false,
"condition": {
"functionBody": "return (model.devices && model.devices[arrayIndices].city && model.devices[arrayIndices].zipCode);"
}
},
"firmware": {
"title": "Firmware Override",
"type": "string",
"placeholder": "1.2.8"
"placeholder": "1.2.8",
"condition": {
"functionBody": "return (model.devices && model.devices[arrayIndices].city && model.devices[arrayIndices].zipCode);"
}
},
"refreshRate": {
"title": "Device Refresh Rate",
"type": "number",
"minimum": 1800,
"placeholder": 1800,
"description": "Indicates the number of seconds between polls of the AirNow service."
"description": "Indicates the number of seconds between polls of the AirNow service.",
"condition": {
"functionBody": "return (model.devices && model.devices[arrayIndices].city && model.devices[arrayIndices].zipCode);"
}
},
"logging": {
"title": "Device Logging Override Setting",
"type": "string",
"required": true,
"default": "",
"condition": {
"functionBody": "return (model.devices && model.devices[arrayIndices].city && model.devices[arrayIndices].zipCode);"
},
"oneOf": [
{
"title": "Default Logging",
Expand Down Expand Up @@ -106,10 +121,12 @@
]
},
"delete": {
"title": "Delete",
"type": "button",
"style": "danger",
"onClick": "delete"
"title": "Delete Device",
"type": "boolean",
"description": "Delete this device from the plugin cache.",
"condition": {
"functionBody": "return (model.devices && model.devices[arrayIndices].city && model.devices[arrayIndices].zipCode);"
}
}
}
}
Expand Down Expand Up @@ -160,14 +177,14 @@
"key": "devices",
"notitle": false,
"type": "tabarray",
"title": "{{ value.locationName || 'New Location (Zip Code)' }}",
"title": "{{ value.city || 'New City (Zip Code)' }}",
"expandable": true,
"expanded": false,
"orderable": false,
"items": [
"devices[].provider",
"devices[].apiKey",
"devices[].locationName",
"devices[].city",
"devices[].zipCode",
"devices[].distance",
"devices[].firmware",
Expand All @@ -194,4 +211,4 @@
]
}
]
}
}
Loading

0 comments on commit e94fc9f

Please sign in to comment.