home-assistant / core

:house_with_garden: Open source home automation that puts local control and privacy first.
https://www.home-assistant.io
Apache License 2.0
73.69k stars 30.82k forks source link

fails to add Samsung TV #104092

Closed kusma closed 12 months ago

kusma commented 1 year ago

The problem

When I try to add the "Samsung Smart TV" integration, I get an error saying "Home Assistant is not authorized to connect to this Samsung TV. Check your TV's External Device Manager settings to authorize Home Assistant.". However, not authorization request has happens on the TV.

What version of Home Assistant Core has the issue?

core-2023.11.2

What was the last working version of Home Assistant Core?

No response

What type of installation are you running?

Home Assistant Container

Integration causing the issue

Samsung Smart TV

Link to integration documentation on our website

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

Diagnostics information

No response

Example YAML snippet

No response

Anything in the logs that might be useful for us?

2023-11-16 20:36:52.174 DEBUG (MainThread) [samsungtvws.async_rest] Get device info via rest api
2023-11-16 20:36:52.222 DEBUG (MainThread) [samsungtvws.helper] Processing API response: {"device":{"FrameTVSupport":"false","GamePadSupport":"true","ImeSyncedSupport":"true","Language":"en_GB","OS":"Tizen","PowerState":"on","TokenAuthSupport":"true","VoiceSupport":"true","WallScreenRatio":"-1","WallService":"false","countryCode":"NO","description":"Samsung DTV RCR","developerIP":"0.0.0.0","developerMode":"0","duid":"uuid:c92d97b9-705a-466f-8058-469b14b276dd","firmwareVersion":"Unknown","id":"uuid:c92d97b9-705a-466f-8058-469b14b276dd","ip":"192.168.10.13","model":"22_PONTUSM_QTV","modelName":"QE65QN95BATXXC","name":"SamsungTV","networkType":"wireless","resolution":"3840x2160","smartHubAgreement":"true","ssid":"72:d7:9a:8b:72:57","type":"Samsung SmartTV","udn":"uuid:c92d97b9-705a-466f-8058-469b14b276dd","wifiMac":"A0:D0:5B:42:41:A4"},"id":"uuid:c92d97b9-705a-466f-8058-469b14b276dd","isSupport":"{\"DMP_DRM_PLAYREADY\":\"false\",\"DMP_DRM_WIDEVINE\":\"false\",\"DMP_available\":\"true\",\"EDEN_available\":\"true\",\"FrameTVSupport\":\"false\",\"ImeSyncedSupport\":\"true\",\"TokenAuthSupport\":\"true\",\"remote_available\":\"true\",\"remote_fourDirections\":\"true\",\"remote_touchPad\":\"true\",\"remote_voiceControl\":\"true\"}\n","name":"SamsungTV","remote":"1.0","type":"Samsung SmartTV","uri":"https://192.168.10.13:8002/api/v2/","version":"2.0.25"}

2023-11-16 20:36:52.222 DEBUG (MainThread) [homeassistant.components.samsungtv] Device info on 192.168.10.13 is: {'device': {'FrameTVSupport': 'false', 'GamePadSupport': 'true', 'ImeSyncedSupport': 'true', 'Language': 'en_GB', 'OS': 'Tizen', 'PowerState': 'on', 'TokenAuthSupport': 'true', 'VoiceSupport': 'true', 'WallScreenRatio': '-1', 'WallService': 'false', 'countryCode': 'NO', 'description': 'Samsung DTV RCR', 'developerIP': '0.0.0.0', 'developerMode': '0', 'duid': 'uuid:c92d97b9-705a-466f-8058-469b14b276dd', 'firmwareVersion': 'Unknown', 'id': 'uuid:c92d97b9-705a-466f-8058-469b14b276dd', 'ip': '192.168.10.13', 'model': '22_PONTUSM_QTV', 'modelName': 'QE65QN95BATXXC', 'name': 'SamsungTV', 'networkType': 'wireless', 'resolution': '3840x2160', 'smartHubAgreement': 'true', 'ssid': '72:d7:9a:8b:72:57', 'type': 'Samsung SmartTV', 'udn': 'uuid:c92d97b9-705a-466f-8058-469b14b276dd', 'wifiMac': 'A0:D0:5B:42:41:A4'}, 'id': 'uuid:c92d97b9-705a-466f-8058-469b14b276dd', 'isSupport': '{"DMP_DRM_PLAYREADY":"false","DMP_DRM_WIDEVINE":"false","DMP_available":"true","EDEN_available":"true","FrameTVSupport":"false","ImeSyncedSupport":"true","TokenAuthSupport":"true","remote_available":"true","remote_fourDirections":"true","remote_touchPad":"true","remote_voiceControl":"true"}\n', 'name': 'SamsungTV', 'remote': '1.0', 'type': 'Samsung SmartTV', 'uri': 'https://192.168.10.13:8002/api/v2/', 'version': '2.0.25'}
2023-11-16 20:36:52.222 DEBUG (MainThread) [homeassistant.components.samsungtv] Fetching rest info via 8002 was successful: {'device': {'FrameTVSupport': 'false', 'GamePadSupport': 'true', 'ImeSyncedSupport': 'true', 'Language': 'en_GB', 'OS': 'Tizen', 'PowerState': 'on', 'TokenAuthSupport': 'true', 'VoiceSupport': 'true', 'WallScreenRatio': '-1', 'WallService': 'false', 'countryCode': 'NO', 'description': 'Samsung DTV RCR', 'developerIP': '0.0.0.0', 'developerMode': '0', 'duid': 'uuid:c92d97b9-705a-466f-8058-469b14b276dd', 'firmwareVersion': 'Unknown', 'id': 'uuid:c92d97b9-705a-466f-8058-469b14b276dd', 'ip': '192.168.10.13', 'model': '22_PONTUSM_QTV', 'modelName': 'QE65QN95BATXXC', 'name': 'SamsungTV', 'networkType': 'wireless', 'resolution': '3840x2160', 'smartHubAgreement': 'true', 'ssid': '72:d7:9a:8b:72:57', 'type': 'Samsung SmartTV', 'udn': 'uuid:c92d97b9-705a-466f-8058-469b14b276dd', 'wifiMac': 'A0:D0:5B:42:41:A4'}, 'id': 'uuid:c92d97b9-705a-466f-8058-469b14b276dd', 'isSupport': '{"DMP_DRM_PLAYREADY":"false","DMP_DRM_WIDEVINE":"false","DMP_available":"true","EDEN_available":"true","FrameTVSupport":"false","ImeSyncedSupport":"true","TokenAuthSupport":"true","remote_available":"true","remote_fourDirections":"true","remote_touchPad":"true","remote_voiceControl":"true"}\n', 'name': 'SamsungTV', 'remote': '1.0', 'type': 'Samsung SmartTV', 'uri': 'https://192.168.10.13:8002/api/v2/', 'version': '2.0.25'}, checking for encrypted
2023-11-16 20:36:52.222 DEBUG (MainThread) [homeassistant.components.samsungtv] Try config: {'name': 'HomeAssistant', 'host': '192.168.10.13', 'method': 'websocket', 'port': 8002, 'timeout': 31}
2023-11-16 20:36:52.222 DEBUG (MainThread) [samsungtvws.async_connection] WS url wss://192.168.10.13:8002/api/v2/channels/samsung.remote.control?name=SG9tZUFzc2lzdGFudA==&token=None
2023-11-16 20:36:52.272 DEBUG (MainThread) [samsungtvws.helper] Processing API response: {"event":"ms.channel.timeOut"}

