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-purpleair-sensor

v3.0.2

Published

Monitor air quality using PurpleAir.

Downloads

208

Readme

PurpleAir Homebridge Accessory Plugin

verified-by-homebridge

This is a Homebridge accessory plugin for monitoring air quality in Apple HomeKit. It creates virtual HomeKit air quality sensors based on real PurpleAir sensors. Once setup, you can also configure home automation based on air quality changes. It supports both using PurpleAir API (for sensors you do not own), and also connecting to your own sensors directly on your home network.

This project was inspired by SANdood's homebridge-purpleair, but with a few changes:

  1. Support homebridge-config-ui-x so the entire project can be configured in its UI.
  2. Support private sensors.
  3. Support VOC sensor reading.
  4. Support different averages, from realtime data, all the way to 1 hour average.
  5. Sensor data gets refreshed every 5 minutes.
  6. Allow reporting AQI value instead of PM2.5 density in HomeKit. The author is more used to reading AQI value, but HomeKit has only a field for PM2.5 density value. The plugin allows you to configure displaying AQI value in the density field.
  7. Work with multiple sensors.
  8. Rewritten in TypeScript, with some unit tests.
  9. Optionally reports humidity and temperature in addition to air quality.
  10. Optionally supports local sensors on home network (no need for API read key).

Installation

The easiest way to install is through homebridge-config-ui-x UI. Search for homebridge-purpleair-sensor and just click install. Once done, configure it using the UI, and restart homebridge.

If you want to install manually via the command line, run the following:

sudo npm install -g --unsafe-perm homebridge-purpleair-sensor

sudo service homebridge restart  # replace this with the command you need to restart homebridge

Configuration

You can configure this plugin using homebridge-config-ui-x UI.

Development Notes

A few useful commands:

sudo npm run watch

# publish new version
npm login
sudo npm publish

Changelog

  • 3.0.2: Fixed stale accessory data when restored from cache
  • 3.0.1: Fixed fetching VOC for local sensors
  • 3.0.0: Major rewwrite to convert to the Platform plugin. Added humidity and temperatures reporting. Added ALT-CF3 conversion.
  • 2.1.0: Only fetch API fields needed for the core functionality of the plugin.
  • 2.0.2: Verbose network error logging.
  • 2.0.1: Refreshing dependencies, now requiring node >= 14.8.1
  • 2.0.0: Use the new PurpleAir.com API for remote sensors. Note: you need to get your read API key from PurpleAir to use the new API, or you can choose to use local sensors without the API key.
  • 1.7.0: Support for direct access to local sensors
  • 1.6.2: Support EPA conversion.
  • 1.5.0: Support private sensors.
  • 1.4.0: Add AQandU and LRAPA conversions.
  • 1.3.0: Added unit tests for parsing and ability to report averages in addition to realtime values.
  • 1.2.0: Verbose logging option.
  • 1.1.0: Allow reporting AQI value in the field for PM2.5 density. I personally like the AQI value because I'm more used to it, but technically HomeKit only supports PM2.5 density rather than AQI.
  • 1.0.0: Initial version.