[homekit] "No response" error on all openHAB items

Same issue here. Every restart removes the user from homekit.json.

I am continuing to investigate and have followed much of the advice above.

1 Like

Would it be an option to setup HomeKit as you want and then change the file permissions? For example change the ownership of the file?

the issue is really a mystery for me.
can you try to enable trace log like this

log:set TRACE org.openhab.io.homekit.internal

every time the “removeUser” function called, it make a log message “Remove user <user_id>”

here is the part in the code doing this

there is no other place in the code that removes users from the homekit.json.

Hi all,

I have this sympton from time to time! So another miracle to the behavior:
I tell siri to switch on a light, and it fails. You check homekit, and after a while “no response”.
Then I do NOTHING…after some minutes (or an hour maybe), I do exactly the same, and it works. no changes in between or something…this behavior is NOT REPRODUCABLE for me. it appears, it works for some time, it disappears somehow. Maybe some kind of “wake up call” for homekit sometimes?

I have the feeling it belongs to iOS 15…

maybe a hint for the search of the problem. Up to now I live with it, but yes, it is annoying.

Best regards
Stefan

PS:

  • Use openHAB mDNS service is OFF

if you have ipad/apple tv/homepad try to deactivate homekit there and check whether it makes any differences. they act as a bridge but i could not find any information how exactly ios decides when to ask bridge and when the controller (openhab)

My current workaround is to backup a working homekit.json. Then if it has issues I:

  • restore the backup
  • restart the bundle in karaf (bundle:restart org.openhab.io.homekit)

I might move these items to homebridge in the future as I run other devices through homebridge.

I have this happen once in a while and for me its a networking issue. I have the HomePod Mini, and the HomePod mini connects to the same wifi network that your iPhone or what ever device you set it up with and seems to update the network after initial setup.

That being said I have multiple networks, they do not talk to each other (IE, I can not share files between devices on different networks with normal file sharing). So once in a while my iPhone (which has the passwords for both networks saved) will sometimes connect to the network that only has internet access and is not part of my Hab network. Then when HomePod Mini decides to check the network connection (kinda wish it wouldn’t) it detects the network change and switch the network its connected to the same as the setup device.

When this happens of course the HomeKit hub (the HomePod Mini) can’t talk to any of the other devices that should be connected to it and will result in a “No Response” message, but in this case if you switch back to the correct network (Or just fix whatever networking problem is causing the disconnect) the problem will go away, where as the user data being deleted from the homekit.json will cause the issue to persist until rebuilt regardless of the network its connected to.

I would check into network connection next time I see a No Response message.

Hopefully this helps.

maybe OH does an auto-restore from its backup repository?

I have done the following steps

  • Disable v6 in my pi
  • Disable private wifi address in the iPad/iPhone options
    Unfortunately, this had no effect. Only switching the mDNS flag helped for a few hours. Significantly more stability came from assigning a fixed IP for all my Apple devices. Now I only have to switch the mDNS flag every 2-3 days. Maybe my homepod mini (for example, because there is no option for deactivating private wifi address) causes the problem…?

As a workaround I would like to switch the mDNS flag from time to time via an automated script, is that possible?

this is an interesting idea. that would explain. need to investigate what triggers auto-restore and whether we can active some logging for it

if switching mDNS solves the issue then the root cause is on openHAB / homekit binding side.

the switch published the current IP address of the openHAB in mDNS repository on the openHAB node. ios home app sends to all nodes in your network request looking for mDNS repositories and at some point it will hit openHAB’s mDNS and find there the address and additional information about homekit binding.

i dont know why this information gets removed from mDNS after few days.

here you can find some discussions about this issue as well as an example of script that restart the binding if mDNS record get lost

1 Like

I’m still hoping to see a permanent fix in an OH release.
So far it only works for me for a few hours and then I need to reset and re-add the OH bridge in the Home app.

i would probably be able to fix the issue if i could reproduce it on my machine.

i tried all the bad things with my test OH setup: sudden shutdown of openhab, sudden network connection lost, putting computer in sleep mode, killing openhab process, adding apple tv as bridge, adding 2 bridges, major item changes

nothing, it works after restart as expected. and if i keep it running it runs forever without issues.

one more thing to check -
do you have IP address set in homekit setting in openHAB mainUI, e.g.

i have added a fix to restart homekit bridge on network disruptions, maybe it will fix your issues

@yfre thank you for your hard work.

To all with this problem:
I don’t know for sure but do you have the no response problem when using a 32bit system only?

Since I upgraded my Raspi 4 from 32bit to 64bit (OpenHabian 1.7.1 64Bit, HomeKit with Openhab 3.1) Homekit is so much faster. No response problem at all for the last 10 days. Remote connections are almost immediately established.

@Giga522 interesting idea. homekit has rather large messages which need to be encrypted/decrypted. it could well be, than 64bits helps here. maybe something else at OS level helps to deliver messages faster.
i had my openhab all time on 64 bits and never had any issues.

Encouraged by the above idea I also upgraded to 64 bit (64-bit Raspberry Pi OS) and haven’t got any issue so far for a couple of days (running ~latest 3.2 OH snapshot) … also, maybe just feels so, but it does seem to be faster too …

Hello Eugen,

I discovered some new behavior since I upgraded to OH 3.2.0 Stable release. Not sure this is related to the fix you added.

The Device are suddenly not assigned to the desired Room in Homekit anymore, but to the “default” OpenHAB room instead. Also the item names, icons etc. are reset.
This is happening sometimes, but I couldn’t identify the reason so far.

Could this be a side-effect of the recent changes?

Hi Stefan,

i checked the recent changes one more time and i dont think that these changes could lead to your issue. the changes are minor changes and fixes for specific issues.

reset of room and icons assignment means that home app has received an empty or short list of accessories from openhab. this typically happens in case of errors in the items configuration or if homekit binding starts before openHAB is done with config parsing. for this case, there is delay of 30 seconds (startDelay) which can be increased.

please make sure that you dont change item config in between, check openhab log files for number of homekit accessories identified and maybe try to increase startDelay.via homekit binding settings