homebridge-airly2
v0.2.0
Published
Plugin for Homebridge. Reads air quality from Airly service. (Using new API v2)
Downloads
44
Maintainers
Readme
homebridge-airly2
Homebridge plugin retrieving information about air quality from the Airly website using API version 2
Requirements
- Homebridge 1.6+ or 2.0-beta+
- Node.js 20.7+
Project is based on homebridge-airly.
Installation
Standalone
- Install Homebridge using:
(sudo) npm install -g --unsafe-perm homebridge. - Install this plugin using:
(sudo) npm install -g homebridge-airly2.
Using hb-service
- Install this plugin using:
hb-service add homebridge-airly2
Get access API key
- Get API Key from Airly. Login here https://developer.airly.eu/login and generate it.
- Find out your coordinates (latitude and longitude). Based on that information Airly will show measurements from nearest sensor. You can use this page https://www.latlong.net/.
- Update your configuration file like the example below.
- Add the configuration through the plugin settings or create the configuration section manually.
Configuration
Set in config.json file
"accessories": [
{
"accessory": "Air2",
"apikey": "YOUR_API_KEY",
"latitude": "YOUR_LATITUDE",
"longitude": "YOUR_LONGITUDE",
"maxdistance": 3,
"refreshinterval": 15,
"name": "Airly Air Quality"
}Description config file
Fields:
accessoryDefines the name of the plugin. The name Air2 must be provided. (required).apikeyAPI key from Airly Developers (required).latitudeString with your latitude e.g."50.3910761"(required).longitudeString with your longitude e.g."18.94962214"(required).maxdistanceThe maximum distance (in km) from which the measurement will be read. Default: 3 km, max: 50 km. (optional)refreshintervalPolling frequency in minutes. Minimum/default is 15 minutes to stay within the 100 requests/day Airly quota. (optional)
Development
# Install dependencies
npm install
# Run tests
npm test
# Run tests with coverage
npm run test:coverageLicense
GPL-3.0