2023-11-16 20:36:52.273 DEBUG (MainThread) [samsungtvws.connection] SamsungTVWS websocket event: {'event': 'ms.channel.timeOut'}
2023-11-16 20:36:52.273 DEBUG (MainThread) [samsungtvws.async_connection] Connection closed.
2023-11-16 20:36:52.273 DEBUG (MainThread) [samsungtvws.async_connection] Connection closed.
2023-11-16 20:36:52.273 DEBUG (MainThread) [homeassistant.components.samsungtv] Failing config: {'name': 'HomeAssistant', 'host': '192.168.10.13', 'method': 'websocket', 'port': 8002, 'timeout': 31}, <class 'samsungtvws.exceptions.ConnectionFailure'> error: {'event': 'ms.channel.timeOut'}
2023-11-16 20:36:52.273 DEBUG (MainThread) [homeassistant.components.samsungtv] Try config: {'name': 'HomeAssistant', 'host': '192.168.10.13', 'method': 'websocket', 'port': 8001, 'timeout': 31}
2023-11-16 20:36:52.273 DEBUG (MainThread) [samsungtvws.async_connection] WS url ws://192.168.10.13:8001/api/v2/channels/samsung.remote.control?name=SG9tZUFzc2lzdGFudA==
2023-11-16 20:36:52.532 DEBUG (MainThread) [samsungtvws.helper] Processing API response: {"event":"ms.channel.unauthorized"}

2023-11-16 20:36:52.532 DEBUG (MainThread) [samsungtvws.connection] SamsungTVWS websocket event: {'event': 'ms.channel.unauthorized'}
2023-11-16 20:36:52.533 DEBUG (MainThread) [samsungtvws.async_connection] Connection closed.
2023-11-16 20:36:52.533 DEBUG (MainThread) [samsungtvws.async_connection] Connection closed.
2023-11-16 20:36:52.533 DEBUG (MainThread) [homeassistant.components.samsungtv] Failing config: {'name': 'HomeAssistant', 'host': '192.168.10.13', 'method': 'websocket', 'port': 8001, 'timeout': 31}, <class 'samsungtvws.exceptions.UnauthorizedError'> error: {'event': 'ms.channel.unauthorized'}

Additional information

The TV is a Samsung 65" QN95B 4K Neo QLED TV (2022).

home-assistant[bot] commented 1 year ago

Hey there @chemelli74, @epenet, mind taking a look at this issue as it has been labeled with an integration (samsungtv) you are listed as a code owner for? Thanks!

Code owner commands Code owners of `samsungtv` can trigger bot actions by commenting: - `@home-assistant close` Closes the issue. - `@home-assistant rename Awesome new title` Renames the issue. - `@home-assistant reopen` Reopen the issue. - `@home-assistant unassign samsungtv` Removes the current integration label and assignees on the issue, add the integration domain after the command.

(message by CodeOwnersMention)


samsungtv documentation samsungtv source (message by IssueLinks)

epenet commented 12 months ago

Did you check these two known issues?

kusma commented 12 months ago

Ahhh, yeah... The TV and the HomeAssistant-instance are on different VLANs, indeed...

I guess that's it, thanks for chiming in.