SmartThings Community

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

Thats great. Thanks Barry!

Thanks for this handler!

Has anyone else had issues with temperature being reported incorrectly? Both my indoor & outdoor monitors are showing as 8° F too high. I see in the JSON object that the temp is also showing 8° high, but on the purpleair.com map they both report properly.

Ideas?

From their website:

“Temperature may be elevated and humidity under estimated.”

“The temperature values may be elevated due to the case and other factors that do not provide ideal temperature sensing. These values are provided as is and are just for interest.

Frankly, these readings are so far off that it’s best just to ignore them.

1 Like

You can email the purple air side about this if you can’t figure it out.
PurpleAir Contact contact@purpleair.com

Is there any particular reason why you couldn’t use the outdoor one indoors? Other than the specs differences stated on the website, what are the other differences between the indoor one and outdoor one?

It’s a shame the temp and humidity readings aren’t accurate, I really wish there was one sensor to rule them all…

The indoor one has a visual indicator which is useful. It is pretty ugly however.

2 Likes

No reason whatsoever … lots of outdoor stations seem to be used indoors. Also, you need to keep in mind that the PurpleAir outdoor station (PA-II) looks like an inverted automobile oil filter, so if you don’t mind one of those in your home, go for it, LOL.

Yup … not only is it the same size as a mouse (computer input device), it looks like one too :slight_smile:

1 Like

@Mspowley Did you ever figure out how to integrate this into ActionTiles? I am having a hard time getting anything to populate besides the temp and humidity.

nope- sorry, there isn’t a standard attribute named “aqi” (or “AQI”) in SmartThings.

If the Action Tiles folk want to capture & represent AQI, I’m more than happy to work with them… @tgauchat ???

(fwiw, the temp/humidity/barometricPressure from these devices isn’t meaningful data - it’s measured inside the device so that the lasers are adjusted properly for the ambient operating conditions)

ActionTiles (and the whole SmartThings Platform actually - especially given the inevitable transition to the new API) is designed to work specifically with the official Capability definitions. ActionTiles implements a subset and adds more from time to time.

There is an official Capability for Air Quality.

If there are DHs which conform to it, then we will as well.

https://smartthings.developer.samsung.com/develop/api-ref/capabilities.html#Air-Quality-Sensor

If I can figure out how to translate PurpleAir data into the definition of CAQI, I can publish the attribute. But I don’t think this is implemented in the current API (‘classic’) as a Capability.

That’s an interesting question / mystery; but perhaps easily explored. What happens if you claim capability "Air Quality Sensor" in your classic-API DH?


Meanwhile, the pragmatic workaround to get this sort of data into ActionTiles is to masquerade as any ActionTiles support Capability with a simple numeric Attribute (e.g., Energy Meter, Power Meter, Voltage Measurement, Sound Pressure Level…). Sure, the units on the Tile will be nonsense, but the Label and Icon are user selectable.

https://support.actiontiles.com/knowledge-bases/8/articles/3556-compatible-smartthings-capabilities-device-type-abstractions

Hmm…surprised I am.

Yes, I can add capability "Air Quality Sensor" to my device, and it creates the airQuality attribute. From the information here (https://en.wikipedia.org/wiki/Air_quality_index#CAQI) I am able to (loosely) translate the hourly average pm2.5 into CAQI values within the defined range (0-100) to populate the attribute.

It appears that the colors used to display CAQI are defined as below:

private def getCaqiColors() {
// Common Air Quality Index
[
	[value:   0, color: '#79bc6a'],		// Green - Very Low
    [value:  24, color: '#79bc6a'],
    [value:  25, color: '#bbcf4c'],		// Chartruese - Low
    [value:  49, color: '#bbcf4c'],
    [value:  50, color: '#eec20b'],		// Yellow - Medium
    [value:  74, color: '#eec20b'],
    [value:  75, color: '#f29305'],		// Orange - High
    [value:  99, color: '#f29305'],
    [value: 100, color: '#e8416f']		// Red - Very High
]}

I will post the update to my github momentarily.

PurpleAir Air Quality Station updated on 28 March 2019 @ 7:15am EDT

Fixes:

  • Now automatically supports installation on either SmartThings or Hubitat platforms
2 Likes

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

I’ve found an error on line 460 below. "descriptionText = " should be “descriptionText:”

        sendEvent(name: 'message', value: oldData, descriptionText = "No updates for ${roundIt((age/60000),2)} minutes")

It was causing an error in the logs:

error groovy.lang.MissingPropertyException: No such property: descriptionText for class: script_dth_48978ad8a7caefb64bfb014e7af4e28611b21e87c495993a3ed8a9cbd5f9da68 @line 460 (parsePurpleAir)

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.

1 Like

@storageanarchy,

Thank you for this work.

If you will, please clarify which “current 2.5 PM (particulate matter)” field value you are pulling. I am assuming you are using this value:

----> Raw PM2.5 in µg/m³

rather than this value:

----> Raw 2.5µm count/dl

One more thing… my integration project involves controlling fans & ventilation in a small indoors workshop environment. And, since very small particulate dust is an issue, I am considering the pros/cons of controlling these devices with the ‘Real Time Raw 0.3µm count/dl’ field. But, I don’t see that field (and a few others):

13%20PM

in device handler code.

So, are any other field values available via your DH?

Thank you!

Pls disregard. I found what I needed for evaluation in the Events List. Thanks again.