home-assistant / core

:house_with_garden: Open source home automation that puts local control and privacy first.
https://www.home-assistant.io
Apache License 2.0
73.9k stars 30.97k forks source link

HA bridge HomeKit does not working when sharing with family members #110540

Closed FinlayKM closed 4 months ago

FinlayKM commented 9 months ago

The problem

As described in this post, HomeKit-bridged devices don't work when an Apple Home is shared with another resident. I've also experienced this problem, and repeated it using the latest version of iOS and HA Core, but the legacy Home Architecture and without a home hub.

A working solution is posted in the above thread, as it appears that HomeKit "accessory" mode works fine, and you can borrow the correct security config from the created config file to make the bridge work. Clearly the integration handles security correctly for sharing accessories, but not for bridges.

What version of Home Assistant Core has the issue?

Latests

What was the last working version of Home Assistant Core?

No response

What type of installation are you running?

Home Assistant Supervised

Integration causing the issue

HomeKit Bridge

Link to integration documentation on our website

https://www.home-assistant.io/integrations/homekit/

Diagnostics information

No response

Example YAML snippet

No response

Anything in the logs that might be useful for us?

No response

Additional information

No response

home-assistant[bot] commented 9 months ago

Hey there @bdraco, mind taking a look at this issue as it has been labeled with an integration (homekit) you are listed as a code owner for? Thanks!

Code owner commands Code owners of `homekit` can trigger bot actions by commenting: - `@home-assistant close` Closes the issue. - `@home-assistant rename Awesome new title` Renames the issue. - `@home-assistant reopen` Reopen the issue. - `@home-assistant unassign homekit` Removes the current integration label and assignees on the issue, add the integration domain after the command. - `@home-assistant add-label needs-more-information` Add a label (needs-more-information, problem in dependency, problem in custom component) to the issue. - `@home-assistant remove-label needs-more-information` Remove a label (needs-more-information, problem in dependency, problem in custom component) on the issue.

(message by CodeOwnersMention)


homekit documentation homekit source (message by IssueLinks)

BrandonNolet commented 9 months ago

Please replace the version with the actual version that you're experiencing this issue on. It will help people identify if you've applied X update down the road and make sure that others on the same version can reliably reproduce your issue.

slawekb commented 7 months ago

I have recently setup a new HomeAssistant instance from scratch on a Raspberry and I've hit this issue again. Need to note that I am using the legacy Apple Homekit (sharing with family without the Apple home hub) HomeAssistant version: Core: 2024.3.3 Supervisor: 2024.03.1 Operating System: 12.1 Frontend: 20240307.0

Drafteed commented 7 months ago

I confirm that the problem exists and the workaround from this post works.

Probably caused by https://github.com/ikalchev/HAP-python/pull/441 or https://github.com/ikalchev/HAP-python/pull/424.

Steps to reproduce:

  1. Remove all HomeKit integrations from Home Assistant and restart server;
  2. Remove all homes from HomeKit app;
  3. Install Apple system profiles on iOS device to allow downgrade HomeKit to a legacy architecture: http://appldnld.apple.com/iOSProfiles/KeepLegacyHome.mobileconfig and http://appldnld.apple.com/iOSProfiles/HomeKitReset.mobileconfig
  4. Completely close Settings and Home apps from the Multitasking menu, then go again to Settings -> HomeKit -> select "Reset configuration";
  5. Create a new home in the Home app and make sure that it was created with the old architecture (there should be a banner at the top with a proposal to update home architecture);
  6. Invite your family members from the Home app. To accept invitations, system profiles must also be installed on the devices of family members;
  7. In Home Assistant create a new HomeKit bridge mode gateway with some devices and add it to the Home app. Make sure that the devices work on the home owner’s account, but are unavailable on the devices of family members. Home Assistant will spam error logs about "[uuid] attempted pair verify without being paired first".
  8. In Home Assistant create a new any HomeKit accessory mode device and add it to the Home app. Make sure that the device works both on the account of the home owner and on the accounts of family members;
  9. Shutdown Home Assistant;
  10. Go to /homeassistant/.storage there should be files named homekit.*.state where the pairings are stored. Copy the pairings from the newly created integration (accessory) to the previous (bridge) one. The json keys that need to be copied are paired_clients, client_properties and client_uuid_to_bytes;
  11. Start Home Assistant. Make sure that all devices (bridged and accessory) works both on the account of the home owner and on the accounts of family members;
  12. Profit!
issue-triage-workflows[bot] commented 4 months ago

There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates. Please make sure to update to the latest Home Assistant version and check if that solves the issue. Let us know if that works for you by adding a comment 👍 This issue has now been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.

Hukuma1 commented 4 months ago

How come this was closed? Pretty major issue. I’m unable to invite family members if I upgrade the Home architecture and using the old one seems to give this issue. :(

O-J1 commented 3 months ago

Agreed. Why was this closed?

jimmy927 commented 3 months ago

Just upgraded my HA to 2024.8.1, and now this issue surfaced. Quite an major issue as all other family members use Apple Home only to control lights ...