UniFi and Sonos

I am using unifi.. This is the setting that might make it work for you:

2 Likes

That will help with device discovery across subnets..

1 Like

I have tried mDNS. This, by itself, hasn’t done the trick. Thank you for the suggestion.

Curiosity.. Why are you running multiple subnets at your home?... The main reason for this would be to reduce broadcast traffic... But by enabling settings like these it negates that benefit..

1 Like

Some suggest that best practice is to run IoT on a separate network from data-type devices.

I think the solution might be a firewall rule. While I have tried what I thought would work, nothing has. I know others have tried what I’m asking with respect to Sonos. I’m hoping someone who has experienced success with this may offer a suggestion.

Thanks again.

I'm not sure what you mean by that, but I don't think a firewall rule will work. You need some way to propagate SSDP across subnets. Like an SSDP relay.

This might help you get going:

Check this guideline https://vninja.net/2019/08/12/unifi-iot-networks. I have not tried myself.

Thanks. I didn’t know this, but it looks like setup using an android vs iOS is different. That might be my problem. I had setup a similar firewall rule, mDNS, and UPNP. I’ll need to explore this one further.

The firewall rule, in theory, allows for the Sonos devices’ UDP and TCP connections into the other network where the app is located.

Ah - that part is relatively easy. Its the discovery that is the issue. I went through this while getting Sonos to work over a VPN. Had to use SSDP relay and a tap interface.

2 Likes

Would you provide more details on how you set this up? Thank you!

I have UniFi and could not solve it directly either.. But you can manually set up your sonos speakers in Hubitat without using the Sonos connect app with just a little extra work..

Here's how...

  1. Make sure your Sonos speakers have DHCP reservations so the IP addresses do not change.

  2. Make a note of all of the IP addresses for your Sonos speakers.

  3. Go to this website and use the IP to HEX converter to convert each of the IP's into a hexadecimal format.

  4. Back on your Hubitat hub, create a virtual device for each of your Sonos speakers. Use the "Sonos Player" for the driver. Give them a name and paste the HEX IP into the DNI field and click save.

That's it. Your Sonos speakers should now work on your hub!

4 Likes

This is interesting - so the Sonos can be on a different subnet/Vlan to the Hubitat and still work with TTS?

Sure can. :slight_smile:

No problem but I don't know if this will translate to your Unifi setup. I have an Odroid running OpenVPN and I wanted to control my Sonos speakers at the other end of the VPN (using a Mac at work, or my friends house). I setup OpenVPN with a TAP tunnel (off course turned on IP forwarding), and setup ssdp-relay, which is configured to relay from the eth0 interface to the tap0 interface.

I think @srwhite's solution is far better for Hubitat.

1 Like

You need an IGMP proxy running on your router to pass multicast between the vlans.

1 Like

I’ve had similar problems with UniFi, google home devices, and separate subnets. I ended up adding parameters to my config.gateway.json file to enable mDNS repeating (this is in addition to turning on the mDNS services in the controller UI). See my response on the Ubiquiti forums. I also assigned static IP addresses to all google home devices. Occasionally I still have issues but since making this change it’s been pretty solid.

1 Like

I also posted for similar help in the ubiquiti forums but I guess this stuff is too old hat to most of them and didn't get a response.

For those in the know does mdns only casts between the 2 subnets (the one where the Sonos is located and the one with the controller app on Android or IOS) that we specify in the router config? Similarly does the same occur when we set up an IGMP proxy?

I'm not too keen on the Sonos broadcasting across all my subnets.

+1 for @ugu suggestion. Has worked on my setup (USG + Sonos One and Play 5 on separate iot VLAN). If in doubt the vninja article quoated also links to his own 'before you start' creating the IoT vlan on Unifi/USG.

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.