[RELEASE] Free PurpleAir Air Quality Station - Now with Hubitat support!

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:

  1. Create a new SmartThings/Hubitat device handler using the supplied source code
  2. Create the actual device: log into the IDE, select your Location, select Devices and then select Create New Device
  3. Specify your preference for update frequency
  4. 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 (https://www.purpleair.com/map)
  • 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: https://paypal.me/BarryABurke

2 Likes

looks like your repo has a problem!! the code looks to have been pasted into the previous version of code. the first few lines need to be deleted and then from around line 600 on deleted. I have done so and have it running in my hubitat..

Fixed - thanks.

PurpleAir Air Quality Station v1.1.2a update released 13 April 2019 at 1230 CEST

Fixes handling of single-sensor (internal) PurpleAir sensors, and/or installations for which only a single sensor is reporting.

This update is recommended for all users.

1 Like

PurpleAir Air Quality Station v1.1.03 update released 16 April 2019 at 2130 CEST

Fixes typo in error message (descriptionText)

This update is recommended for all users.

Can you help me to understand the unnumerable status? Thank you !

Happy to help - but which "unnumerable status" is it that you need help with?

I was joking using the word unnnumerable, of course :slight_smile:
Neverthless I cannot understand the differences between the air quality indexes: airquality, airqualityindex, aqi, aqi1, aqi?...
I suppose the aqi7/pmi7 refers to 7 micrometer particles and similarly the others value pairs. Are there same guidelines how to "use" them, particularly the pmis for values other than 2.5, 10 ?
Sorry for bother you. I'm not an expert in this field.

The main tile AQI is the AQI calculated from the 2.5micron particles - and yes, the rest are for different particle sizes.

Best resources are:

hi @storageanarchy, is there a way to switch off the debug logs?

Not currently, but I can add it to my ToDo list...

PurpleAir Air Quality Station update 1.1.05 posted on 9 October 2019

Updates include:

  • New optional preference to disable debug logging. There wasn't much being logged before, but now you'll only get an info message when the AQI is updated.
1 Like

Thanks!
I'll feed you back asap. Yes it is not so horribly verbose. 4 log rows every 5 minutes. But it is nice have an option ... :slight_smile:

EDIT: it is ok. it logs ony AQI values

1 Like