0
Discuss & Vote

Air Quality Sensor Capability CAQI (or AQI or µg/m³)

Michael Evan 4 weeks ago in Things & Capabilities • updated by Terry (ActionTiles) (Co-Founder) 4 weeks ago 7

EDIT by Moderator:

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

    "name": "Air Quality Sensor",
    "status": "live",
    "attributes": {
        "airQuality": {
            "schema": {
                "type": "object",
                "additionalProperties": false,
                "properties": {
                    "value": {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 100
                    },
                    "unit": {
                        "type": "string",
                        "enum": [
                            "CAQI"
                        ],
                        "default": "CAQI"
                    }
                },

Answer

PINNED
Discuss & Vote

Cool DTH!


But...

While SmartThings Capability specifications are somewhat vague, subject to change, and new ones appear without warning, your DTH is completely non-conforming with the current definition of Capability "Air Quality Sensor".   https://smartthings.developer.samsung.com/develop/api-ref/capabilities.html#Air-Quality-Sensor

The Capability declares that a single Attribute "value" must be set (via sendEvent), of type integer, 0 to 100. The only option for "units" is "CAQI" (and is the default). I believe they are probably referring to the European CAQI standard index:  

https://en.wikipedia.org/wiki/Air_quality_index#CAQI


While we are considering ways that ActionTiles may be able to deal with non-compliant / non-standard Attributes and Commands, we don't know how this will work in practice. The "Capability Abstraction Paradigm" is fundamental to the SmartThings platform. All our SmartThings Tile Types are expect conformance - as do all standard, published, certified SmartApps.


If we add Air Quality Sensor Tiles to ActionTiles, we would build it to expect Capability conformance.

Discuss & Vote

Hi Michael,

I have updated your Post to make it a Feature Request for a Tile that supports the SmartThings specification of Air Quality Sensor official Capability.


What type of device or service do you have that claims this Capability?

...Terry.

+1

I have built several of these > https://luftdaten.info/en/construction-manual/

I created a smartthings device handler that queries a local datastore and reports the data into a virtual device...but I honestly rarely use the app, since I have 5, well placed, highly utilized ActionTile dashboards around our house. 

A few months back, I did a similar project for reporting real time power usage and cost...and have found that having that data easily visible around the house has been incredibly insightful.


I have experimented a little with triggering actions in the house, like I have a rgb light in the kitchen, that I  pulse colors depending on the quality of the air....

[value: 54, color: "#00e400"],
[value: 154, color: "#ff0"],
[value: 254, color: "#f90"],
[value: 354, color: "#f00"],
[value: 424, color: "#540099"],
[value: 604, color: "#800000"]

The idea being, that when my wife frys up some food, but forgets to turn on the hood, or open a window, the light will help remind her. She likes that idea, but has said, that she would like to be able to passively monitor the values as well. 

I can probably rig something up with PhantomJS, but I dont think adding air quality should be a difficult capability to add, and there are several open source projects out there for air monitoring...that are faily popular. 


Thank you!

Waiting for Customer

Can you provide a link to the DTH Source (GitHub, Gist, Pastebin...), please?

Does it claim and conform to the spec for the Capability?

I have only just started on the handler, will probably break aspects out into a child smartApp, since the handler is doing too much. I don't know if "conforms" since it doesn't seem like the spec in either Smarttthings or Samsungs doc make much sense. There is really only one value to report, and that is the friendly Air Quality Indicatatpr score.. That number is arrived at through some math, since the actual particulate sensors generate the actual concentration value. Currently, you can see my laziness in the handler, as I am using 

µg/m³  

for the PM2.5 & PM10 readings, my devices are generating, while adjacent to those two tiles, I use the AQI generated by airnow. IN the future, I will probably incorporate the transformation, likely basing it on >

https://pypi.org/project/python-aqi/

In the mean time, I through up my device handler on gist. Don't judge...probably get it refined over the next few weeks..

https://gist.github.com/thoughtleader/4e70633731d09d43c3a65e91e3088fed#file-airqualityhandler

PINNED
Discuss & Vote

Cool DTH!


But...

While SmartThings Capability specifications are somewhat vague, subject to change, and new ones appear without warning, your DTH is completely non-conforming with the current definition of Capability "Air Quality Sensor".   https://smartthings.developer.samsung.com/develop/api-ref/capabilities.html#Air-Quality-Sensor

The Capability declares that a single Attribute "value" must be set (via sendEvent), of type integer, 0 to 100. The only option for "units" is "CAQI" (and is the default). I believe they are probably referring to the European CAQI standard index:  

https://en.wikipedia.org/wiki/Air_quality_index#CAQI


While we are considering ways that ActionTiles may be able to deal with non-compliant / non-standard Attributes and Commands, we don't know how this will work in practice. The "Capability Abstraction Paradigm" is fundamental to the SmartThings platform. All our SmartThings Tile Types are expect conformance - as do all standard, published, certified SmartApps.


If we add Air Quality Sensor Tiles to ActionTiles, we would build it to expect Capability conformance.

+1

Def non conforming, as I had mentioned above. Anyway, no worries, I'll use my phantomJS media generation-ActionTiles hack for now...

Non-Conforming =

Does not supply the mandatory Attributes and Commands, including the particular enumerations, data types, range limits, etc., as specified in the SmartThings Documentation.