Some BLE devices use a privacy feature called Resolvable Private Addresses to stop businesses from tracking you when you are out with your smart devices. Instead of having a single static address that can be used to track you, its Bluetooth address changes frequently. If you have Bluetooth enabled and functioning and know your device’s Identity Resolving Key, you can add it to Home Assistant as a Private BLE Device. We can then work out which random MAC addresses are related to the IRK and track those.
In addition to telling you if your device is home or away, it can also tell you an estimated distance to the nearest Bluetooth dongle or proxy and its signal strength.
To add the Private BLE Device integration to your Home Assistant instance, use this My button:
If the above My button doesn’t work, you can also perform the following steps manually:
Your device must be on and broadcasting in range before adding it to Home Assistant - we check that it’s visible to validate that your IRK is correct.
There are two common representations for encoding an IRK - base64 encoding or hex encoding. This integration supports both.
If you are trying to get the IRK for your iPhone or Apple Watch, you must be logged in to the Mac with the same iCloud account on those devices. This procedure should also work for devices that you pair with macOS.
- Start the Keychain Access application.
- In the left sidebar, make sure iCloud is selected.
- In the search bar in the upper right, type Bluetooth.
- A list of GUIDs is shown.
- Double-click on a record. As part of the Account field, it will say
Public: XX:XX:XX:XX:XX:XX. This MAC address should match the device you are trying to work with.
- Click on show password
- You will have to enter your password, then enter your username and password.
- macOS will show some XML. You are looking for the “Remote IRK” field. After there is a data field that contains a base64 encoded version of your Identity Resolving Key.
If you already use Identity Resolving Key tracking with ESPresence then you already have a hex-encoded version of your Identity Resolving Key. Home Assistant can use the key in this format directly.