Philips Hue Constantly Disconnecting/Pausing + API Error?

Since the last update of my Ubiquity UDM router ( the Philips Hue App (and hence most of my lights) keeps disconnecting ad reconnecting. If I stare at the tiles on the homey app they go from having the regular colour dot to showing the red alert icon in the span of ten/twenty seconds.

If I tap on one of the lights I get this response time error (see attachment). Please note that the x.x.x.72 IP is the Hue Bridge which is also wired via GbE.

I restarted a couple of times the Hue bridge, my Homey (early 2019) and the network. Any other device linked to Homey works fine (Aqara sensors, Shelly lights, solar panels, etc…) and of course Hue lights via Hue App also work correctly.

The only change in my network configuration as already mentioned has been the UDM update. Any suggestions, or tweaks to have this working normally again?

Thanks everyone!

Where there any changes to UniFi OS network settings with the update? Do you have any Snooping turned on, did Multicast turn off? Did the Nightly Channel Optimization turn on?

This is mine

Hi Philip, my network setup looks exactly like your screenshot:

  • Snooping is off
  • Multicast is on

The Nightly Channel Optimization though is ON. I never touched that setting myself, but judging from what I just read on Ubiquity forum, looks like a good idea to turn it off. I’ll let you know how it goes

1 Like

I have had Channel optimization on since three years and have not had any problems with that. However will wait for your findings.

That shouldn’t impact ethernet access to the Hue hub api.

Honestly not sure what it does but I had Hue problems until I turned it off

It shouldn’t, and I don’t know how it makes any difference with Hue ethernet but I had found it mentioned as a source of problems with Hue and other devices on forums in the past.

Unfortunately, it didn’t work for me. I left it off for the last two days but the behaviour is still the same: going on and off at random times. What is confusing me more is that the official Hue app works and other integrations with Homey, including a solar panel inverter also connected via GbE, still work :man_shrugging:

Fifteen days later I still haven’t found the reason why the Hue App keeps disconnecting. With the new version of the Homey App I had a glimmer of hope as everything worked for about two days but this morning the app was paused again and all the lights disconnected.

This situation is really frustrating as lights control and flows are a big part of my home automation (as you can imagine). Does anyone has any suggestion on what I can look at to debug this problem (logs, errors or whatever else)? At the moment I am really clueless.

Thanks in advance for your help

You didn’t mention that before. An app gets paused when it uses too much memory (more than 80MB).

My bad, I assumed that it was happening because of too many timeout errors (which can still be the root cause?) At the moment the Philips Hue App is using 34.7Mb

You can check an app’s memory usage in Insights (perhaps you need to enable the Power User experiment).

It’s very possible the app cannot deal with the timeouts and starts leaking memory when it happens.

… and you were right @robertklep .
The Hue app reached the 80Mb limit several times in the last days. I am really puzzled now, as yesterday (4th in the graph) I had been using the lights and all my routines executed with no issues :man_shrugging:

One more datapoint…
everything looks fine and smooth until 22:20, then in the span of one hour the memory usage climbs up to 80Mb

My guess is that at that time, the connection issues started occurring from which the app couldn’t recover.

Looking at the app code, for local connections (which is the way the app runs on Homey Pro), there’s a polling interval of two seconds. Using intervals for polling is bad practice, because they don’t take into account when state updates take longer than the polling interval (which I think might be happening here). This will cause a buildup of memory and eventually cause the app to get paused.

If this is what’s happening, is a symptom of the timeouts, not the cause.

Looking back at your initial post, the error is saying that the response took more than 5 seconds, which is interesting, because it means that the Homey app was able to make a connection, and send a request, but that the Hue bridge took more than 5 seconds to respond, which would suggest that the Hue bridge might be causing the problems (at least partially).

But again, having a response timeout of 5 seconds while the polling interval is 2 seconds, which is what the Homey Hue app is doing, is just not very smart.

1 Like

Thanks for the explanation @robertklep. From what I read it seems I am basically powerless as I cannot tweak the polling interval nor hacking the Hue app :sweat_smile:

Yesterday I reset the Hue hub and lock Homey to its closest wifi access point (sometimes it roams to a different one). So far it seems under control, even if at some point it went from ~30Mb to ~40Mb. :crossed_fingers:

Is there any way to look at logs? Would an app such Simple (sys) Log help me to identify what it is happening?

The issue is either something internal to the app, or to Homey. You can’t access internal logs, and the only possibility I can think of with an app like Simple Log is to periodically perform an HTTP request to the Hue bridge and log the result. If it fails, and the time of failure coincides with the Hue app starting to run into memory issues, it’s probably a network issue. But I think we already know it’s probably something like that, so I’m not sure how useful such a test would be.

1 Like

Will Athom ever going to fix this app :thinking:
@dandooze Did you also create a ticket @ Athom support for these issues with the Hue app?

Similar memory issues here (or should I say, polling issues):

I know about the RAM limits, but here philips hue is very stable with more RAM usage. Can you give some information about your hue installation? (Amount of devices and bridges)?

Here my ram usage. (Homey 2023)

Using 4 hue bridges, ca 85 lights and around 35 devices (motion sensors, buttons and wall plugs)

In the past I had some issues like you. Since my hue bridges are on a static Ip address (in the router, hue bridges self are ‘on DHCP’), my homey is on a fixed IP and tweaked some mesh settings on my ASUS router (homey is not allowed to use mesh and always using the same access point (hopping results in some seconds of connection drop)) and I ‘restarted my whole system after these changes (turn off all the power in the house and restarted all grid powered devices on this way) my issues where gone. But this was ~2 years ago.

FWIW, the RAM limit for rc110 apparently is set to 120MB (I guess that Athom has changed this because the HP2023 has more memory available).

Given that your graph is showing a consistent increase in memory usage, you’ll probably hit that limit within a week or so.

Yes. On slack they give the info that they make the limit higher. After ca 2 weeks (normally fever happens because of the updates, backups over USB-C)
But what happens is that the app ‘spontaneously’ restarts and is working again. So for now it is very stable. Bever had any issues.

But… polling 4 bridges is far from ideal :smiling_face: