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.
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.
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
@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.
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
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.
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)
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.
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):
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.
PurpleAir Air Quality Station update 1.1.05 posted on 9 October 2019
Updates include:
- Corrected value calculations for sensors with only 1 active detector
- 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.