ESPresense icon indicating copy to clipboard operation
ESPresense copied to clipboard

iPhone stops reporting randomly

Open harphere opened this issue 2 years ago • 18 comments

Describe the bug iPhone 12 Pro went not_home all of a sudden and has not gone back to bedroom like it was doing earlier today. It is currently 10PM MST and the last reported message in MQTT Explorer is from 9:47PM and the phone is a little more than a meter from the ESP32. I launched room-assistant app and immediately saw MQTT messages pouring in but when I configured mqtt_room in HA and rebooted, the MQTT messages stopped arriving for room-assistant. Both methods are frozen and nothing in MQTT is occurring for these 2 but my Android phone is chugging along just fine. I rebooted the ESP32 but no dice.

Expected behavior MQTT messages to keep coming and not suddenly stop.

Hardware Details iPhone 12 Pro latest iOS 15.x and running room-assistant app

Config

  • [ ] Active Scan enabled
  • [ ] Query enabled

Logs NA Screenshots NA

harphere avatar Feb 10 '22 05:02 harphere

I can confirm that the iPhone 13 also suffers from this random issue - I left my iPhone next to the ESP all day yesterday and today - and get the following results: image

leacho73 avatar Feb 10 '22 12:02 leacho73

Same here! using iPhone 13 Pro + ESP32 Wemos D1 Mini

jcastro avatar Feb 10 '22 15:02 jcastro

What are the ids you're using?

DTTerastar avatar Feb 11 '22 02:02 DTTerastar

I'm using apple:iphone14-2 which is what I do sometimes see in MQTT Explorer. Bluetility shows it too: Screenshot 2022-02-11 at 14 01 00

k41zen avatar Feb 11 '22 14:02 k41zen

Initially "apple:13-3" but after a reboot it appears as "apple:1005:9-12".

harphere avatar Feb 11 '22 17:02 harphere

Same here. Apple don't work. iPhone XR iPhone 11 2 x Apple Watch Series 7

tobst96 avatar Feb 12 '22 22:02 tobst96

I am having trouble with spotty reporting for an iPhone 14 Pro, iPhone XS and an Apple Watch Series 7, too.

DanielBaulig avatar Feb 13 '22 19:02 DanielBaulig

The newest version allows you to selectively decide which ids you want queried to improve the id. You can now put "apple:1005:9-12" in the query box and it'll ask the phone for it's model and turn it into "apple:13-3". BUT if apple:1005:9-12 is working for you reliably it's better just to use that and keep query empty. The ESP32 has to stop listening while sending out the queries which hurts the reliability of receiving advertisements from devices.

DTTerastar avatar Feb 14 '22 19:02 DTTerastar

Thank you for this additional information. This setting along with a lot of other options don’t seem to be particularly well documented in the user documentation.

If I undertone this correctly we should minimize device querying as much as possible?

What are some situations in which apple devices will require device querying to be tracked reliably?

If a device gets queried but it doesn’t produce another I’d, does that mean that the query is effectively useless and inshore rather not query that device?

If a device gets queried and produces a different id, will the „original“ id continue to function or will the new id replace the original id?

On Feb 14, 2022, at 11:14 AM, Darrell @.***> wrote:

 The newest version allows you to selectively decide which ids you want queried to improve the id. You can now put "apple:1005:9-12" in the query box and it'll ask the phone for it's model and turn it into "apple:13-3". BUT if apple:1005:9-12 is working for you reliably it's better just to use that and keep query empty. The ESP32 has to stop listening while sending out the queries which hurts the reliability of receiving advertisements from devices.

— Reply to this email directly, view it on GitHub, or unsubscribe. Triage notifications on the go with GitHub Mobile for iOS or Android. You are receiving this because you commented.

DanielBaulig avatar Feb 14 '22 20:02 DanielBaulig

Same issue with iPhone X, iOS 15.3.1 and ESPresense v2.0.34.

abreups avatar Mar 02 '22 00:03 abreups

Looking at this more closely again, the model for my iPhone - apple:iphone:13-3 is sometimes listed in MQTT and hence successfully reporting and sometimes not - thus the randomness. I have the device ids in the Query field but can't nail down a pattern to the missing model. These are the device ids I set - apple:1005:9-12 apple:1005:9-8 apple:1005:9-26

I'm using Query because without it the device ids on their own are not stable enough and report incorrectly.

harphere avatar Mar 23 '22 21:03 harphere

Just wanted to add to this. It looks like the device fingerprinting doesn't always work. I have set up room assistant on the devices. It will work but then I think the mac changes and the device is no longer registering as roomassistant:xxxx-xxx but it has gone back to apple:1006:10-8. I saw this behaviour by using MQTT explorer and seeing the mac coming up under multiple devices depending on the esp. Is it easy to debug this code?

afinzel avatar May 08 '22 13:05 afinzel

The newest beta has a feature to "Enroll" iOS devices. We store the BLE IRK and from that point on you can use that irk:{32chars} to uniquely identify that iOS device!

DTTerastar avatar Jul 18 '22 06:07 DTTerastar

That is great news. Thanks

afinzel avatar Jul 18 '22 06:07 afinzel

The newest beta has a feature to "Enroll" iOS devices. We store the BLE IRK and from that point on you can use that irk:{32chars} to uniquely identify that iOS device!

This is great, thanks, when will this Beta be available?

leacho73 avatar Jul 20 '22 10:07 leacho73

Check the box labeled "Prerelease" and you'll have it in 5 minutes!

DTTerastar avatar Jul 20 '22 19:07 DTTerastar

It's also installable via: https://espresense.com/beta

DTTerastar avatar Jul 20 '22 19:07 DTTerastar

Ah cheers @DTTerastar - I am running 2.2.8 - but couldn't see how to interview the apple devices, so assumed I didn't have it :)

leacho73 avatar Jul 21 '22 09:07 leacho73

It's released, going to close this.

DTTerastar avatar Sep 01 '22 14:09 DTTerastar