npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

homebridge-airnow

v1.1.0

Published

Homebridge plugin for AirNow (Air Quality)

Downloads

14

Readme

Homebridge-airnow

NPM Version

Air Quality Index Sensor Plugin for Homebridge This plugin allows you to monitor your current AirQuality from HomeKit and Siri.

Currently supports two AQI Services:

  1. AirNow which is limited to the USA. A valid ZipCode is required.
  2. Aqicn which has international support, provided by the World Air Quality Index Project.
  3. Gamta AQI provider in Lithuania.

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

Installation

  1. Install homebridge using: npm install -g homebridge
  2. Install this plugin using: npm install -g homebridge-airnow
  3. Update your configuration file like the example below.
  4. Ensure you have either an AirNow.gov or Aqicn.org API account to use that web service and have a valid API_KEY for that web service. For Gamta provider, You need nearest station #ID (please check config example below). For assistance visit - https://docs.airnowapi.org/faq or http://aqicn.org/data-platform/token/#/.

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...

Configuration

Example config.json:

"accessories": [
	{
		"accessory": "airnow",
		"name": "AirNow",
		"provider": "airnow",
		"airnow_api": "XXXXXX",
		"zipcode": "02860",
		"distance": "25",
		"aqicn_api": "XXXXXX",
		"aqicn_city": "@245",
		"polling": "30"
	}
],

Example config.json for "Gamta" AQI provider:

"accessories": [
	{
		"accessory": "airnow",
		"name": "AirNow",
		"provider": "gamta",
		"gamta_station": "0001",
		"polling": "30"
	}
],

Explanation:

Field | Description ------------------------|------------ accessory | Required - Must be "airnow" (all lowercase). name | Required - Name override for logging. provider | Required - Name of the AQI provider service. Valid options are: airnow, aqicn, gamta. Default is airnow. airnow_api | Optional - Required for AirNow.gov. YOUR API key from AirNow.gov. zipcode | Optional - Required and only for AirNow. This is the Zip code for the area being checked. distance | Optional - Optional and only used for AirNow.gov - Distance to search for monitoring station from zipcode. Defaults to 25 miles from zip. aqicn_api | Optional - Required for Aqicn.org. YOUR API key from Aqicn.org. aqicn_city | Optional - Optional and only used for Aqicn.org - A valid city @code from http://aqicn.org/city/all/ OR defaults to 'here' which will use Geolocation based on your IP. The correct aqicn_city @code parameter using the below example for Reseda, Los Angeles would be @245. Hover over the search results and use the code at the bottom of the web page.Example gamta_station | Optional - Required for Gamta. Station ID (check nearest station from http://stoteles.gamta.lt/ap3/) polling | Optional - Poll interval. Default is 0 minute, which is OFF or no polling.