PurpleAir Air Quality Station v1.1.01, updated on March 28, 2019
This DTH provides continuously updated Air Quality Index based on the PM2.5 data supplied by a Purple Air air quality sensor (see www.purpleair.com for more information).
Now automatically supports both SmartThings and Hubitat - no edits required
Now supports PurpleAir "Inside" sensors (with a single laser)!
Simple Setup
To use this Air Quality Station in SmartThings, you will need to:
- Create a new SmartThings/Hubitat device handler using the supplied source code
- Create the actual device: log into the IDE, select your Location, select Devices and then select Create New Device
- Specify your preference for update frequency
- Specify the desired PurpleAir Station ID you want to monitor
To find a specific Station ID:
- Use the live PurpleAir Map to locate a station (Real-Time Air Quality Map | PurpleAir)
- Open this URL in a new Window or Tab: (https://www.purpleair.com/json)
- Search for the NAME of the station you found above
- The Station ID is the first element in the results[:] map - you will enter this ID (1-5 digit number) into the preferences for the Air Quality Station
That's it - save, and you should be up and running!
The code for this PurpleAirStation can be found here:
To integrate directly into your SmartThings IDE, use these parameters:
Owner: SANdood
Name: PurpleAirStation
Branch: master
Change Log
- 1.0.00 - Initial Release
- 1.0.01 - Cleanup of description Texts & bug fixes
- 1.0.02 - Fixed some typos
- 1.0.03 - More string edits
- 1.0.04 - Updated icons & color handling
- 1.0.05 - Now uses BigDecimal for maximum precision
- 1.0.06 - Finalized conversion to BigDecimal
- 1.0.07 - Better error handling
- 1.0.08 - Changed all numeric attributes to "number"
- 1.0.09 - Changed to maintain and display only integer AQI (decimals are distracting)
- 1.0.10 - Fixed room/thing tile display
- 1.0.11 - Handles Inside PurpleAir Sensor (only 1 sensor by design)
- 1.0.12 - Internal cleanup of Inside sensor support, added runEvery3Minutes()
- 1.0.13 - Code annotations for hubitat users
- 1.0.14 - Added CAQI calculation for new "Air Quality Sensor" - see Air quality index - Wikipedia
- 1.1.01 - Automatic support for both SmartThings and Hubitat|
Donations
As always, my contributions to the SmartThings community are entirely free, but should you feel compelled to make a donation, you can do so here: PayPal.Me