Nuki Opener Changing Rooms
Closed this issue · 7 comments
Hi there!
I’ve been experiencing an issue recently seemingly out of nowhere. Whenever I reboot Homebridge, my Nuki Opener will default back to the same room my bridge is assigned to and also removes itself from automations I have it in.
Any idea as to what may cause this? I’m currently on iOS 18 public beta but this happened before as well.
Thank you!
That happens when Homebridge stops exposing the Opener (for a while) and then re-exposes it, causing HomeKit to treat it as a new accessory. Most likely, this happens when Homebridge starts while the Opener hasn't been saved to cachedAccessories
. In theory (I suppose) this could also happen when Homebridge NB removes the Opener because it's no longer exposed by the Nuki bridge.
What system are you running on? In case of a Raspberry Pi: double check the uSD card. They turn read-only when failing, but you won't notice that on a running system due to file system cache.
How do you "reboot Homebridge"? Is Homebridge shutdown cleanly, and is the Opener saved to cachedAccesories
.
If those two check out, please capture a debug logfile of Homebridge restarting and attach that here. Make sure to run Homebridge in DEBUG mode, and set Log Level on the Nuki bridge accessory to 2 (using Eve or another decent HomeKit app).
Same here, every time I reboot homebridge or your plugin, all informations about my 2 locks and the opener will reset (room, name etc). Sometime it also happens if I don't reboot HB at all. This is starting since the previous version of the plug-in, and continue with the latest.
Same here
Are you also on iOS 18 beta?
Sometime it also happens if I don't reboot HB at all.
Please capture and attach a debug log of when this is happening.
Same here
Are you also on iOS 18 beta?
Sometime it also happens if I don't reboot HB at all.
Please capture and attach a debug log of when this is happening.
Yes I'm on 18 dev beta. Will post here the log ASAP
Yes I'm on 18 dev beta.
This is worrying - officially, smart lock accessories aren't allowed to be bridged. It has worked so far, but maybe Apple changed that in iOS 18. I might need to expose the locks as standalone accessories instead.
OK I don't have a debug log yet, but looking at it it looks like it's happening randomly during homebridge restart or normal use when device "hangs" on answering to the plugin (this happens more frequently with my "Garage lock", that is connected to the house via a Powerline adapter). Maybe the plugin have too much haste on deleting the cache that cause the issue?
Homebridge NB doesn’t remove accessories while running. It only removes accessories on startup, when 1) they’re no longer reported by the Nuki bridge and 2) removeStaleAccessories
has been set in config.json
.
There was an issue that Homebridge NB could publish accessories in the wrong order, which would cause the order in cachedAccessories to be wrong. A connected accessory would be restored by Homebridge before the Nuki bridge, but without a restored Nuki bridge accessory, Homebridge NB cannot restore the connected accessory. This issue is fixed in v1.4.23, but I cannot change the order in cachedAccessories
if it’s already wrong. I need to see the debug log to access whether you’re suffering from this issue, or from another one. Again this issue would only remove accessories on startup of Homebridge NB. The remedy here is to temporarily disable Homebridge NB, so Homebridge removes all its accessories from cache. After re-enabling Homebridge NB, it will re-publish everything in the right order.