Air Quality Binding - looking for testers

did a fresh install of openhab and setup the binding in addons.cfg, added items and sitemaps. But there was entry in log for airquality. The binding is not showing in

openhab> bundle:list |grep airquality

I am not sure what setting i am missing :frowning:

Please post a copy of your addons.cfg file

@rtvb, below is the addons.cfg file

remote = true
legacy = false
binding = astro,chromecast,gpio,hue,ntp,airquality,pioneeravr,yahooweather,mqtt1
persistence = rrd4j
#action = 
#voice = 
misc = restdocs,openhabcloud,homekit,ruleengine,hueemulation
package = expert
transformation = map,regex,xslt,exec,javascript,scale,xpath,jsonpath
ui = classic,basic,paper,habpanel,habmin

The things entry is below with apikey masked

Thing airquality:aqi:home [ apikey="XXXXXXXXXXXXXXXX", l
ocation="12.871144,77.593834", refresh=10 ]

The items and sitemap entries are same as example. Below is the items entries

Number   Aqi_Level           "Air Quality Index" <flow> (AirQuality) { channel="airquality:aqi:home:aqiLevel" }
String   Aqi_Description     "AQI Level [MAP(en.map):%s]" <flow> (AirQuality) { channel="airquality:aqi:home:aqiDescription" }

Number   Aqi_Pm25            "PM\u2082\u2085 Level" <line> (AirQuality) { channel="airquality:aqi:home:pm25" }
Number   Aqi_Pm10            "PM\u2081\u2080 Level" <line> (AirQuality) { channel="airquality:aqi:home:pm10" }
Number   Aqi_O3              "O\u2083 Level" <line> (AirQuality) { channel="airquality:aqi:home:o3" }
Number   Aqi_No2             "NO\u2082 Level" <line> (AirQuality) { channel="airquality:aqi:home:no2" }
Number   Aqi_Co              "CO Level" <line> (AirQuality) { channel="airquality:aqi:home:co" }

String   Aqi_LocationName    "Measuring Location" <settings> (AirQuality) { channel="airquality:aqi:home:locationName" }
Location Aqi_StationGeo      "Station Location" <office> (AirQuality) { channel="airquality:aqi:home:stationLocation" }
Number   Aqi_StationId       "Station ID" <pie> (AirQuality) { channel="airquality:aqi:home:stationId" }
DateTime Aqi_ObservationTime "Time of observation [%1$tH:%1$tM]" <clock> (AirQuality) { channel="airquality:aqi:home:observationTime" }

Number   Aqi_Temperature     "Temperature" <temperature> (AirQuality) { channel="airquality:aqi:home:temperature" }
Number   Aqi_Pressure        "Pressure" <pressure> (AirQuality) { channel="airquality:aqi:home:pressure" }
Number   Aqi_Humidity        "Humidity" <humidity> (AirQuality) { channel="airquality:aqi:home:humidity" }
                   Frame label="Air Quality" {
                        Text item=Aqi_Level valuecolor=[
                                Aqi_Level=="-"="lightgray",
                                Aqi_Level>=300="#7e0023",
                                >=201="#660099",
                                >=151="#cc0033",
                                >=101="#ff9933",
                                >=51="#ffde33",
                                >=0="#009966"
                            ]
                        Text item=Aqi_Description valuecolor=[
                                Aqi_Description=="HAZARDOUS"="#7e0023",
                                =="VERY_UNHEALTHY"="#660099",
                                =="UNHEALTHY"="#cc0033",
                                =="UNHEALTHY_FOR_SENSITIVE"="#ff9933",
                                =="MODERATE"="#ffde33",
                                =="GOOD"="#009966"
                            ]
                    }
                    Frame {
                        Text item=Aqi_Pm25
                        Text item=Aqi_Pm10
                        Text item=Aqi_O3
                        Text item=Aqi_No2
                        Text item=Aqi_Co
                        Text item=Aqi_LocationName
                        Text item=Aqi_ObservationTime
                        Text item=Aqi_Temperature
                        Text item=Aqi_Pressure
                        Text item=Aqi_Humidity
                    }

