core
core copied to clipboard
Airthings BLE Sensors Go Unavailable
The problem
The Airthings BLE integration updates its sensors then five minutes later they go unavailable
What version of Home Assistant Core has the issue?
2023.11.2
What was the last working version of Home Assistant Core?
?
What type of installation are you running?
Home Assistant OS
Integration causing the issue
Airthings BLE
Link to integration documentation on our website
No response
Diagnostics information
2023-11-20 17:01:15.306 ERROR (MainThread) [homeassistant.components.bluetooth.scanner] hci0 (D8:3A:DD:39:xx:yy): Error stopping scanner: [org.bluez.Error.DoesNotExist] Does Not Exist 2023-11-20 17:06:15.315 ERROR (MainThread) [homeassistant.components.bluetooth.scanner] hci0 (D8:3A:DD:39:xx:yy): Error stopping scanner: [org.bluez.Error.DoesNotExist] Does Not Exist 2023-11-20 17:13:49.416 DEBUG (MainThread) [homeassistant.components.airthings_ble] Get device characteristics exception: [org.freedesktop.DBus.Error.NoReply] Remote peer disconnected 2023-11-20 17:13:51.480 DEBUG (MainThread) [homeassistant.components.airthings_ble] Finished fetching airthings_ble data in 29.054 seconds (success: False) 2023-11-20 17:13:58.132 DEBUG (MainThread) [homeassistant.components.airthings_ble] Get device characteristics exception: [org.freedesktop.DBus.Error.UnknownObject] Method "ReadValue" with signature "a{sv}" on interface "org.bluez.GattCharacteristic1" doesn't exist 2023-11-20 17:14:00.174 DEBUG (MainThread) [homeassistant.components.airthings_ble] Finished fetching airthings_ble data in 3.263 seconds (success: False) 2023-11-20 17:14:13.205 DEBUG (MainThread) [homeassistant.components.airthings_ble] Characteristics not handled: 00002a29-0000-1000-8000-00805f9b34fb 2023-11-20 17:14:16.179 DEBUG (MainThread) [homeassistant.components.airthings_ble] Finished fetching airthings_ble data in 5.702 seconds (success: False) 2023-11-20 17:14:38.748 DEBUG (MainThread) [homeassistant.components.airthings_ble] Characteristics not handled: 00002a29-0000-1000-8000-00805f9b34fb 2023-11-20 17:14:41.187 DEBUG (MainThread) [homeassistant.components.airthings_ble] Finished fetching airthings_ble data in 4.608 seconds (success: False) 2023-11-20 17:15:57.474 DEBUG (MainThread) [homeassistant.components.airthings_ble] Finished fetching airthings_ble data in 36.137 seconds (success: False) 2023-11-20 17:16:15.337 ERROR (MainThread) [homeassistant.components.bluetooth.scanner] hci0 (D8:3A:DD:39:xx:yy): Error stopping scanner: [org.bluez.Error.DoesNotExist] Does Not Exist 2023-11-20 17:17:53.644 DEBUG (MainThread) [homeassistant.components.airthings_ble] Finished fetching airthings_ble data in 36.090 seconds (success: False) 2023-11-20 17:22:15.348 ERROR (MainThread) [homeassistant.components.bluetooth.scanner] hci0 (D8:3A:DD:39:xx:yy): Error stopping scanner: [org.bluez.Error.DoesNotExist] Does Not Exist 2023-11-20 17:35:15.372 ERROR (MainThread) [homeassistant.components.bluetooth.scanner] hci0 (D8:3A:DD:39:xx:yy): Error stopping scanner: [org.bluez.Error.DoesNotExist] Does Not Exist
Example YAML snippet
N/A
Anything in the logs that might be useful for us?
N/A
Additional information
No response
Hey there @vincegio, @lastrada, mind taking a look at this issue as it has been labeled with an integration (airthings_ble
) you are listed as a code owner for? Thanks!
Code owner commands
Code owners of airthings_ble
can trigger bot actions by commenting:
-
@home-assistant close
Closes the issue. -
@home-assistant rename Awesome new title
Renames the issue. -
@home-assistant reopen
Reopen the issue. -
@home-assistant unassign airthings_ble
Removes the current integration label and assignees on the issue, add the integration domain after the command. -
@home-assistant add-label needs-more-information
Add a label (needs-more-information, problem in dependency, problem in custom component) to the issue. -
@home-assistant remove-label needs-more-information
Remove a label (needs-more-information, problem in dependency, problem in custom component) on the issue.
(message by CodeOwnersMention)
airthings_ble documentation airthings_ble source (message by IssueLinks)
Yeah, the same thing has begun happening to me. It's a bummer
Same here
Same here!
2023-12-02 09:56:15.485 DEBUG (MainThread) [homeassistant.components.airthings_ble] Finished fetching airthings_ble data in 81.014 seconds (success: False)
2023-12-02 09:58:16.776 DEBUG (MainThread) [homeassistant.components.airthings_ble] Finished fetching airthings_ble data in 81.012 seconds (success: False)
I recently purchased an Airthings Wave+ because of the HA integration and the first week it was rock solid and then suddenly yesterday at 8pm ET, the data stopped flowing in for some reason.
I have physically moved AirThings device to be within 1m of the Raspberry Pi 4 that is running HAOS to help to eliminate range/interference. Prior to 8pm yesterday, the Pi was located about 5m away.
After looking at bluetoothctl, I saw that the devices were connecting and then dropping (all devices not just Airthings) every minute or so. I thought that perhaps I needed to remove and re-add my bluetooth device in HA, but I think that i figured it out.
When I looked at Settings | Integrations | Bluetooth | Configure I had "Passive Scanning" enabled. I disabled it and restarted and it's been connected solidly ever since. It makes sense because the passive scanning is to extend battery life and so grabbing and releasing BT would result in disconnections and infrequent updates.
Mine dropped out yesterday with "Passive Scanning" disabled from day one.
Same here.. Got four Wave Pluses all acting the same way. Going very stable for some time, then starting to decrease reporting, before ending more or less totally disconnected displaying NaN. Tried soft and hard reboots of both HA and units themselves.
Running in ProxMox with only ESPhome BT proxies, not local BT or other dongles.
Mine dropped out yesterday with "Passive Scanning" disabled from day one.
Apparently switching "Passive scanning" on and off is sorting issue, at least temporarily.
I was having the same issue and got it to finally connect by turning on "Passive scanning". I will leave it on and check back tomorrow to see if it stays connected.
I think passive scanning are not the solution, The Bluetooth should works as active scanning, maybe when you use a bluetooth proxy like Shelly plus devices, you can set these as passive but the root Bluetooth I think isn’t a good idea.
I found another solution and at the moment is still working from 1 hour a go, turn the active scanning, and go to integrations, airthings BLE, three dots, system options and disable check box of Enable Polling for updates.. I’ll update my status as soon have news about the solution
I have the same issue, but found out today that if you use the Airthings HUB they disable Bluetooth on the devices. https://help.airthings.com/en/articles/6009826-wave-understanding-the-connectivity-and-compatibility-of-your-wave My first Airthings device, a Wave 1. gen does not support the hub and is stable on Bluetooth. So, this is a feature, not a fault. At least from Airthings perspective. :-)
I am not using the hub. I've tried a few things and many times it will start working after I fiddled with various things (meaning I don't know if what I did or whether what I did helped) and it'll start working for a while and then randomly go offline again in the next day or two. This time I will leave it and see if it comes back on its own or not.
The only log entries that I have captured are timeouts:
2023-12-18 09:04:48.085 ERROR (MainThread) [homeassistant.components.airthings_ble] Error fetching airthings_ble data: Unable to fetch data: F4:60:77:XX:XX:XX - F4:60:77:XX:XX:XX: Failed to connect after 4 attempt(s): TimeoutError
2023-12-18 09:15:00.316 ERROR (MainThread) [homeassistant.components.airthings_ble] Error fetching airthings_ble data: Unable to fetch data: F4:60:77:XX:XX:XX - F4:60:77:XX:XX:XX: Failed to connect after 4 attempt(s): TimeoutError
2023-12-18 09:32:54.314 ERROR (MainThread) [homeassistant.components.airthings_ble] Error fetching airthings_ble data: Unable to fetch data: F4:60:77:XX:XX:XX - F4:60:77:XX:XX:XX: Failed to connect after 4 attempt(s): TimeoutError
[I redacted the BT MAC]
and sometimes:
2023-12-18 10:17:44.362 DEBUG (MainThread) [homeassistant.components.airthings_ble] Finished fetching airthings_ble data in 81.026 seconds (success: False)
2023-12-18 10:18:56.019 DEBUG (MainThread) [homeassistant.components.airthings_ble] Finished fetching airthings_ble data in 66.533 seconds (success: False)
I looked into the MQTT integration but that is for Airthings Business only.
I haven't been able to connect to my 2 Airthing Wave+ devices since Dec 17th. Fails to connect with TimoutError.
For those experiencing issues:
- Are there any other Bluetooth devices connected to Home Assistant?
- If yes, do they work? Are there any errors or warnings?
- How close are your Home Assistant PC/proxies to the Airthings devices?
- What firmware version are you using?
- Navigate to Settings -> Devices & Services -> Airthings BLE -> select device -> FW version should be available in the top left corner.
- Do you use the Airthings app(s)?
- Does it work?
- Are you using Android and/or iOS?
- What is the version of the app?
- Please check if the device requires a firmware update.
- Have you tried pulling out and re-inserting the batteries?
- Are you using a hub?
- If yes, be aware that it may cause issues. The device will only broadcast for a short period each time it boots or when you wave in front of it if it's hub-connected.
- If you have a hub, I recommend using the Airthings integration (cloud-connected).
- What is the remaining battery percentage on the devices? (Note: The current battery calculation is incorrect and will be fixed soon.)
- If you have more than one device: Do all devices go offline simultaneously, or is it only one at a time?
I apologize for all the questions; I'm struggling to debug the issue. I'm attempting to identify any patterns. Personally, I haven't encountered any problems with this integration.
@LaStrada Thank you for aiding in debugging.
Are there any other Bluetooth devices connected to Home Assistant? No, this is my only device.
How close are your Home Assistant PC/proxies to the Airthings devices? Within 4 meters, but I have also duplicated the problem when the unit was very close so proximity or interference does not seem to be the problem.
What firmware version are you using? Wave Plus by Airthings AS Firmware: G-BLE-2.2.0-master+0 Hardware: REV A
Do you use the Airthings app(s)? Yes, I use Android and yes the App works and connects fine even when the BLE is failing. The update frequency is notably less on the App, I think its 15 minutes vs perhaps a minute with BLE. App version is 3.10.7
Have you tried pulling out and re-inserting the batteries? Yes, I did this. The problem was resolved for ~24h until it returned again for a few hours and then resolved on its own.
Are you using a hub? No.
What is the remaining battery percentage on the devices? HA is reporting 73%
If you have more than one device: Do all devices go offline simultaneously, or is it only one at a time? Sadly, my only device.
Hello @LaStrada , here I leave you my information, thank you very much for investigating this, in my case since 2023.10 it stopped working properly
Are there any other Bluetooth devices connected to Home Assistant? Yes, I'm using switchboot devices
If yes, do they work? Are there any errors or warnings? Working as expected
How close are your Home Assistant PC/proxies to the Airthings devices? It's on a different floor but I'm using a bluetooth proxy with Shelly devices near the Airthings device, even if I bring it closer it doesn't work
What firmware version are you using? Wave Plus by Airthings AS Firmware: G-BLE-2.2.0-master+0 Hardware: REV A
Do you use the Airthings app(s)? YES
Does it work? YES
Are you using Android and/or iOS? iOS
What is the version of the app? Version 3.10.3 (458)
Have you tried pulling out and re-inserting the batteries? YES
Are you using a hub? No
What is the remaining battery percentage on the devices? 64%
If you have more than one device: Do all devices go offline simultaneously, or is it only one at a time? Only one
Additional debugging questions:
Is this issue specific to when you are at home, or does it initiate upon your arrival? If it only occurs when you're home, what happens when you disable Bluetooth on your phone or restrict BLE access to the app? (Remember to re-enable it later to be able to use the app!) The app attempts to fetch data in the background, but if there's a bug in the app or operating system, this can result in a persistent connection to the device. I remember someone mentioned a similar problem on Android (unfortunately, I don't recall the phone's brand or model).
Have you tried restarting Home Assistant or the BLE proxies you're using? There might be a similar issue as mentioned above, the device not disconnecting HA/proxy.
When you wave in front of the device, does it respond by lighting up? If, for some reason, the device is hub-connected (even if it shouldn't be so), it should light up and start broadcasting over ble for a few seconds (if it wasn't doing so before). You might need to reload the integration as well at the same time.
For users of the "Airthings Wave" app, can you try installing the new app named "Airthings" (currently supporting View devices + Wave Plus)? And then try this:
- Ensure the device is near your phone.
- Navigate to Settings -> Devices -> select the problematic device.
- Check the connectivity mode displayed.
- If it indicates anything other than Bluetooth (e.g., ready for Bluetooth sync, connected with Bluetooth, configuring for Bluetooth), try pressing the "Reset connectivity" button at the bottom of the screen. This will reset the connectivity mode back to using Bluetooth.
Whatever you need @LaStrada , we are here to help with whatever is needed 💪🏼
Is this issue specific to when you are at home, or does it initiate upon your arrival? No, always happens
Have you tried restarting Home Assistant or the BLE proxies you're using? There might be a similar issue as mentioned above, the device not disconnecting HA/proxy. Yes, I restored all shelly devices, remove all shelly devices as a proxies, and set airthings near HA and never works as expected
When you wave in front of the device, does it respond by lighting up? Yes
I updated to the new app Airthing and found the following logs
Logger: homeassistant.config_entries
Source: config_entries.py:402
First occurred: 15:29:03 (1 occurrences)
Last logged: 15:29:03
Error setting up entry Airthings Wave Plus (115312) for airthings_ble
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/config_entries.py", line 402, in async_setup
result = await component.async_setup_entry(hass, self)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/components/airthings_ble/__init__.py", line 60, in async_setup_entry
await coordinator.async_config_entry_first_refresh()
File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 265, in async_config_entry_first_refresh
await self._async_refresh(
File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 300, in _async_refresh
self.data = await self._async_update_data()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 256, in _async_update_data
return await self.update_method()
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/components/airthings_ble/__init__.py", line 46, in _async_update_method
data = await airthings.update_device(ble_device)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/airthings_ble/parser.py", line 570, in update_device
client = await establish_connection(BleakClient, ble_device, ble_device.address)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/bleak_retry_connector/__init__.py", line 350, in establish_connection
await client.connect(
File "/usr/src/homeassistant/homeassistant/components/bluetooth/wrappers.py", line 298, in connect
connected = await super().connect(**kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/bleak/__init__.py", line 605, in connect
return await self._backend.connect(**kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/bleak/backends/bluezdbus/client.py", line 209, in connect
reply = await self._bus.call(
^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/dbus_fast/aio/message_bus.py", line 399, in call
await future
asyncio.exceptions.CancelledError
The following demonstrates the problem of intermittent communications from my Wave+. I'm using a HA Yellow and a Pi CM with built-in BT. Yesterday I tried disabling BT passive scanning and so far much better. Update: After 45 hours, not a single data loss Update: After 8 days, and multiple HA restarts, not a single data loss. So far, it looks like disabling BT passive scanning fixed my data loss problem
Are there any other Bluetooth devices connected to Home Assistant? no Do you use the Airthings app(s)? Does it work? yes, without any problems Are you using Android and/or iOS? iOS What is the version of the app? 3.10.10(458) Have you tried pulling out and re-inserting the batteries? no Are you using a hub? no What is the remaining battery percentage on the devices? (Note: The current battery calculation is incorrect and will be fixed soon.) 97% If you have more than one device: N/A
Additional info sensor is about a meter from RPi 3B. It looks like data is updated after every change of bluetooth setup (passive scanning)
Are there any other Bluetooth devices connected to Home Assistant? No, I don't think so. If yes, do they work? Are there any errors or warnings?
How close are your Home Assistant PC/proxies to the Airthings devices? One device (label: office) is like two feet away, another (bedroom) is about 20' up a level and through two walls.
What firmware version are you using? Office: BLE 2.2.0, MSP 2.2.0, sub1 2.2.0 Bedroom: same
Do you use the Airthings app(s)? Only to check that they're still working when the integration goes unavailable
Does it work? Yes, has never not worked through app as far as I can tell.
Are you using Android and/or iOS? iOS What is the version of the app? 3.10.3 (458)
Have you tried pulling out and re-inserting the batteries? No Are you using a hub? No - I assume this means an Airthings hub, right? What is the remaining battery percentage on the devices? (Note: The current battery calculation is incorrect and will be fixed soon.) Office: 61 Bedroom: 100 If you have more than one device: Do all devices go offline simultaneously, or is it only one at a time? Sometimes simultaneously sometimes one at a time. Sometimes it's after months of working (though not lately) and sometimes it's literally five minutes.
Additional debugging questions:
Is this issue specific to when you are at home, or does it initiate upon your arrival? If it only occurs when you're home, what happens when you disable Bluetooth on your phone or restrict BLE access to the app? (Remember to re-enable it later to be able to use the app!) The app attempts to fetch data in the background, but if there's a bug in the app or operating system, this can result in a persistent connection to the device. I remember someone mentioned a similar problem on Android (unfortunately, I don't recall the phone's brand or model).
Have you tried restarting Home Assistant or the BLE proxies you're using? There might be a similar issue as mentioned above, the device not disconnecting HA/proxy.
When you wave in front of the device, does it respond by lighting up? If, for some reason, the device is hub-connected (even if it shouldn't be so), it should light up and start broadcasting over ble for a few seconds (if it wasn't doing so before). You might need to reload the integration as well at the same time.
For users of the "Airthings Wave" app, can you try installing the new app named "Airthings" (currently supporting View devices + Wave Plus)? And then try this:
- Ensure the device is near your phone.
- Navigate to Settings -> Devices -> select the problematic device.
- Check the connectivity mode displayed.
- If it indicates anything other than Bluetooth (e.g., ready for Bluetooth sync, connected with Bluetooth, configuring for Bluetooth), try pressing the "Reset connectivity" button at the bottom of the screen. This will reset the connectivity mode back to using Bluetooth.
Haven't really checked on the hom/away. Will start. will also disable Bluetooth on my phone intermittently over the next several days to test
Yes, I have tried restarting. I do an automation at 30-minute unavailable restart Bluetooth and the Airthings integation. If that doesn't work I restart home assistant. If that doesn't work I reboot my pi4. If I reboot, it works like 99% of the time for a minimum of 5-10 minutes.
Yes both respond.
Well now this is interesting. The wave plus app says BLE is off for both after I turned off Bluetooth on my phone. Will check new app and update post
Did a connectivity reset and both are now connected and have been for about an hour. Will report back if the connection is lost.
Since resetting connectivity, I have had no drops. So about 24 hours.
One thing worth noting. Pulling the batteries after resetting connectivity seems to reset the long term radon averages in the Bluetooth signal but not on Airthings app. Not ideal. But I guess the data is still there, sort of.
Looks like I had my first unavailable since the connectivity reset. I was definitely home. Bluetooth wasn't turned off on my phone.
Both apps look to be normal in terms of connectivity.
Anything else you would want me to pull?
Watching closely. I have the same problem. I left a message at Airthings. Lets see how they respond (not until 01/03/24). How many HA users are having problems and not having problems? Hope we get this fixed. For a long time I have been monitoring my radon. I have mitigation installed. It was 20x acceptable before mitigation. Now it is 50% above recommended. I am 76YO, so probably not what is going to kill me. (LOL).
Watching closely. I have the same problem. I left a message at Airthings. Lets see how they respond (not until 01/03/24). How many HA users are having problems and not having problems? Hope we get this fixed. For a long time I have been monitoring my radon. I have mitigation installed. It was 20x acceptable before mitigation. Now it is 50% above recommended. I am 76YO, so probably not what is going to kill me. (LOL).
I'm working for Airthings, and I'm trying to figure out why this is happening. The integration has been maintained by the open source community, but we (Airthings) have started taking over the maintenance of this integration.
And the customer support tickets for Home Assistant integration will probably end up in my inbox anyways!
In my case sometimes the device data sync is lost for hours (or a day or so), and the only way to get things working again is to reboot my home assistant system (not restart).
Are there any other Bluetooth devices connected to Home Assistant? Yes, it works with no errors or warnings How close are your Home Assistant PC/proxies to the Airthings devices? 7+- meters What firmware version are you using? Firmware: G-BLE-2.2.0-master+0 Do you use the Airthings app(s)? Yes Does it work? Yes Are you using Android and/or iOS? iOS What is the version of the app? Latest available on App Store 3.10.3 (458) Have you tried pulling out and re-inserting the batteries? Yes Are you using a hub? No What is the remaining battery percentage on the devices? 99% Is this issue specific to when you are at home, or does it initiate upon your arrival? It happens even when no one is at home. Have you tried restarting Home Assistant or the BLE proxies you're using? Rebooting system will resolve the issue for a few hours and then the disconnections happen frequently again. When you wave in front of the device, does it respond by lighting up? Yes For users of the "Airthings Wave" app, can you try installing the new app named "Airthings" (currently supporting View devices + Wave Plus)? I just installed the new app and removed the old one, and it shows connectivity via Bluetooth. In case this has helped with resolving the issue I will update here.
Watching closely. I have the same problem. I left a message at Airthings. Lets see how they respond (not until 01/03/24). How many HA users are having problems and not having problems? Hope we get this fixed. For a long time I have been monitoring my radon. I have mitigation installed. It was 20x acceptable before mitigation. Now it is 50% above recommended. I am 76YO, so probably not what is going to kill me. (LOL).
I'm working for Airthings, and I'm trying to figure out why this is happening. The integration has been maintained by the open source community, but we (Airthings) have started taking over the maintenance of this integration.
And the customer support tickets for Home Assistant integration will probably end up in my inbox anyways!
Much appreciated. My 1st gen waves have worked great ... great product.
I finally (?) got the error my self! One of my Wave Radon devices failed, and it's located far away from the HA PC that it was probably connected through a BLE proxy, which is located < 0.5m away. I was able to run some diagnostics on the device, and everything seems to be fine. Not connected to a hub, enough battery, all sensors responding etc. All other PCs/phones were able to connect to it, so no hanging connections from my HA pc or BLE proxies, which was my previously theory. Reloading the integration fixed it for me.
Still not sure what's going on, but will keep debug logging enabled to see if it happens again.
The only thing I noticed from the logs is that it seems like it's not retrying after it failed, at least not for a while. Will investigate more!