I set up an IoT vlan that works in almost all cases except for trying to connect my Samsun Smart TV to Home Assistant. When I connect the TV to my regular wifi that is on the same vlan as the HA server, the TV is auto discovered and able to be added to HA. The TV will give a prompt to apprve the connection to Home Assistant.
But when I connect the TV to my IoT wifi on the IoT vlan I am unable to connect the TV to Home Assistant. The TV is not auto discovered and when I try to manually add the TV through the integration, plugging in the IP address, it appears to see the TV (the model number is listed in the window) but I do not get hte prompt on the TV to approve the connection. I’ve tried clearing out Home Assistant from the approved devices list on the TV but that didn’t help. Its like HA can see the TV on the network but can’t complete the setup.
Additionally, I am able to ping the device from a laptop on my main wifi/main vlan.
I’ve tried to diable my drop traffic rule between vlans to see if that was the issue but even that didn’t allow HA to add the TV.
I’m not quite sure what is causing this issue and I’m at a loss on what to try next.
Just found this known issue.
opened 09:08PM - 01 May 20 UTC
closed 05:40PM - 28 Dec 20 UTC
integration: samsungtv
## The problem
<!--
Describe the issue you are experiencing here to communi… cate to the
maintainers. Tell us what you were trying to do and what happened.
-->
I recently bought a router that supports VLANs, so I have segregated my network using VLANs and firewall rules to allow home assistant to communicate with all devices freely, but devices on a different subnet cannot initiate connection. Since I have done so, all of my integrations have been working except for the Samsung Smart TV integration.
When I try to set up this integration in the UI, it immediately says "Unable to connect to this device", and I believe this is an issue of connection timeout because of the process of traversing VLANs to make the websocket handshake. This is just speculation as I have not tested this, however I have found that my Home Assistant can access the rest API using `http://192.168.107.11:8001/api/v2`
My home assistant is on the `192.168.0.0/24` VLAN and the Samsung TV is on the `192.168.107.0/24` VLAN
## Environment
<!--
Provide details about the versions you are using, which helps us to reproduce
and find the issue quicker. Version information is found in the
Home Assistant frontend: Developer tools -> Info.
-->
- Home Assistant Core release with the issue: 0.109.0
- Last working Home Assistant Core release (if known): N/A It was working before putting my TV on another VLAN
- Operating environment (Home Assistant/Supervised/Docker/venv): venv
- Integration causing this issue: Samsung Smart TV
- Link to integration documentation on our website: https://www.home-assistant.io/integrations/samsungtv/
## Problem-relevant `configuration.yaml`
<!--
An example configuration that caused the problem for you. Fill this out even
if it seems unimportant to you. Please be sure to remove personal information
like passwords, private URLs and other credentials.
-->
Attempted to using the integration via the UI with the same result.
```yaml
samsungtv:
- host: 192.168.107.11
name: Samsung TV
```
## Traceback/Error logs
<!--
If you come across any trace or error logs, please provide them.
-->
```txt
2020-05-02 20:39:07 DEBUG (SyncWorker_19) [homeassistant.components.samsungtv] Try config: {'name': 'HomeAssistant', 'description': 'HomeAssistant', 'id': 'ha.component.samsung', 'host': '192.168.107.11', 'method': 'legacy', 'port': None, 'timeout': 31}
2020-05-02 20:39:07 DEBUG (SyncWorker_19) [homeassistant.components.samsungtv] Failing config: {'name': 'HomeAssistant', 'description': 'HomeAssistant', 'id': 'ha.component.samsung', 'host': '192.168.107.11', 'method': 'legacy', 'port': None, 'timeout': 31}, error: [Errno 111] Connection refused
2020-05-02 20:39:07 DEBUG (SyncWorker_19) [homeassistant.components.samsungtv] Try config: {'name': 'HomeAssistant', 'host': '192.168.107.11', 'method': 'websocket', 'port': 8001, 'timeout': 31}
2020-05-02 20:39:07 DEBUG (SyncWorker_19) [samsungtvws.remote] WS url ws://192.168.107.11:8001/api/v2/channels/samsung.remote.control?name=SG9tZUFzc2lzdGFudA==
2020-05-02 20:39:07 DEBUG (SyncWorker_19) [samsungtvws.remote] Connection closed.
2020-05-02 20:39:07 DEBUG (SyncWorker_19) [samsungtvws.remote] Connection closed.
2020-05-02 20:39:07 DEBUG (SyncWorker_19) [homeassistant.components.samsungtv] Failing config: {'name': 'HomeAssistant', 'host': '192.168.107.11', 'method': 'websocket', 'port': 8001, 'timeout': 31}, error: {'event': 'ms.channel.timeOut'}
2020-05-02 20:39:07 DEBUG (SyncWorker_19) [homeassistant.components.samsungtv] Try config: {'name': 'HomeAssistant', 'host': '192.168.107.11', 'method': 'websocket', 'port': 8002, 'timeout': 31}
2020-05-02 20:39:07 DEBUG (SyncWorker_19) [samsungtvws.remote] WS url wss://192.168.107.11:8002/api/v2/channels/samsung.remote.control?name=SG9tZUFzc2lzdGFudA==&token=None
2020-05-02 20:39:07 DEBUG (SyncWorker_19) [samsungtvws.remote] Connection closed.
2020-05-02 20:39:07 DEBUG (SyncWorker_19) [samsungtvws.remote] Connection closed.
2020-05-02 20:39:07 DEBUG (SyncWorker_19) [homeassistant.components.samsungtv] Failing config: {'name': 'HomeAssistant', 'host': '192.168.107.11', 'method': 'websocket', 'port': 8002, 'timeout': 31}, error: {'event': 'ms.channel.timeOut'}
2020-05-02 20:39:07 DEBUG (SyncWorker_19) [homeassistant.components.samsungtv] No working config found
```
## Additional information
The rules in my firewall allow connections on any port from my `192.168.0.0/24` VLAN to the `192.168.107.0/24` VLAN. I have also tried setting the firewall rules so that just my TV (`192.168.107.11`) can connect to my home assistant (`192.168.0.26`) to no avail. I have set up my network to broadcast mDNS, and since doing so, all my chromecast devices function just fine, it's just the TV that is not working.
The TV Model is UN65KU6300