Single Sonos device reports No route to host (Host unreachable)

I have 6 Sonos speakers and all work fine in Sonos. They all work fine in Hubitat except for "Sonos - Garage". So I tried setting static IP's for the Sonos devices. I then rebooted my router, and my Hubitat, which had no effect. Then I tried deleting the device "Sonos - Garage" and re-add it in the Sonos app. It would not detect it at all. So, I thought let me delete the entire Sonos integration app and start over. After re-installing the Sonos app it would not detect ANY Sonos devices. So I restored from my latest backup and I'm back to where I started.

I read the thread below and there was no solution to be had. Any suggestions how to resolve this would be appreciated.

I just saw this package in the HPM. Would this replace the Sonos Integration built-in app?

Sonos Host Unreachable Errors in log - :bellhop_bell: Get Help - Hubitat

As these are LAN devices, resolving this issue will require a detailed description of your LAN.

In general, as long as they are in the same subnet, and SSDP is correctly routed in your LAN, discovery should work

Consider also rebooting the Sonos devices -- some users have said this helped speed things up in the past -- or waiting a while for them to be discovered (the app isn't kidding when it says it can take a while).

The integration you pointed to is a custom integration that can be used in place of the built-in integration if you want, but I suspect discovery works similarly, so it might not change your luck. You'd also need to accept the responsibility of using third-party code, which is rarely my preference as a starting point. Trying the built-in option may be simpler unless you are looking for a specific feature.

1 Like

There is nothing unusual about my LAN, just a Linksys MR9000 router with everything connected to it via ethernet or Wifi. No subnets or anything like that.

Sometimes consumer-grade routers stop bridging multicast packets (like the SSDP packets used for Sonos discovery) between wired and wireless segments,

I would suggest trying the following:

  1. Power cycle your router.
  2. Power cycle all Sonos speakers, as suggested by @bertabcd1234.
  3. Power cycle your Hubitat from the Settings menu.
  4. Run discovery again.

If it still doesn't work, you can consider using Wireshark to determine what is going wrong during discovery

I finally rebooted the Sonos speaker but that didn't resolve the issue. I had already done the other things you suggested. Just a minor problem really. 5 out of 6 Speakers work anyway. I'll investigate further when I get the chance.

-Thanks

1 Like

Good morning - this is a easily solvable problem, and hopefully this post will help you connect your final Sonos speaker.

As long as you know the IP address of your Sonos player, you don't need the Sonos app to "discover" it. You can manually create a Hubitat device corresponding to the errant player. Here's the explanation, followed by how you do it.

I have about 10 Sonos speakers, listed below. Focus on the Sonos speakers boxed in red. They have IP addresses of 192.168.0.25 and 192.168.0.153.

These Sonos speakers correspond to the Sonos players for my Office and Workout Room, boxed below:

Focus on the DNI for these players (DNI = Device network ID).

  1. The Office Sonos has a DNI of C0A80019. This is the hexadecimal version of the IP address 192.168.0.25.
  2. The Workout Room Sonos has a DNI of C0A80099. This is the hexadecimal version of the IP address 192.168.0.153.

So, if you know the IP address, you can create a Hubitat device with the correct DNI corresponding to that IP address, and it will be controlled by Hubitat as a Sonos player!

Here's how you do that:

  1. Create a Virtual Device. For device type, choose "Sonos Player".
  2. Go into the Sonos Player, and edit the device network ID (see below)
  3. Enter the IP address in hexadecimal and save it. Here's a helpful site that will convert IP addresses to hexadecimal for you.
  4. For example, if I enter 192.168.0.153 (see below):
  5. And then click "Convert to Hex", the output is:
  6. Omit the leading "0x" and use the rest as the DNI.

That's it - you now have a Hubitat device that will control the Sonos corresponding to that IP address.

To give credit where it's due, I didn't come up with this. @mike.maxwell told me about it a long time ago.

Hope this resolves the issue for you!

2 Likes

Thank you, I will certainly give this a try!

1 Like