-
Notifications
You must be signed in to change notification settings - Fork 354
BLE Advertising stops when HA app is in foreground for particular iOS 18.3+ devices #3583
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
FYI @jksmurf found that their iPad Air 3 had the Location Services permission on their HA app set to "While Using", but changing it to "Always" did not have any affect on the observed behaviour. They have observed that their iPad Air 3 does also exhibit the behaviour of intermittent advertising while off or not in HA app, but the reliable advertising-stops-when-opening-ha-app persists. @oneseventhree thanks, I have updated the table in the original post. |
Have you tried disabling HA bluetooth permission? The app only uses bluetooth related features in "Devices & services" screen while looking for Improv devices, besides that there is no BT interaction. Let mw know what could cause the advertisement to stop, as far as I know this is handled by the system and can't be overridden by an App |
I did and still I get the problem: |
Hi All! Thanks for starting this thread. Its been frustrating tracking down this issue... Seems as though the app causes the iPhone to go 'unknown' in Bermuda and can be replicated. What can I look for in any logs?
Cheers! EDIT: Here's what it looks like 30 seconds(ish) after opening the HA iOS app. Then immediately closing the app once I notice the unknown state. I didnt notice any other activity or errors in debug logging. 2025-05-06 10:34:01.242 DEBUG (MainThread) [custom_components.bermuda] Finished fetching bermuda data in 0.007 seconds (success: True) 2025-05-06 10:34:21.248 DEBUG (MainThread) [custom_components.bermuda] Finished fetching bermuda data in 0.007 seconds (success: True) |
Yes. Removing Bluetooth permissions does not seem to have any affect. The device still goes |
Tried v0.8.2-beta1 of Bermuda. For my iOS devices same result as reported in first issue.
|
iOS device model, version and app version
Home Assistant Core Version
Noted in table above.
Describe the bug
When opening the HA Companion app on these devices, all BLE advertising with the known IRK appears to cease. This is observed via the Bermuda custom integration (of which I'm the author), which receives BLE advertisements via local bluetooth adaptors and ESPHome or Shelly Bluetooth proxies. The MAC addresses of the devices are validated by the
Private BLE Device
integration in HA-core.@jksmurf finds that their iPhone13 does not have the issue, but their iPad Air Gen3 does. Both devices have the same versions of iOS and HA Companion app installed, and both appear to have equivalent settings (see agittins/bermuda#544 for screenshots etc).
To Reproduce
Observe (via a separate device) the tracking entities in Homeassistant / Bermuda (Area, Distance sensors) showing active updates while the iOS device is in screen-off or unlocked-screen-on states, providing the App is not open in the foreground.
Open the HA App on the device.
Wait 30 seconds (this is an internal timeout in Bermuda) and observe the Area and Distance sensors for the device switch to
Unknown
, indicating no advertisements have been observed in the last 30 seconds.Go to the home screen or switch to another app on the device.
Observe that the entities in Bermuda immediately start reflecting Distance and Area states, indicating that BLE advertising using the known IRK has resumed.
Expected behavior
It is expected that BLE advertisements are regularly (in the order of 200ms to 4s) received, which can be matched against the known IRK and will cause entity updates for the Bermuda Distance and Area entities, regardless of the HA companion app's state.
Additional context
This observed behaviour is documented by the above-mentioned users at agittins/bermuda#544
There is a larger issue of devices running iOS 18.3 (and later) going for extended periods without any apparent BLE advertising. This is currently thought to be due to power saving, and definitely occurs during screen-off time, and no relationship between that issue and the HA App is suspected. Research is on-going to try and identify if there is other BLE traffic being sent during these outages that some part of the iOS -> Proxy -> HA -> PBLED -> Bermuda chain is somehow failing to identify. That issue has further information at agittins/bermuda#375 on the Bermuda issue queue and a related bug report on the
Private BLE Device
core integration at home-assistant/core#123036Again, this issue being reported on the App appears distinct from the issues related to the ones mentioned in the previous paragraph, but there is definitely a cross-over of users due to the commonalities, so it is important to qualify reports that they are experiencing the BLE outage exclusively when the HA App is in the foreground.
I don't personally have access to any iOS 18+ capable devices, except from occasional visits from a family member, and their device does not have HA installed on it. I am hopeful that the accounts mentioned above (which have been carefully qualified on Bermuda issue 544) will join this issue and provide any further details and testing required.
I took a look through the recent changes in the HA App and couldn't see anything likely to cause this sort of problem (the improv changes didn't look likely), so I'm guessing this might be some esoteric iOS quirk. I hope the above and linked issues are helpful, for what they're worth.
The text was updated successfully, but these errors were encountered: