Hue and Sonos auto discovered but no devices found

My hue lights and sonos speakers became unavailable from home assistant a few days ago.
I tried to restart HA and update (to 2021.5.0) but both were still unavailable.

I uninstalled both integrations and restarted HA as requested, on boot up I get the notification saying new devices discovered (hue and sonos both appear), so I add the integrations.

The sonos integration loads up fine but doesn’t actually add any devices.
The hue integration asks me to press the button on the hub, it loads for a while then says ‘Failed to connect’

I get no logs from sonos, and the only hue log is ‘Error connecting to the Hue bridge at…’

I can still access and control directly from the hue and sonos apps.
I’ve tried restoring to a snapshot where they were both working, but all devices appear as unavailable again…

Any ideas what’s going wrong? or what I can do?

Has your hue bridge changed ip address?

@nickrout No it hasn’t…it’s dhcp reserved. And when auto detected when it restarts it finds it at the right IP. It also knows when the button is pressed as when the button is not pressed I get a different error for failed connection

If you SSH to the HA machine are you able to ping the address of both devices?

@CO_4X4 I can ping all the devices from HA absolutely fine…

I’ve been away for the weekend and my sonos devices have appeared, but some are still unavailable - it looks like they’ve come on and offline over the weekend (but there are some which are unavailable in HA but working in the sonos app.

My hue devices all remain unavailable but work fine in the hue app…

What installation method are you using for HA? Both Hue and Sonos use broadcast discovery by default. If you’re running in Docker, make sure you’re using “host” networking mode as shown in the install instructions.

Also, do you have multiple subnets or firewall restrictions in place? Sonos speakers need to be able to connect directly to HA on TCP port 1400 to use the push update method. If that doesn’t work it’ll fall back to polling which is slower and less reliable.

@jjlawren I’m running HA OS on a pi - no subnets or firewalls in place (that I know of - I haven’t changed anything)…Everything was all working fine - I’ve had no problems with the integrations for the last 2 years on those integrations but they failed overnight…
My latest update is the lights and speakers have started becoming available at 2:30am and then goes offline at 6:01am, that’s been happening for the last 3 nights…

It’s so odd that this is happening for both local integrations at the same time!

As for Sonos, a few fixes have gone into the recent point releases. Try running 2021.5.3.

You can also run the integration in debug to gather more info. Add this to your configuration.yaml and it might give us a hint:

logger:
  logs:
    homeassistant.components.sonos: debug

@jjlawren unfortunately the update hasn’t helped the sonos really :frowning: It sometimes pops up as available for a little bit but then disappears…

Here are what I believe to be the relevant sonos and hue logs Sonos and Hue Logs - Pastebin.com
I have no clue what they’re saying unfortunately!

Without having a chance to look closely, it looks like network issues where connections to the Sonos and Hue devices are failing for some reason. Are the Sonos speakers on wifi or wired? If wifi, could the coverage be spotty?

Anything else at all that could have changed recently?

Thanks for everyone’s help on this - after months of having instabilities with both hue and sonos, I’ve found the problem!
It basically is my sky Q multiroom setup which breaks the network, all because I have a 100mb switch! I’ve upgraded to a unifi gigabit switch and all works perfectly!
For more technical info, check this out - Sky Q and Sonos problems | Sonos Community

Well that’s a fun one. I’m curious, did the problems begin when switching to Sky Q or was it related to an upgrade of HA?

It was when I got the sky Q multiroom - Q on it’s own doesn’t break things; but when you add a multiroom box, a special connection forms between them; and it nicks some bits of the data packets; and when the switch isn’t gigabit, those bits are important so the network breaks :smiley:

1 Like