Monitor air quality using PurpleAir.
npm install homebridge-purpleair-sensor
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).
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
`
You can configure this plugin using homebridge-config-ui-x UI.
A few useful commands:
`
sudo npm run watch