New air-Q binding

Dear openHAB community

I just committed the brand new binding for the air-Q device, a device that provides very detailed information about the air. It has 14 sensors included and give massive information about the air quality, including whether it is good for physical performance and for brain work.

For more information on the air-Q device: www.air-q.com (sorry, German only)
If you want to try out the binding, this is the direct link to it: https://github.com/aurelio1/openhab-addons/releases/download/v1.0/org.openhab.binding.airq-3.1.0-SNAPSHOT.jar
The link to the GitHub repository: openhab-addons/bundles/org.openhab.binding.airq at 3.0.x · aurelio1/openhab-addons · GitHub

It is the first binding I am contributing, and I am very excited that I can give something back to the community after I benefit for such a long time from the Open Source community in general and from the openHAB community specifically. I also send a “thank you” all those that answered my questions in this community forum and helped to reach this goal of a new binding.

Some users already tested the device, and it seems to work. I would still be happy to get your feedback about possible improvements.

EDIT: I changed the link to the .jar

1 Like

Thanks for this binding.
It works with all products or only with the since option (API access):

" Science Option: Mit der Science Option erhalten Sie vollen Zugriff auf alle API Funktionen des air-Q. Die Dokumentation ist hier zu finden: docs.air-q.com"

The binding is thoroughly developed and tested with an air-Q Pro, and according to the documentation it should also work with the regular air-Q that has only 11 sensors. The binding doesn’t need the air-Q Science to retrieve the data.

1 Like

Thank you Aurelio for your contribution!

@manswiss
the Standard API (which is used here) works for all devices, since we use it ourselves (smartphone App). Still the API documentation an advanced API functions only will work with air-Q Science.

Thanks, it works for me. Would it be possible to show the indices as percentage amount?
Kind regards

Hey @Aurelio ,

i have been using the binding for a while now, unfortunately my openhab.log is flooded with errors. But the items are filled with the sensor data correctly.
Maybe you have a hint for me?

2021-07-12 16:17:12.333 [WARN ] [ab.binding.airq.internal.AirqHandler] - air-Q - airqHandler - getData(): retried but still cannot reach the air-Q device.
2021-07-12 16:17:27.343 [WARN ] [ab.binding.airq.internal.AirqHandler] - air-Q - airqHandler - doNetwork(): Error while accessing air-Q: java.util.concurrent.ExecutionException: java.io.EOFException: HttpConnectionOverHTTP@ad95b8::SocketChannelEndPoint@1b9a6ab{l=/XXX.XXX.XXX.XX:47890,r=/XXX.XXX.XXX.XX:80,ISHUT,fill=-,flush=-,to=3/0}{io=0/0,kio=0,kro=1}->HttpConnectionOverHTTP@ad95b8(l:/XXX.XXX.XXX.XX:47890 <-> r:/XXX.XXX.XXX.XX:80,closed=false)=>HttpChannelOverHTTP@de64f2(exchange=HttpExchange@fb95aa{req=HttpRequest[GET /data HTTP/1.1]@87d2d8[TERMINATED/null] res=HttpResponse[null 0 null]@8bbd9d[PENDING/null]})[send=HttpSenderOverHTTP@169bd8a(req=QUEUED,snd=COMPLETED,failure=null)[HttpGenerator@1772088{s=START}],recv=HttpReceiverOverHTTP@1b0242c(rsp=IDLE,failure=null)[HttpParser{s=CLOSED,0 of -1}]]
2021-07-12 16:21:57.319 [WARN ] [ab.binding.airq.internal.AirqHandler] - air-Q - airqHandler - getConfigData(): Error in processConfigData(): java.lang.StringIndexOutOfBoundsException: begin 0, end -1, length 0

Device Version: 1.74

Hi @spawny0815
First of all, I would suggest that you increase the log level for this binding to TRACE. It gives some additional information. Particularly, it shows where the binding tries to connect to and with which request. Just take care that if you post the data here, that you only post the information you are really willing to show (internal ip number etc.).
Anyway it seems that your openHAB server cannot reach the device, but in my case it would then (also) show a java.net.SocketTimeoutException, which it doesn’t in your case. And it shows data. Does it show both the sensor data and the config data? You would find the config data in Things>air-Q>Information>Thing properties.

As already reported in the Air-Q forum I have three problems with the output:

The status of sensors is Null.
Humidity is shown as 46750000000000000000000000000000000000,00 %.
Oxygen concentration is shown as 208600006103515650000000000000000000,000 %.
These measured values are not the recent ones. The Air-Q seems to work correctly.
Any hint?

Kind regards

I will investigate this. Sorry, but although I have subscribed to the air-Q topic in the Air-Q forum I never get informed about new posts.