Apples devices emit various btle continuity messages and the fingerprint
apple:100?:*-* is often the one seen. Unfortunately if your household has many iPhones, eventually the nearby info will start to collide and lead to duplicate fingerprints.
To work around this you can get the remote IRK (identity resolving key) from your iOS (iPhone) or Watch OS (Apple Watch) device and add this to the
Known BLE identity resolving keys section of the ESPresense configuration.
Note: ESPresense version 3.0 or higher is required!
To automatically get the IRK for your iOS device you can pair it with an ESPresense instance and the key will be visible in the
espresense/settings topic. You can either manually add it to your configuration or let HASS configure it for you.
- Go in your browser to the ESPresense devices page:
- Fill in a name for your device in the name field and click the Enroll button.
- On your iPhone to to Settings -> Bluetooth and you’ll see a new ESPresense device.
- Pair the device and the key becomes visible in the MQTT topic
Tip: use MQTT explorer to view the RAW messages. Note: With the automatic procedure you DON’T need to add the 32-bit key to the
Known BLE identity resolving keys. It’s automatically done via mqtt!
An Apple Watch cannot be paired with Bluetooth to the ESPresense instance. You have to extract the IRK from iCloud with the Apple Keychain application on MacOS.
Tip: To ensure you have the right IRK, you need to know your Apple Watch’s GUID. To easily find your Apple Watch GUID go on your Apple Watch to the Settings app -> General -> Info and look under Bluetooth for the MAC address.
- On MacOS, make sure you are logged in with the iCloud ID with which the Apple Watch is configured.
- Start the Keychain access application.
- In the left sidebar click on iCloud
- In the upper right search bar type
A series of GUIDs are shown with the application password type.
- Open each GUID to find the one associated with your apple watch. You should see your watches GUID as part of the Account field in the format:
- Click on Show password
Type your MacOS password twice and copy the contents.
Paste the contents in the form below and click ‘Decode’ to convert this into an IRK. Under the hood, this is extracting Base64 data and converting it to a hex string and then reversing the order of the bytes.
OutputEnter base64 above...
Add the output (which should be 32 characters) to the ‘Known BLE identity resolving keys’ section of the ESPresence configuration.
- Add the same string to your HASS configuration with ‘irk:’ added in front e.g. “irk:xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx”