Skip to content

AirVisual Node Binding ​

This is an openHAB binding for the AirVisual Node Air Quality Monitor (also known as IQAir AirVisual Pro).

Supported Things ​

There is one supported Thing, the "avnode".

Discovery ​

Binding will do autodiscovery for AirVisual Node by searching for a host advertised with the NetBIOS name AVISUAL-<SerialNumber>.

All discovered devices will be added to the inbox. Please note you will need to set the Node username and password in the configuration of the newly discovered thing before a connection can be made.

Binding Configuration ​

The binding has no configuration options, all configuration is done at Thing level.

Thing Configuration ​

The thing has a few configuration parameters:

ParameterDescription
addressHostname or IP address of the Node
usernameThe Node Samba share username. Default is 'airvisual'
passwordThe Node Samba share password
share(Optional) The Node SMB share name. Default is 'airvisual'
refresh(Optional) The time (in seconds) to refresh the Node data. Default is 60, min is 30

Required configuration parameters can be obtained by pressing the center button on the Node for "Settings Menu" > "Network" > "Access Node data" tab.

Channels ​

The binding supports the following channels:

Channel IDItem TypeDescription
co2Number:DimensionlessCO2 level, ppm
humidityNumber:DimensionlessRelative humidity, %
aqiNumber:DimensionlessAir Quality Index (US)
pm_25Number:DensityPM2.5 level, µg/m³
temperatureNumber:TemperatureTemperature
used_memoryNumberUsed memory
timestampDateTimeTimestamp
battery-levelNumberBattery level, %
signal-strengthNumberWi-Fi signal strength, 0-4

The Node updates measurements data every 5 minutes in active mode and every 15 minutes in power saving mode (screen off).

Example ​

Thing ​

The preferred way to add AirVisual Node to the openHAB installation is autodiscovery, but the AirVisual Node also can be configured using .things file:

java
airvisualnode:avnode:1a2b3c4 [ address="192.168.1.32", username="airvisual", password="12345", share="airvisual", refresh=60 ]

Items ​

Here is an example of items for the AirVisual Node:

dsl
Number:Temperature Livingroom_Temperature "Temperature [%.1f %unit%]" <temperature> {channel="airvisualnode:avnode:1a2b3c4:temperature"}
Number:Dimensionless Livingroom_Humidity "Humidity [%d %unit%]" <humidity> {channel="airvisualnode:avnode:1a2b3c4:humidity"}
Number:Dimensionless Livingroom_CO2_Level "CO₂" {channel="airvisualnode:avnode:1a2b3c4:co2"}
Number:Dimensionless Livingroom_Aqi_Level "Air Quality Index" { channel="airvisualnode:avnode:1a2b3c4:aqi" }
Number:Density Livingroom_Pm25_Level "PM2.5 Level" { channel="airvisualnode:avnode:1a2b3c4:pm_25" }
DateTime Livingroom_Aqi_Timestamp "AQI Timestamp [%1$tH:%1$tM]" { channel="airvisualnode:avnode:1a2b3c4:timestamp" }

Rules ​

Example rules:

rules
rule "AirVisual Node Temperature Rule"
when
    Item Livingroom_Temperature changed
then
    if (Livingroom_Temperature.state > 25.0|°C) {
        logInfo("avnode.rules", "Temperature is above 25°C")
    }
end

rule "AirVisual Node Humidity Rule"
when
    Item Livingroom_Humidity changed
then
    if (Livingroom_Humidity.state < 35.0|%) {
        logInfo("avnode.rules", "Humidity is below 35%")
    }
end

rule "AirVisual Node CO₂ Level Rule"
when
    Item Livingroom_CO2_Level changed
then
    if (Livingroom_CO2_Level.state > 1000.0|"ppm") {
        logInfo("avnode.rules", "CO₂ level is above 1000 ppm")
    }
end

rule "AirVisual Node PM2.5 Level Rule"
when
    Item Livingroom_Pm25_Level changed
then
    if (Livingroom_Pm25_Level.state > 25.0|"µg/m³") {
        logInfo("avnode.rules", "PM2.5 level is above 25 µg/m³")
    }
end

Sitemap ​

Example sitemap:

dsl
sitemap home label="Home" {
    Frame label="Living Room" {
        Text item=Livingroom_Temperature
        Text item=Livingroom_Humidity
        Text item=Livingroom_CO2_Level
        Text item=Livingroom_Aqi_Level
        Text item=Livingroom_Pm25_Level
    }
}