Private BLE Device & Esphome

Does anyone know if the new " Private BLE Device" integration works with ESPHome bluetooth proxy. I have a bunch of ESPHome sensors and it would be good to update them to include room based tracking similar to ESPresence.

Thought I would ask before testing incase anyone else has tried it.

1 Like

My understanting of the integration description Private BLE Device is that it should support Bluetooth Proxy, because it’s linking to the Bluetooth integration which can be done by using only Bluetooth Proxy and which I’m actively using for one T&H sensor.

I’ve enabled the Private BLE Device integration and in the first step it’s asking for the Identity Resolving Key (IRK) which I don’t have but the instructions to get it are only for Mac OS and ESPresence which I also don’t have.

Someone knows a way to get the IRK on Windows or Linux?

Thanks.

1 Like

If you set up espresense it will store the irk in an mqtt topic. Thats what I did. Seemed a helluva lot easier

Just an update, it seems to work through the bluetooth proxy. Only issue I have now is that it doesnt report which ESPHome sensor send the distance reading, so for room based detection this wont work… yet at least.

Scratch that, the source mac address in the device tracker will show what device reporting the BLE device. Using that combined with the distance you can figure out which room the device is in, assuming you have enough sensors.

I’m doing it rn for my samsung phone.
I followed this guide to get the IRK

I found a way for iPhone and Apple Watch to get the key.
I am making a topic with all the instructions and will link it here!

I wrote a guide on how to get it with a ESP32 or M5STACK Atom.

GUIDE - Getting the IRK for iPhone and Apple Watch (Maybe also other devices?) - Community Guides - Home Assistant Community (home-assistant.io)

3 Likes

I have successfully complete setup. But when I left home, it took about 10 mins to update for iPhone and 20 mins for Apple Watch. When I reach home, it update instantly.
I also test turn off bluetooth, it also takes about 10 mins to update.
Anyone knows is that expected?

Out of interest, why is distance important? The Private BLE integration reports the MAC of the closest BLE device so I would have thought all you need to do is map the MAC from the “Source” attribute of the device_tracker to which BLE device that belongs to.

Are you saying if it’s connected to MAC-A which is in the lounge and the distance is Xm then you can guestimate where the device is? If so, that makes sense IF you don’t have BLE devices in every room but I’d be aiming for a device per room for the most accurate coverage (we are refubing the entire house so have the luxury of putting ESP32-based devices (light switches specifically) in the walls so will have blanket BLE coverage.

Do you know if installing the app on an Apple Watch, would allow pairing to ESPresense to get the IRK?

In the “Watch” app on your iPhone go to “General”, the 3rd option from the top is a checkbox if you want to automaticly install compatible apps to your watch. Is this box checked?