Hi,
With the recent expansion of Bluetooth capabilities in Home Assistant, including the BLE Proxy functionality of ESPHome, as well as code available from other open-source projects, I think the pieces exist to have an Apple device presence sensor, which would also probably work for none-Apple devices.
Currently, I am using ESPresense to track Apple devices after finding out their IRK (Identity Resolving Key) - this is detailed at Apple | ESPresense.
This works well, however, the drawback is that I already use ESPHome BLE Proxies for a bunch of Xiaomi and other Temp and Plant sensors, so adding ESPresense essentially doubles the number of ESP32 devices I need to deploy.
When I look at the verbose logging from ESPHome, I can see that it is already forwarding all the relevant packets to Home Assistant…
[10:06:55][V][bluetooth_proxy:033]: Proxying packet from - AA:AA:AA:AA:AA:AA (Apple iPhone). RSSI: -69 dB
[10:06:56][V][bluetooth_proxy:033]: Proxying packet from - AA:AA:AA:AA:AA:AA (Apple iPhone). RSSI: -69 dB
[10:06:57][V][bluetooth_proxy:033]: Proxying packet from - AA:AA:AA:AA:AA:AA (Apple iPhone). RSSI: -70 dB
[10:06:57][V][bluetooth_proxy:033]: Proxying packet from - BB:BB:BB:BB:BB:BB (Apple iPad). RSSI: -85 dB
[10:06:57][V][bluetooth_proxy:033]: Proxying packet from - CC:CC:CC:CC:CC:CC (Apple Watch). RSSI: -75 dB
[10:06:57][V][bluetooth_proxy:033]: Proxying packet from - AA:AA:AA:AA:AA:AA (Apple iPhone). RSSI: -69 dB
[10:06:58][V][bluetooth_proxy:033]: Proxying packet from - AA:AA:AA:AA:AA:AA (Apple iPhone). RSSI: -69 dB
[10:06:59][V][bluetooth_proxy:033]: Proxying packet from - CC:CC:CC:CC:CC:CC (Apple Watch). RSSI: -77 dB
[10:06:59][V][bluetooth_proxy:033]: Proxying packet from - AA:AA:AA:AA:AA:AA (Apple iPhone). RSSI: -70 dB
[10:06:59][V][bluetooth_proxy:033]: Proxying packet from - BB:BB:BB:BB:BB:BB (Apple iPad). RSSI: -86 dB
[10:07:00][V][bluetooth_proxy:033]: Proxying packet from - CC:CC:CC:CC:CC:CC (Apple Watch). RSSI: -75 dB
[10:07:00][V][bluetooth_proxy:033]: Proxying packet from - AA:AA:AA:AA:AA:AA (Apple iPhone). RSSI: -71 dB
[10:07:00][V][bluetooth_proxy:033]: Proxying packet from - BB:BB:BB:BB:BB:BB (Apple iPad). RSSI: -84 dB
[10:07:01][V][bluetooth_proxy:033]: Proxying packet from - BB:BB:BB:BB:BB:BB (Apple iPad). RSSI: -87 dB
[10:07:03][V][bluetooth_proxy:033]: Proxying packet from - AA:AA:AA:AA:AA:AA (Apple iPhone). RSSI: -71 dB
[10:07:03][V][bluetooth_proxy:033]: Proxying packet from - BB:BB:BB:BB:BB:BB (Apple iPad). RSSI: -81 dB
[10:07:03][V][bluetooth_proxy:033]: Proxying packet from - CC:CC:CC:CC:CC:CC (Apple Watch). RSSI: -79 dB
[10:07:04][V][bluetooth_proxy:033]: Proxying packet from - AA:AA:AA:AA:AA:AA (Apple iPhone). RSSI: -77 dB
[10:07:04][V][bluetooth_proxy:033]: Proxying packet from - CC:CC:CC:CC:CC:CC (Apple Watch). RSSI: -78 dB
So the feature request is for a new HA component that would allow the adding of Apple devices after discovering the IRK, and then have their presence (and possibly even room / area location) tracked.
I think the reverse engineering work on the Apple protocols here GitHub - furiousMAC/continuity: Apple Continuity Protocol Reverse Engineering and Dissector may also be of relevance.
Thanks
Dan