HomeyKit: devices don't stay in their rooms

I am using Homey (HomeyKit) and HomeKit. With HomeyKit I push all the Zigbee devices to HomeKit. I named my rooms the same in both HomeKit as Homey. But devices don’t stay in their rooms. Somehow move the Zigbee devices all to the Living room (probably because the HomeyKit hub is placed there). One TV and a light (non Zigbee) do stay in the rooms I placed them in.

I’ve changed the devices back to their rooms numerous times. It’s quite cumbersome proces. I don’t know what triggers this migration. I’d like to have it fixed though, it is quite annoying that the outside temperature is showing in my Living room…

Is there a way to fix this? It is a bug in the app or HomeKit? Does anybody else have this?

HomeKit does this if it thinks a device is “new”, which typically happens if HomeKit connects to the controller (Homeykit in this situation) when the controller hasn’t published all its devices yet. It’s a common issue with other controllers too, not specific to Homeykit.

You can try and work around it by increasing Homeykit’s “settle time” (in the app configuration).

That makes sense. It is set to 120 seconds now. Okay, so HomeKit connects within that 120 seconds while HomeyKit is still publishing it’s devices and HomeKit gets confused…

What would be a good time? I have around 20 devices. I don’t know exactly what it is, what it is doing in the sattle time. And are there are downsides to increasing it to, lets say, 300 seconds?

How the heuristic works now: if Homey’s uptime is less than 600 seconds (10 minutes) when Homeykit starts, it will start a loop where it will check every “settle time” seconds to see if there are still devices being added by Homey (because of apps being started). If that’s the case, it will continue the loop. If no new devices were added during the previous “settle time” seconds, Homeykit assumes Homey is done booting up and initializing all devices.

There are a few issues with this method, mostly related to restarting apps (either manually, from flows or automatically by the system). When Homeykit is restarted, it won’t use the settling mechanism. If at the same point some apps are also restarted, and their devices aren’t ready yet, those devices may cause HomeKit to think those devices are new, and it will place them back in the Default Room. I’m not entirely sure, but it may also happen with app restarts without Homeykit being restarted as well.

It’s basically a workaround around issues in both Homey and HomeKit, but it’s not bulletproof: it can still fail.

Empirical testing led to a settle time of 120 seconds to be “mostly good enough”. Increasing it doesn’t really have a downside other than the devices not being available in HomeKit for about 5 minutes after a Homey reboot.

Okay, I assume by reading your explanation it all has to do with rebooting of the Homey (which almost never happens) or restarting apps that have apps connected to HomeyKit. Which isn’t true as far as I know.
The only thing I can think of is updates of apps which have devices enabled in HomeyKit.

When I come to think of it… I do have a restarting app which has a HomeyKit device: the crappy Dyson app. I will remove it from HomeyKit to see if this helps.

App updates result in app restarts.

FWIW, it shouldn’t happen that when app A gets restarted, devices from app B will revert to the Default Room. It should only affect devices from app A.

Well it must have been the Xiaomi Zigbee updates then. I hope the longer settle time will help. Or is that only for the reboots of Homey itself?

Yes, settle time only applies to reboots.

I never tested app updates to see what exactly happens with Homey devices, and how that could interact with HomeKit, so can’t really recommend a good solution other than stopping HomeyKit before (manually) updating other apps, then wait for the updated app to start up fully, then start HomeyKit again.

After the update, everything is back in one room :angry: A settle time of 300 doesn’t do anything I guess.

Next time, try disabling Homeykit before performing the update, and re-enable the app when the update has completed.

1 Like

I saw a new major version update. Has anything changed on this front?

There have been a few noticeable changes (f.e. showing the zone name for each device on the settings page) but mostly it’s bugfixes and workarounds.

Ik weet niet of je het wilt weten, volgens mij was er onlangs een update van de app: alles staat nog keurig waar het stond! Zonder de app eerst te stoppen e.d.