Homekit bridge to OH3 lost

FYI - since modifying the permissions on homekit.json I have not had the problem since. Stable for two weeks now! If only I could get my Insteon binding to be stable now…!

1 Like

cool. thank you for the update! finally a solution for this ugly issue.

maybe we should add this approach as workaround to documentation in case the issue with homekit.json cannot be solved differently.

Doesn’t the HomeKit Binding need to update the Homekit.json file at any point? What about if a new AppleTV or other HomeKit Hub is added to HomeKit? I do not know the specifics but feel locking the file might have some side effects. @yfre do you know if the Homekit.json file might need to be updated? and if so what triggers an update? Also at least in my case my Admin user is the same user that runs Openhab which means openhab still has the ability to write to the file.

An update on my end with this issue, Once I had my Homekit insitance setup and configured with the settings I wanted, I have not made any changes to the settings my Homekit add-on and have been stable and not lost connection with the hab since posting 6 months ago, I have not changed any permission of my Homekit.json file. I am also running my Openhab on MacOS, not inside a docker image.

I have even updated to OpenHab 3.2 from 2.5, added new homekit metadata, I just recently Factory reset my Z-wave network and rebuilt it and while Homekit seems to have lost the Locations of the items (they all go to the default room) the functionality (On/Off . etc) still works.

1 Like

the change of permission for homekit.json (make it read only) is only a workaround if binding keeps removing user pairing information from it and makes repairing necessary on almost daily basis.
if homekit binding works stable, there is no need to remove or change permission from that files.

homekit binding updates this files and need write access in following cases

  • repairing. new pairing information needs to be stored in homekit.json
  • change of the mac address of the openhab server. should actually be a newer the case
  • adding/removing homekit accessory from openhab, e.g. change homekit meta data. binding stores the number of homekit accessories and increase the configuration number in the homekit.json. this is needed to compare the homekit configuration on the next openhab reboot. in cases of difference, homekit binding would delay the start

means, if configuration is done and no changes in meta data are planned, then it is fine to make the file read only. but it is not needed, if homekit binding is stable

1 Like