I’m still not sure I’m seeing anything different than you. First, I’m using MQTT Explorer on my Windows desktop to look at the messages being sent to the mosquito broker and capture the data in the MQTT messages.
As each room detector powers up, I see about 6-9 messages generated by apple:1005:9-24 before I see the first from apple:watch3-4. I only have apple:watch3-4 defined in HA though MQTT Explorer sees all ids. After that I see about 10- 20% of the messages coming from apple:1005:9-24 with 80-90% coming from apple:watch3-4. This is why I just track apple:watch3-4 messages.
Is the “switch” or change in id’s you are talking about? I don’t think this is a switch, but the fact the watch is broadcasting both. My iPhone actually is broadcasting 4 ids including my covid tracker and room assistant app both broadcasting their own id. This is why I don’t think the watch is switching, just broadcasting two ids at different intervals.
The problem I’m having is that I could be in my living room sitting right next to the room sensor and about 5-6 meters from the office sensor but I’m detected in the office causing my office lights to come on. Then a second or two later I’m back in the living room causing the office lights to go out and this happens more than once. I normally don’t have a problem if I’m in the office at my desk, but as I type this, my office lights have blinked twice thinking I had left and come back.
Again when I look at the data, for some reason, ESPresense is not always generating the correct distance. When I’m in the living room, more than 5 meters from the office, 8 meters from the sensor, there are times when it thinks I’m 1.6 meters from the office sensor. This is why the lights blink on from my automation.
I think the problem is either in the ESPresense code or my calibration setting from rssi@1m. As I don’t know anything about bluethooth and how it works, I’m only guessing. I just can’t help thinking I’m just a couple of tweaks away from getting this to work flawlessly if I just knew what to tune and how much.
I’ve just set-up my first ESPresense device tonight and came across the same problem for both my phone and watch.
However, after carefully following the documents on the ESPresense site here… Apple | ESPresense you will see how it explains to retrieve an IRK (Identity Resolving Key) for your iPhone and watch and then add this to one of the settings on the ESP board web ui to get a consistent device id. Took me a couple of goes to figure it out, so hopefully you will be able to do it.
In the link that you provided, it states (11. Add the same string to your HASS configuration with ‘irk:’ added in front e.g. “irk:xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx”).
Did you need to do this and, if so, where did you add it, please? Wherever I add it (under mqtt: or under sensor: - platform: mqtt_room), the configuration check fails - it doesn’t like irk:.
Many thanks for answering my question and, particularly, for providing the snippet - it helps no end.
Under sensor: -platform: mqtt_room, I’d put in entries for the ESP32s running espresense but had failed to put in any entries for the devices (beacons).
From first glance, I’d say the MQTT topic in your yaml is incorrect for this piece.
I’ve actually made a start to finish post Here for setting up apple devices on espresense. It doesn’t go into retrieving the irk for a watch but it sounds like you’ve worked that out from the espresense docs anyway. So check what you have against that guide and hopefully you will find the missing piece.
Is there any way to extract the IRK for an Apple Watch without using a Mac? I have an iPhone and an iPad, but no Mac. From what I am seeing, using MQTT explorer only works for the iPhone, not the Apple Watch.
I have the same problem here. Is it possible to get the IRK without a Mac.
I tried to install the iCloud for Windows, I can find “iCloud-Passwords”, but there is no access to the bluetooth stuff.