Appearance
traits/air_quality_sensor.proto
Table of Contents
traits/air_quality_sensor.proto
AirQuality
AirQuality holds the value of all supported sensors.
Field | Type | Label | Description |
---|---|---|---|
carbon_dioxide_level | float | optional | The CO2 level in parts per million |
volatile_organic_compounds | float | optional | The VOC level in parts per million |
air_pressure | float | optional | The air pressure in hPa |
comfort | AirQuality.Comfort | General comfort of the area | |
infection_risk | float | optional | A percentage [0,100] reading for how infectious the air is. Typically a combination of other sensor readings, the combination algorithm is undefined. |
score | float | optional | An air quality score for the area mapped to a percentage [0,100], with 100 being the best quality. |
particulate_matter_1 | float | optional | A measure of particles in the air measuring 1 micron or less in size, in micrograms per cubic meter. |
particulate_matter_25 | float | optional | A measure of particles in the air measuring 2.5 microns or less in size, in micrograms per cubic meter. |
particulate_matter_10 | float | optional | A measure of particles in the air measuring 10 microns or less in size, in micrograms per cubic meter. |
air_change_per_hour | float | optional | The number of times per hour the air in the area is replaced. |
AirQualitySupport
AirQualitySupport describes the capabilities of devices implementing this trait
Field | Type | Label | Description |
---|---|---|---|
resource_support | smartcore.types.ResourceSupport | How a named device supports read/pull apis | |
carbon_dioxide_level | smartcore.types.FloatBounds | If present then the sensor supports reporting CO2 levels, in parts-per-million. | |
volatile_organic_compounds | smartcore.types.FloatBounds | If present then the sensor supports reporting volatile organic compounds, in parts-per-million. | |
air_pressure | smartcore.types.FloatBounds | If present then the sensor supports reporting air pressure, in hPa. | |
comfort | AirQuality.Comfort | repeated | If non-empty then the sensor supports reporting a general comfort reading of any of the provided types. Unknown should be assumed to be present if supported. |
infection_risk | smartcore.types.FloatBounds | If present then the sensor supports reporting infection risk, as a percentage [0,100]. | |
score | smartcore.types.FloatBounds | If present then the sensor supports reporting an air quality score, as a percentage [0,100]. | |
particulate_matter_1 | smartcore.types.FloatBounds | If present then the sensor supports reporting particulate matter 1, in micrograms per cubic meter. | |
particulate_matter_25 | smartcore.types.FloatBounds | If present then the sensor supports reporting particulate matter 2.5, in micrograms per cubic meter. | |
particulate_matter_10 | smartcore.types.FloatBounds | If present then the sensor supports reporting particulate matter 10, in micrograms per cubic meter. | |
air_change_per_hour | smartcore.types.FloatBounds | If present then the sensor supports reporting air changes per hour. |
DescribeAirQualityRequest
Field | Type | Label | Description |
---|---|---|---|
name | string | The name of the device |
GetAirQualityRequest
Field | Type | Label | Description |
---|---|---|---|
name | string | The name of the device to request state from | |
read_mask | google.protobuf.FieldMask | The state fields to fetch |
PullAirQualityRequest
Field | Type | Label | Description |
---|---|---|---|
name | string | The name of the device to request state from | |
read_mask | google.protobuf.FieldMask | The state fields to pull | |
updates_only | bool | When true the device will only send changes to the resource value. The default behaviour is to send the current value immediately followed by any updates as they happen. |
PullAirQualityResponse
Field | Type | Label | Description |
---|---|---|---|
changes | PullAirQualityResponse.Change | repeated |
PullAirQualityResponse.Change
Field | Type | Label | Description |
---|---|---|---|
name | string | The name of the device that has changed. | |
change_time | google.protobuf.Timestamp | The time the change happened. | |
air_quality | AirQuality | The new state of the sensor. Changed fields should be reported via the update_mask property. | |
update_mask | google.protobuf.FieldMask | The state fields that have changed. |
AirQuality.Comfort
Comfort encodes levels of comfort for an area.
Name | Number | Description |
---|---|---|
COMFORT_UNSPECIFIED | 0 | The comfort level is unknown |
COMFORTABLE | 1 | The area should be comfortable for occupants |
UNCOMFORTABLE | 2 | The area might be uncomfortable for occupants |
AirQualitySensorApi
Trait for devices that can report either numeric or descriptive readings about air quality and comfort.
Method Name | Request Type | Response Type | Description |
---|---|---|---|
GetAirQuality | GetAirQualityRequest | AirQuality | Get the current state of all reading this device supports |
PullAirQuality | PullAirQualityRequest | PullAirQualityResponse stream | Be notified of changes to any reading |
AirQualitySensorInfo
Describes the capabilities of a specific named device with respect to this trait.
Method Name | Request Type | Response Type | Description |
---|---|---|---|
DescribeAirQuality | DescribeAirQualityRequest | AirQualitySupport | Get information about how a named device implements AirQuality measurements |