core icon indicating copy to clipboard operation
core copied to clipboard

Slimproto integration does not add new devices when in another subnet

Open bernji opened this issue 2 years ago • 10 comments

The problem

I flashed the Raspiaudio Luxe box with Squeezelite-ESP32 installer and installed the Slimproto integration. I connected it to the WLAN but it's in another subnet 192.168.30.xxx then home assistant 192.168.0.xxx I do this due to security reasons (the subnet 192.168.30.xxx has only access to LAN but not to the internet)

The device does not get recognized but when I move it into the same subnet as HA then it works.

Not sure if this is a problem by the integration or by my network setup though. I am using Ubiquiti Unify.

Can you tell my how exactly the recognition works (protocol) to nail down to problem?

Thanks

What version of Home Assistant Core has the issue?

2022.5.5

What was the last working version of Home Assistant Core?

No response

What type of installation are you running?

Home Assistant OS

Integration causing the issue

Slimproto

Link to integration documentation on our website

https://www.home-assistant.io/integrations/slimproto

Diagnostics information

No response

Example YAML snippet

No response

Anything in the logs that might be useful for us?

No response

Additional information

No response

bernji avatar May 28 '22 15:05 bernji

Hey there @marcelveldt, mind taking a look at this issue as it has been labeled with an integration (slimproto) you are listed as a code owner for? Thanks! (message by CodeOwnersMention)

Discovery will not travel another subnet, let alone a firewall. In my experience business grade solutions such as VLAN's do not play nice with consumer grade equipment such as media players etc.

Having the slimproto device in a subnet with no internet also means you will not be able to play any direct streams. Maybe just include the device in your main network and apply a firewall rule allowing it to do only do DNS and HTTP/HTTPS to WAN ?

marcelveldt avatar May 28 '22 17:05 marcelveldt

I see you point and disagree with the fact that "business grade solutions" do not use media players/equiment. Also I have not seen problems with other integrations where I had devices in another subnet. Also I am not using some fancy router. Unify is the gold standard regarding netowkr equiment also in homes and I think that some HA users also use that. I kindly ask you to give me details regarding discovery so that I can condigure my network properly. On the other hand I ask you to check if your integration actually searches for other devices in subnets

bernji avatar May 28 '22 18:05 bernji

You can have a look here for the discovery protocol: https://github.com/home-assistant-libs/aioslimproto/blob/main/aioslimproto/discovery.py#L145

It's a message on the broadcast address. Unfortunately nothing common like mdns or other standard which is supported by default by the mdns reflector in the unifi router (and yes, I have all Unifi equipment too).

For now we've kept things simple in this first release so advanced scenarios like discovery across different subnets are not yet supported. If you find out how to make it work, you can help others ;-)

Do note that slimproto devices connect to the server and not the other way around. So it is the server broadcasting its info. The slimproto device/client picks up that discovery info and connects to the server. So in your case it is as easy as manually typing the HA ip in the slimproto client and you're all set.

marcelveldt avatar May 28 '22 18:05 marcelveldt

Thank you for the detailed answer. Very helpful!

bernji avatar May 28 '22 19:05 bernji

Thanks for the explanation too since I was having the same problem. Manually specifying the IP address of my HA server ("-s X.X.X.X" under the "Optional setting (e.g. for LMS IP address)" field on the audio tab in the squeezelite settings) allowed them to connect across different VLANs.

patdemko avatar Jun 05 '22 15:06 patdemko

Technically this issue can't be fixed but I think it would be good to place a small note in the docs about this.

marcelveldt avatar Jun 05 '22 19:06 marcelveldt

One more point to this, I've added a 2nd VLAN interface to my HA instance to attach it to the music network. The DLNA integration is able to see my squeezebox devices on this other network automatically now, but slimproto does not.

giantorth avatar Oct 24 '22 13:10 giantorth

slimproto is not meant to travel over multiple subnets nor will any mdns forwarders account for it.

marcelveldt avatar Oct 27 '22 07:10 marcelveldt

There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates. Please make sure to update to the latest Home Assistant version and check if that solves the issue. Let us know if that works for you by adding a comment 👍 This issue has now been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.