Let me know if you see any issues with this configuration. During the fresh install, i added only the airquality addin, but i didn’t see any log entries for loading of the binding.

You don’t need the word Thing there.

Changed that, still no change. I don’t see any log entries for airquality even after restart of openhab.

Hello @manu74

Have you tried configuring Air Quality binding via Paper UI? I’m using it that way, and it works without any issues. Maybe that would be a good way to test if your installation is faulty, or there is something wrong with a thing file.

Best regards,
Davor

I don’t see airquality as add-on in Openhab2. The instruction also mentioned that it has to be manually configured.
Are you running openhab2 or earlier version?

I’m running snapshot. You may need to install jar manually as described at the beginning of this topic.

Hello!

Right now I’m running OH2 nightly that has Air Quality binding as official add-on, but I was using it with older nightly via .jar file too, and it could have been configured using Paper UI.

Best regards,
Davor

@AndrewZ, @davorf

Based on your inputs, I switched to snapshot installation and airquality addon started working. Even the configuration from paperUI is also working.

I had tried Official and Beta releases but not the snapshots. Thanks a ton for the help!!!

1 Like

Until recently I was using the nightly builds with Air Quality binding. A few days ago I switched to stable on openHABian and just copied the jar file from cloudbees to my addons folder. It worked immediately.

https://openhab.ci.cloudbees.com/job/openHAB2-Bundles/346/org.openhab.binding$org.openhab.binding.airquality/artifact/org.openhab.binding/org.openhab.binding.airquality/2.1.0-SNAPSHOT/org.openhab.binding.airquality-2.1.0-SNAPSHOT.jar

Thanks for this approach. I will like to switch back to beta release. Will try this as well over the weekend and let you know whether putting the jar worked for me or not.

Just found this thread here in the forum.
I’m looking to add air quality data from luftdaten.info which is a crowd initiative in Germany.
They provide a DIY air pollution measurement station and as of today we have lot’s of them in Germany.
The data can be retrieved by an api and also full downloads are available.
Would it make sense to catch the air quality data from this source also within the Air Quality Binding ?
Or is it better to create a dedicated binding ?
Being new to OpenHAB I do not yet understand how to create a binding.

Before creating a binding, you could always build a working setup using the http binding to access the API.

From a functional point of view, you should prefer a second source for a thing:

Current .thing

airquality:aqi:home "AirQuality" @ "Krakow" [ apikey="XXXXXXXXXXXX", location="50.06465,19.94498", refresh=60 ]

Possible additional one, something like:

airquality:luftdaten:home "AirQuality" @ "Krakow" [ apikey="XXXXXXXXXXXX", location="50.06465,19.94498", refresh=60 ]

I just add Air Quality binding. It’s working great! I can’t find the reason why I have to have two same looking item files (airquality.items and home.items) but this is me as I’m new to OpenHAB and home automation.

I have small request. Could you please add “Wind” and “SO2” to the binding as both values are available from my local station? Would be great!

The binding works perfectly, sadly it is the airqn.org that doesnt perform well.
Though I have 3 airquality stations in my vicinity that carry recent data if I check them through www.luchtmeetnet.nl, somehow Airqn.org does not register their updates since abt 5 mo. Therefore it connects me to a far away station across the border into Belgium, in an industrialized area, while I live semi rural :slight_smile:
I think I best see if there is a usable way to get and parse it myself from the dutch airquality net.
Anyway, this is just adding some info and in no way criticism on your great binding

See this:

1 Like

@kubawolanin I have the same issue here. aqi:"-" is creating this issue:

2021-01-24 11:39:36.448 [WARN ] [y.internal.handler.AirQualityHandler] - Error running aqicn.org request: Configuration is incorrect

may I ask you to see if we can fix it somehow?

thanks
Andrea

Just a note, i was using this binding with OH 3.1

After upgrading to ΟΗ3.2 i noticed items stopped updating.

I had to make a new bridge thing and a new station thing.

Then linked my previous items to the the channels.

I recently switched to OH3 and I am able to be online with generated API. But I can not get any data from the station.
Giving location in the binding I do not receive any channels visible. How to set up refresh timing?

Regards,
Jacek