Extract apple user id from homekit integration

Tags: #<Tag:0x00007fc40cfdea08>

Is it possible to find out who is initiating an action via the homekit integration?
For example when I say “Unlock frontdoor” from my iPhone iOS client which connects to homeassistant homekit that I can sent a telegram message notification ‘User X has unlocked frontdoor via Homekit’ ?
Any idea’s how to accomplish this?

Thanks in advance!


The homekit protocol only sends the UUID of the user that did the action (‘the authenticated in user’). We don’t have a way to tie that UUID to an apple id. Its possible the Mobile app could have access to it via one of the apis, but HAP-python would have to also add an api to expose it to Home Assistant.

UUID would be nice too, if I know that UUID x is me and UUID y is a friend?
How to get that UUID from the homekit integration in homeassistant?
If the UUID’s are different from homekit user 1 and homekit user 2, then I can map an UUID to a user and create an automation for it to send out messages.

It is not exposed in the current version HAP-python so its not possible to access it.

Ok, thanks for sharing! :slight_smile:

HAP-python 4.1 (coming in 2021.9) exposes the property on the HAPServerHandler instance

1 Like