Airthings Wave Home Assistant Add-on

In case anyone finds it helpful, I have packaged a python script that I wrote to pull sensor values from Airthings Wave devices as a Home Assistant Add-on, which can be found at GitHub - mjmccans/hassio-addon-airthings. You can click here to see my prior posting about the script itself, but I will reproduce the description below for ease of access.

The add-on pulls sensor values from Airthings environmental monitoring devices via Bluetooth Low Energy (BLE) and sends those values to Home Assistant via MQTT discovery. This means that the Airthings device and its associated sensors will automatically appear in Home Assistant if everything is set up correctly. For example, in my system the following device and associated sensors appear in Home Assistant after running the script:

The add-on has been working well for me on an Odroid N2+ running HassOS, and I have also tested it on a Raspberry Pi and a Supervised install on Debian (although you need to make sure the right bluetooth packages are installed if you go the Supervised route). I would also like to point out that my script leverages code developed by Marty Tremblay for his sensor.airthings_wave project for interacting with Airthings devices. Marty’s project is a great one, and you should definitely check it out if you are looking for a custom component to interface with Airthings devices. If you find my script useful please head over to Marty’s project and consider a donation because he really did all of the heavy lifting figuring out how to interface with these devices.

I look forward to any feedback people have, and hope that this proves helpful to others.

1 Like

Your integration is awesome!

Kudos!

I’m sure they can get you one the new Airthings View+ for test ? :stuck_out_tongue:

Looks like a neat little device, but it is not clear from the product page if you can still get the sensor data through btle or if it is sent via wifi. Either way, there is about a zero percent chance they would send me one to test so someone else will have to figure that out!

Thanks for this! I really appreciate how easy it was to configure and setup. I have it running on an Intel NUC and works great.

Any chance we could get this to use the official homeassistant Bluetooth support so that we can use the new Bluetooth proxies? I’m having to dedicate a Pi only to this integration, would be great if I could use something cheaper that could be used for some other stuff too.

I ported the addon over to the new bluetooth library (bleak) that Home Assistant uses, and someone picked up some of that work and is brining Airthings support to Home Assistant Core (see this pull request). I understand the request just missed this month’s deadline but there is a decent chance it will be included in the November update. It uses the new bluetooth integration, and will have nice features such as automatic discovery and I would assume it would also work with the new bluetooth proxies. In other words, my script and addon may soon be obsolete.

3 Likes

That’s great! My Pi died that was running this addon, so I was hoping just for this kind of development for my next iteration! Fingers crossed!

any special things we need to do to migrate from this addon to the new official integration?

I am using the new integration and so far it is working well. The only minor gripe that I have is rounding (or lack thereof) of the sensor values. Given the sensors in the device my personal preference from a significant digits perspective (and what my addon did) is to round all of the values to not include any decimals except for the temperature that I would round to one decimal point.

In terms of moving from my addon to the new integration, it is pretty easy. The new integration should automatically detect your Airthings device and you can use the GUI to configure it, which is a much better user experience than my addon. You would also need to stop and uninstall my addon, and go to your devices list and delete the Airthings Device that addon added (it will be marked as from the “MQTT” integration). Once you do that you should be ready to go, and if you want you can rename the new sensors to match the old ones if you want to keep historic data and/or don’t want to update your dashboards.

If you agree with my personal preference on rounding you can add template sensors that do the rounding to mimic the addon’s behaviour. That is what I have done, although I hope that the rounding logic gets updated in a future release of the new integration (but perhaps others do not share my rounding preferences).

I hope the above helps, but let me know if you have any problems with the migration.

1 Like