Hi, I think this is just an error in the documentation, paste the string into the box above the Convert button and press Convert and this should give you the irk.
Agree with everyone! Thanks so much for this. I thought i lost my room presence ability after deciding to switch it up to an iPhone for a change.
Has anyone had any luck extracting an Apple Watch IRK using the tool on the ESPresence website recently? Whenever I try it, it outputs 0000
for me. I have been careful to copy the entire XML string and I have tried it in Safari, Firefox and Edge.
Is anyone able to test it for me?
My impatience won out so using the easily accessible iPhone IRK I have recreated what the converter should be doing using CyberChef.
Process to obtain the Apple Watch IRK is as follows:
- Copy the XML output of your Apple Watch’s BluetoothLE address as instructed in the guide on ESPresence
- Paste this into notepad, and scroll down to the bottom where it says:
<key>Remote IRK</key>
<data>
Randomcharactershere
</data>
and copy the random characters
-
Open the following link: CyberChef and paste the characters into the input field, if done correctly the output should be your devices IRK key.
-
Resume the excellent instructions by @gadgetbazza above, or the ESPresence guide.
Yes - I just used the tools and instructions on the ESPresence website and was able to convert the XML to an IRK for my Apple Watch. So I’m not sure if it was working yesterday when you tried it, but it was definitely working today!
The part of the web-page instructions for the Apple Watch that needs improvement is the bit about “adding the IRK:xxxxxxxxxx” to your configuration.yaml. It needs to be updated to be more specific. (This is how I ended up reading this thread). My question was answered above - it needs to be specified as the “device_id:” value for the MQTT_ROOM sensor. I agree with the op here that this thread should be linked/pinned to the ESPresence instructions.
Hey there. I have just finished setting up my first ESP32 by following the instructions on the ESPresence site - and I added my iPhone, 2 iPad’s and my Apple Watch successfully - and configured them in MQTT_ROOM in Home Assistant - but I only needed to use the IRK: for the Apple Watch. The other 3 devices worked fine using the “device_id:” which is the name I paired them with.
Your post seems to suggest that this shouldn’t work (and maybe it didn’t in December), but it does seem to work fine now. Granted I’ve only set up a single ESP32 so far.
Do I need to pair my devices with every ESP32 I deploy? Or are they smart enough to share the information through MQTT after it’s registered with the first one? (I also was able to configure the FILTER section on the ESP32 to only send data from the 3 iOS devices I registered using their device_id’s - but then removed them because I couldn’t figure out how to add the Apple Watch to it)
I think the way you have experienced it is how it is meant to be. However as you have said you are running with only 1 ESP currently, my problems began when I had multiple.
With that said, I think it actually will work with multiple too, however I believe there is a dependency on the device id to irk mapping being registered in MQTT. If you look using something like MQTT explorer you will find messages (in the discovery node I think) listing these mappings. For some reason, in my setup at least, these mappings disappear from time to time and then the whole thing falls down. So I find it more reliable to actually use the irk values (despite them being non readable) and remove the mappings that were posted to MQTT.
Maybe there have been some improvement since I flashed my ESP’s but my theory suggests the problem is the dependency on the MQTT values which could be removed leaving the solution broken.
It would be good to know if you experience this loss of registration, either over time or perhaps after power failures / reboots etc.
after wasting a day messing about i found this post and it worked in minutes - thanks so much
For Apple Watch’s, the process for retrieving the IRK value requires that you use a computer to access your iCloud Keychain data, but once you have the IRK value, the rest of the process is identical.
Anyone have experience extracting the irk from apple watch using windows pc??
Can you share you set up your bluecharm beacon?. I have multiple iPhone and an android working fine but, I can’t find any information on how to set up these damn beacons
The setup is the same but you use the ID that starts out with “ibeacon”. What app are you using on your phone to edit the BlueCharms? Also are you using MQTT Explorer to find the beacon info?
There was something wrong with my base stations. I could see the beacon in the espressence log but nothing wad coming to HA. I reflashed my esp32 base stations and they all started working. Those blue charm beacons are very nice. Is that what you used?
I’m glad it all worked out! Yes I only use Blue Charm and they have been awesome
Hmm, also having issues with more than one ESP32 base station. I have three.
Although entires exist in MQTT for the irk to device id/name for most devices, I have one that always reverts to just a name. Without the id
it won’t trigger anything properly in HASS. I’ve published the correct entry but it seems to revert. Tried rebooting the base stations, but something keeps on happening that causes it to revert.
Pretty sure yesterday I also had this issue with another device, but that one is sticking. Hmm.
For now I’m sticking with the irk values even for iOS devices. It just works for now, and I’ll revisit the MQTT based configs in the future. Ideally I would place all irk values even for watches in MQTT to share the config between all base stations. Pasting the space-delimited list on all devices is a PITA
Are you able to do anything meaningful with any that have a button? Even with the shortest broadcast duration, it takes forever for HA to revert the states of the beacon and beacon button. It takes so long sometimes, several minutes and I havnt been able to use it for anything worthwhile because of the delay.
a little question. Using the mode with the Apple:id111xxx… . it works very well … but there is a delay of 5 sec approx. is this going to improve that? as I know … the BLE has the particularity to update less than a normal bluetooth.
Golden explanation!! Thank you very much!!
I know I’m gonna post this, and someone is going to point out how stupid I am. I am pasting in that field, and nothing is coming out of the box that looks anything like 32 characters…
Also, I’m typing in my password just once to reveal what is in the “show password” field.
never-mind. i discovered on my own that i’m stupid. That field has a lot in there that’s hidden!