core icon indicating copy to clipboard operation
core copied to clipboard

Private BLE and iOS18 Beta

Open broyuken opened this issue 1 year ago • 27 comments

The problem

I believe something changed in the iOS18 beta with regards to BLE. My phone is on the beta and sometimes I can add the irk and have HA work for a few hours, and then it will say I'm away. I am then unable to add the irk back into HA as it says

"The provided IRK does not match any BLE devices that Home Assistant can see."

What version of Home Assistant Core has the issue?

core-2024.7.4

What was the last working version of Home Assistant Core?

2024.7.3

What type of installation are you running?

Home Assistant OS

Integration causing the issue

private_ble_device

Link to integration documentation on our website

https://www.home-assistant.io/integrations/private_ble_device/

Diagnostics information

N/A

Example YAML snippet

No response

Anything in the logs that might be useful for us?

Nothing in the logs

Additional information

I have apple watches on WatchOS9 and my wifes iPhone on iOS17 and they all work fine, this only affects my phone on the iOS18 beta.

broyuken avatar Aug 01 '24 21:08 broyuken

Hey there @jc2k, mind taking a look at this issue as it has been labeled with an integration (private_ble_device) you are listed as a code owner for? Thanks!

Code owner commands

Code owners of private_ble_device 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 private_ble_device 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)


private_ble_device documentation private_ble_device source (message by IssueLinks)

home-assistant[bot] avatar Aug 01 '24 21:08 home-assistant[bot]

Your symptoms are consistent with iOS not sending any beacons after entering some idle state or not using resolvable private addresses in all contexts. If that's done deliberately to enhance privacy then it's unlikely this integration will work with ios18.

But I've read there are lots of problems with Bluetooth in the beta, so not really anything to be done at this point.

Jc2k avatar Aug 01 '24 22:08 Jc2k

I would agree, but more or less wanted to bring it to your attention as something that might break this integration for iOS devices if this behavior persists to the pros release or ios18

broyuken avatar Aug 02 '24 00:08 broyuken

Oh oh… that would be a real downer. I absolutely love and urgently need this integration (in top 3 of my favorite integrations list), basically my presence detection relies on it (at least for ultra quick coming home detection outperforming all other types like WiFi). Hopefully this will continue to work with iOS 18. How to use the remaining time (roughly two weeks) to check this? I saw not much happened for a month here.

  • Did the behavior improve with latest beta releases of iOS 18?
  • Are there other iOS 18 beta users who can verify/falsify those symptoms?

bcutter avatar Sep 03 '24 08:09 bcutter

I don't run betas on my phone. No one else has reported any trouble. Have you tried the iOS beta yourself?

Jc2k avatar Sep 03 '24 08:09 Jc2k

I don't run betas on my phone.

Too.

No one else has reported any trouble.

Well, how many use this integration with iOS 18 beta?


So I guess we need to wait for the public release and see what happens...

bcutter avatar Sep 03 '24 09:09 bcutter

You’re more than welcome to run the beta. There’s a public beta you can try. It’s very stable.

broyuken avatar Sep 03 '24 11:09 broyuken

Did the behavior improve with latest beta releases of iOS 18?

That question was for you @broyuken

bcutter avatar Sep 03 '24 13:09 bcutter

Nope, still doesn't work for me. I can't even add a private BLE anymore, I get this. WhatsApp Image 2024-09-03 at 10 16 53_ee37a7fd

broy-bt avatar Sep 03 '24 15:09 broy-bt

And once you downgrade (iOS 17) it works again?

Not that some method to gather the IRK needs to be changed.

bcutter avatar Sep 03 '24 18:09 bcutter

I didn't downgrade, but my wifes phone on ios17 still works fine.

broyuken avatar Sep 03 '24 19:09 broyuken

Well, not really a reliable cross-check, isn't it.

bcutter avatar Sep 03 '24 19:09 bcutter

It worked prior to the upgrade, didn't work after the upgrade. It also continues to work on her phone which was not upgraded. After the upgrade, even if I try to add it back in, HA says that it can't reach the irk.

broyuken avatar Sep 03 '24 19:09 broyuken

Silly question, I have a bunch of esphome devices set up for btproxy. Do I need to have my usb bluetooth dongle plugged in to add a private ble device? Or can it use the proxies for the initial setup?

Edit, just answered my own question. Added another device on iOS17 without the usb dongle and it worked just fine. This still appears to be an iOS18 issue.

broyuken avatar Sep 03 '24 19:09 broyuken

HA says that it can't reach the irk

And it did not change? Did you read the IRK once again after upgrading iOS to version 18?

bcutter avatar Sep 03 '24 20:09 bcutter

Yes I re-paired with an espresence device and got the irk again to make sure. It still says it can’t reach it.

broyuken avatar Sep 04 '24 13:09 broyuken

Oh that's really bad. Guess we need more iOS 18 users to see if it's a common issue (happens automatically in a few days once it is released). I fear it is...

bcutter avatar Sep 04 '24 14:09 bcutter

I updated today to what I believe is the official iOS18 release and it started working again. My HA was able to see my device and set up the Private BLE tracker. So at least for now crisis averted. Will monitor it for a while to see if it loses state or goes unavailable, but we're in better shape than we were before.

broyuken avatar Sep 11 '24 14:09 broyuken

That's good to hear.

Note: Apple released the RC version of iOS 18 yesterday, the stable release has not been shipped yet (expected for next week).

Anyway, that's a good sign. Maybe they sorted out the Bluetooth issues mentioned before and therefore also this integration continues to work.

bcutter avatar Sep 11 '24 15:09 bcutter

And it’s broken again, on both my phone and my wife’s who has updated to the official ios18

broyuken avatar Sep 21 '24 15:09 broyuken

Working fine with iOS 18 here, both on a 14 Pro and a 16 Pro. Still early days; i'll update if it changes.

Jc2k avatar Sep 21 '24 18:09 Jc2k

Oh no. So can we finally start to sort this out? I still fear we otherwise might run into serious trouble with the masses updating to iOS 18...

bcutter avatar Sep 21 '24 18:09 bcutter

Updated to iOS 18 and as soon the screen goes off, presence stops working. I guess in iOS 18 when the device is locked the BLE stops transmission.

pkoutsias avatar Sep 21 '24 18:09 pkoutsias

There must be another factor. Phone I'm on now has been showing home for 22 hours solid (since i added it). I have not had my screen unlocked for 22 hours.

This is a new phone and I specifically didn't restore from back up, so it's stock settings in terms of power management and Bluetooth.

In terms of other external factors I guess:

  • I do have paired Bluetooth accessories (AirPod pro, AirPod max, AirPod). (Edit - and an Apple Watch)

  • My Bluetooth proxies are all in active mode.

Jc2k avatar Sep 21 '24 19:09 Jc2k

Things are weird here again, sometimes it works, sometimes it doesn't, Currently my phone is working fine, but my wifes phone does has been showing away for 2 days. I'm running the iOS 18.1 beta on a 15 Pro Max, she's on stock iOS 18 on an iPhone 15 Pro (not max).

broyuken avatar Sep 27 '24 17:09 broyuken

@Jc2k any new experiences on your side after roughly one week?

I'm currently preparing my first iOS 18 device for HA and the Private BLE Device integration; will have some first impressions in a few days.

bcutter avatar Sep 27 '24 17:09 bcutter

Seems to work fine, as before (iOS 16/another iDevice). iOS 18.0 / 18.0.1.

bcutter avatar Oct 07 '24 09:10 bcutter

Not working for me. Watch works fine, phone doesn't. iPhone 15 Pro Max running 18.1. Any debug info we can share to see if we can help figure this out? For what it's worth, ESPresence works fine, same device, so I'm pretty sure it's still sending just fine.

danielgoepp avatar Nov 03 '24 00:11 danielgoepp

I'm not sure what all my headbanging was about. I turned off and BT and then restarted my phone, and now it works :( Not sure what was up...may never know. I'll keep an eye for stability now though to make sure.

danielgoepp avatar Nov 04 '24 11:11 danielgoepp

What about @broyuken meanwhile?

So mine is working just fine. iOS 18 makes literally no difference afaics.

bcutter avatar Nov 04 '24 14:11 bcutter