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.68k stars 30.81k forks source link

SamsungTV Integration reporting device not support for Tizen UA65MU6100 #53146

Closed bevanweiss closed 3 years ago

bevanweiss commented 3 years ago

The problem

When entering hostname, and approving request on TV, HA just reports 'This Samsung device is currently not supported.' But the TV itself reports as Tizen, which appears to be documented as supported by the SamsungTv integration.

What is version of Home Assistant Core has the issue?

core-2021.7.3

What was the last working version of Home Assistant Core?

No response

What type of installation are you running?

Home Assistant Supervised

Integration causing the issue

SamsungTv

Link to integration documentation on our website

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

Example YAML snippet

samsungtv:
  - host: 10.0.0.100
    name: Living Room TV
    turn_on_action:
      - service: wake_on_lan.send_magic_packet
        data:
          mac: 68:27:37:0a:ee:cc

Anything in the logs that might be useful for us?

2021-07-18 23:04:29 INFO (MainThread) [homeassistant.components.zeroconf] Starting Zeroconf broadcast
2021-07-18 23:04:29 INFO (MainThread) [custom_components.hacs] Stage changed: HacsStage.STARTUP
2021-07-18 23:04:29 INFO (MainThread) [custom_components.hacs] setup task HacsSetupTask.CATEGORIES
2021-07-18 23:04:29 INFO (SyncWorker_5) [custom_components.hacs] Enable category: HacsCategory.INTEGRATION
2021-07-18 23:04:29 INFO (SyncWorker_5) [custom_components.hacs] Enable category: HacsCategory.PLUGIN
2021-07-18 23:04:29 INFO (SyncWorker_5) [custom_components.hacs] Enable category: HacsCategory.THEME
2021-07-18 23:04:29 DEBUG (MainThread) [homeassistant.components.samsungtv] Samsung device found via SSDP: {'CACHE-CONTROL': 'max-age=1800', 'DATE': 'Sun, 18 Jul 2021 13:04:13 GMT', 'ssdp_ext': '', 'ssdp_location': 'http://10.0.0.100:7676/rcr/', 'ssdp_server': 'Samsung-Linux/4.1, UPnP/1.0, Samsung_UPnP_SDK/1.0', 'ssdp_st': 'urn:samsung.com:device:RemoteControlReceiver:1', 'ssdp_usn': 'uuid:e29ce5d8-57dc-403c-b798-7276925f47e0::urn:samsung.com:device:RemoteControlReceiver:1', 'Content-Length': '0', 'BOOTID.UPNP.ORG': '17', '_location_original': 'http://10.0.0.100:7676/rcr/', '_timestamp': datetime.datetime(2021, 7, 18, 23, 4, 14, 490645), '_host': '10.0.0.100', '_port': 59676, '_udn': 'uuid:e29ce5d8-57dc-403c-b798-7276925f47e0', '_source': 'search', 'deviceType': 'urn:samsung.com:device:RemoteControlReceiver:1', 'friendlyName': '[TV] Samsung 6 Series (65)', 'manufacturer': 'Samsung Electronics', 'manufacturerURL': 'http://www.samsung.com/sec', 'modelDescription': 'Samsung DTV RCR', 'modelName': 'UA65MU6100', 'modelNumber': '1.0', 'modelURL': 'http://www.samsung.com/sec', 'serialNumber': '20090804RCR', 'UDN': 'uuid:e29ce5d8-57dc-403c-b798-7276925f47e0', 'deviceID': 'SHCHC5ZTTO2RS', 'ProductCap': 'Resolution:1920X1080,Tizen,Y2017', 'serviceList': {'service': {'serviceType': 'urn:samsung.com:service:MultiScreenService:1', 'serviceId': 'urn:samsung.com:serviceId:MultiScreenService', 'controlURL': '/RCR/control/MultiScreenService', 'eventSubURL': '/RCR/event/MultiScreenService', 'SCPDURL': 'MultiScreenService.xml'}}, 'Capabilities': {'Capability': {'@name': 'samsung:multiscreen:1', '@port': '8001', '@location': '/ms/1.0/'}}}
2021-07-18 23:04:29 DEBUG (SyncWorker_2) [homeassistant.components.samsungtv] Create SamsungTVWSBridge for name (10.0.0.100)
2021-07-18 23:04:29 DEBUG (SyncWorker_2) [samsungtvws.remote] Get device info via rest api
2021-07-18 23:04:29 INFO (MainThread) [custom_components.hacs] Loading known repositories
2021-07-18 23:04:30 INFO (MainThread) [homeassistant.components.sensor] Setting up sensor.upnp
2021-07-18 23:04:31 ERROR (MainThread) [custom_components.hacs] thomasloven/lovelace-dummy-entity-row - Repository is archived.
2021-07-18 23:04:31 ERROR (MainThread) [custom_components.hacs] thomasloven/lovelace-gui-sandbox - Repository is archived.
2021-07-18 23:04:31 ERROR (MainThread) [custom_components.hacs] thomasloven/lovelace-gap-card - Repository is archived.
2021-07-18 23:04:31 ERROR (MainThread) [custom_components.hacs] bieniu/ha-airly - Repository is archived.
2021-07-18 23:04:31 ERROR (MainThread) [custom_components.hacs] mammuth/ha-fritzbox-tools - Repository is archived.
2021-07-18 23:04:31 ERROR (MainThread) [custom_components.hacs] troykelly/hacs-amberelectric - Repository is archived.
2021-07-18 23:04:33 INFO (MainThread) [custom_components.hacs] <Integration kraineff/minecraft-version> Registration completed
2021-07-18 23:04:33 INFO (MainThread) [custom_components.hacs] <Integration kraineff/philips-airpurifier> Registration completed
2021-07-18 23:04:38 INFO (MainThread) [custom_components.hacs] Stage changed: HacsStage.RUNNING
2021-07-18 23:04:47 DEBUG (SyncWorker_0) [homeassistant.components.samsungtv] Try config: {'name': 'HomeAssistant', 'host': '10.0.0.100', 'method': 'websocket', 'port': 8002, 'timeout': 31}
2021-07-18 23:04:47 DEBUG (SyncWorker_0) [samsungtvws.remote] WS url wss://10.0.0.100:8002/api/v2/channels/samsung.remote.control?name=SG9tZUFzc2lzdGFudA==&token=None
2021-07-18 23:04:50 DEBUG (SyncWorker_0) [samsungtvws.remote] Connection closed.
2021-07-18 23:04:50 DEBUG (SyncWorker_0) [samsungtvws.remote] Connection closed.
2021-07-18 23:04:50 DEBUG (SyncWorker_0) [homeassistant.components.samsungtv] Failing config: {'name': 'HomeAssistant', 'host': '10.0.0.100', 'method': 'websocket', 'port': 8002, 'timeout': 31}, error: {'event': 'ms.remote.touchDisable'}
2021-07-18 23:04:50 DEBUG (SyncWorker_0) [homeassistant.components.samsungtv] Try config: {'name': 'HomeAssistant', 'host': '10.0.0.100', 'method': 'websocket', 'port': 8001, 'timeout': 31}
2021-07-18 23:04:50 DEBUG (SyncWorker_0) [samsungtvws.remote] WS url ws://10.0.0.100:8001/api/v2/channels/samsung.remote.control?name=SG9tZUFzc2lzdGFudA==
2021-07-18 23:04:50 DEBUG (SyncWorker_0) [samsungtvws.remote] Connection closed.
2021-07-18 23:04:50 DEBUG (SyncWorker_0) [homeassistant.components.samsungtv] Working but unsupported config: {'name': 'HomeAssistant', 'host': '10.0.0.100', 'method': 'websocket', 'port': 8001, 'timeout': 31}

Additional information

It's a bit strange that the SSDP data set indicates the TV as reporting the port as 8001, but the SamsungTv integration still keeps trying on port 8002 (which I believe is for newer, or older TVs).

Here's the output from the port 8001 web service

{
    "device": {
        "FrameTVSupport": "false",
        "GamePadSupport": "true",
        "ImeSyncedSupport": "true",
        "OS": "Tizen",
        "TokenAuthSupport": "true",
        "VoiceSupport": "true",
        "countryCode": "AU",
        "description": "Samsung DTV RCR",
        "developerIP": "0.0.0.0",
        "developerMode": "0",
        "duid": "uuid:9ef5e146-b1d2-4dd1-bb48-ae491afa200d",
        "firmwareVersion": "Unknown",
        "id": "uuid:9ef5e146-b1d2-4dd1-bb48-ae491afa200d",
        "ip": "10.0.0.100",
        "model": "17_KANTM_UHD_BASIC",
        "modelName": "UA65MU6100",
        "name": "[TV] Samsung 6 Series (65)",
        "networkType": "none",
        "resolution": "3840x2160",
        "smartHubAgreement": "true",
        "ssid": "cc:32:e5:09:64:9f",
        "type": "Samsung SmartTV",
        "udn": "uuid:9ef5e146-b1d2-4dd1-bb48-ae491afa200d",
        "wifiMac": "none"
    },
    "id": "uuid:9ef5e146-b1d2-4dd1-bb48-ae491afa200d",
    "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": "[TV] Samsung 6 Series (65)",
    "remote": "1.0",
    "type": "Samsung SmartTV",
    "uri": "http://10.0.0.100:8001/api/v2/",
    "version": "2.0.25"
}

I note that wifiMac is "none" which definitely differs from what the TV says... (and since I'm accessing this via the wifi, I suspect it does definitely have a wifi MAC).

chemelli74 commented 3 years ago

Hi @bevanweiss, do you have ssh access to your HA instance ? I would like to improve logging and get more info on the exception generated by your TV.

Simone

bevanweiss commented 3 years ago

I do have SSH and Web terminal.

chemelli74 commented 3 years ago

Here the steps:

Simone

bevanweiss commented 3 years ago

Not sure quite what's different, but the log does suggest it got a token at least. But the integration is still showing the entity as unavailable, and showed another Samsung Tv integration that needed a reconfiguration (and selecting that resulted in the same error message as I reported).

2021-07-20 16:44:41 INFO (MainThread) [homeassistant.components.zeroconf] Starting Zeroconf broadcast
2021-07-20 16:44:41 INFO (MainThread) [custom_components.hacs] Stage changed: HacsStage.STARTUP
2021-07-20 16:44:41 INFO (MainThread) [custom_components.hacs] setup task HacsSetupTask.CATEGORIES
2021-07-20 16:44:41 INFO (SyncWorker_2) [custom_components.hacs] Enable category: HacsCategory.INTEGRATION
2021-07-20 16:44:41 INFO (SyncWorker_2) [custom_components.hacs] Enable category: HacsCategory.PLUGIN
2021-07-20 16:44:41 INFO (SyncWorker_2) [custom_components.hacs] Enable category: HacsCategory.THEME
2021-07-20 16:44:41 DEBUG (SyncWorker_0) [samsungtvws.remote] Get device info via rest api
2021-07-20 16:44:41 INFO (MainThread) [custom_components.hacs] Loading known repositories
2021-07-20 16:44:41 DEBUG (SyncWorker_2) [samsungtvws.remote] Get device info via rest api
2021-07-20 16:44:41 INFO (MainThread) [homeassistant.components.sensor] Setting up sensor.upnp
2021-07-20 16:44:42 INFO (MainThread) [homeassistant.components.media_player] Setting up media_player.samsungtv
2021-07-20 16:44:42 DEBUG (SyncWorker_3) [samsungtvws.remote] Connection closed.
2021-07-20 16:44:42 DEBUG (SyncWorker_3) [samsungtvws.remote] WS url wss://10.0.0.100:8002/api/v2/channels/samsung.remote.control?name=SG9tZUFzc2lzdGFudA==&token=None
2021-07-20 16:44:43 ERROR (MainThread) [custom_components.hacs] thomasloven/lovelace-dummy-entity-row - Repository is archived.
2021-07-20 16:44:43 ERROR (MainThread) [custom_components.hacs] thomasloven/lovelace-gap-card - Repository is archived.
2021-07-20 16:44:43 ERROR (MainThread) [custom_components.hacs] thomasloven/lovelace-gui-sandbox - Repository is archived.
2021-07-20 16:44:43 ERROR (MainThread) [custom_components.hacs] bieniu/ha-airly - Repository is archived.
2021-07-20 16:44:43 ERROR (MainThread) [custom_components.hacs] troykelly/hacs-amberelectric - Repository is archived.
2021-07-20 16:44:43 ERROR (MainThread) [custom_components.hacs] mammuth/ha-fritzbox-tools - Repository is archived.
2021-07-20 16:44:44 DEBUG (SyncWorker_3) [samsungtvws.remote] Got token 17702897
2021-07-20 16:44:44 INFO (SyncWorker_3) [samsungtvws.remote] New token 17702897
2021-07-20 16:44:44 INFO (MainThread) [homeassistant.helpers.entity_registry] Registered new media_player.samsungtv entity: media_player.living_room_tv
2021-07-20 16:44:44 INFO (MainThread) [custom_components.hacs] <Integration kraineff/philips-airpurifier> Registration completed
2021-07-20 16:44:44 INFO (MainThread) [custom_components.hacs] <Integration kraineff/minecraft-version> Registration completed
2021-07-20 16:44:50 INFO (MainThread) [custom_components.hacs] Stage changed: HacsStage.RUNNING
2021-07-20 16:44:54 DEBUG (SyncWorker_4) [samsungtvws.remote] Connection closed.
2021-07-20 16:44:54 DEBUG (SyncWorker_4) [samsungtvws.remote] WS url wss://10.0.0.100:8002/api/v2/channels/samsung.remote.control?name=SG9tZUFzc2lzdGFudA==&token=None
2021-07-20 16:44:57 DEBUG (SyncWorker_4) [samsungtvws.remote] Connection closed.
2021-07-20 16:46:48 DEBUG (SyncWorker_5) [samsungtvws.remote] WS url wss://10.0.0.100:8002/api/v2/channels/samsung.remote.control?name=SG9tZUFzc2lzdGFudA==&token=None
2021-07-20 16:46:51 DEBUG (SyncWorker_5) [samsungtvws.remote] Connection closed.
2021-07-20 16:46:51 DEBUG (SyncWorker_5) [samsungtvws.remote] Connection closed.
2021-07-20 16:46:51 DEBUG (SyncWorker_5) [samsungtvws.remote] WS url ws://10.0.0.100:8001/api/v2/channels/samsung.remote.control?name=SG9tZUFzc2lzdGFudA==
2021-07-20 16:46:51 DEBUG (SyncWorker_5) [samsungtvws.remote] Connection closed.
chemelli74 commented 3 years ago

Log is different compared to previous one.

You have 2 tv ? Which is the IP of the working one and the one of the not-working one ?

Please start over with the integration and report back what happens.

Simone

bevanweiss commented 3 years ago

There is only the one IP that I see for the Samsung TV in the logs 10.0.0.100 And there is only the one Samsung TV I've got. But on restarting HA, I get this in the integration display image

Clicking Reconfigure, and Accept on the TV produces the device not supported dialog.

chemelli74 commented 3 years ago

Clicking Reconfigure, and Accept on the TV produces the device not supported dialog.

Please go ahead and share the log with the changes I suggested.

Simone

bevanweiss commented 3 years ago

That is the log provided. This log was from after copying the samsungtv from the repo into the custom_components folder, changing line 292 (which was already pretty much as you wrote, just spread over three lines) and changing the manifold.json file in that same samsungtv folder, then restarting HA.

The entries from 2021-07-20 16:46:48 were from clicking that Reconfigure button.

bevanweiss commented 3 years ago

image

bevanweiss commented 3 years ago

Ahh... of course now that it's a custom component the logging config was wrong. So I've reconfigured the logging level to debug for the custom_components.samsungtv, and restarted HA.

I then got the below (post ssdp anyway).. the same two entries occured in the integration (one possibly from ssdp, and one from my configuration.yaml file shown in the original).

The 2021-07-20 22:30:45 DEBUG (SyncWorker_1) [custom_components.samsungtv] Access denied in getting remote object section is different from what I had been getting on the 'older' builtin items.

2021-07-20 22:30:41 INFO (MainThread) [homeassistant.setup] Setting up ssdp
2021-07-20 22:30:41 INFO (MainThread) [homeassistant.setup] Setup of domain ssdp took 0.0 seconds
2021-07-20 22:30:41 INFO (MainThread) [homeassistant.setup] Setting up notify
2021-07-20 22:30:41 INFO (MainThread) [homeassistant.setup] Setup of domain notify took 0.0 seconds
2021-07-20 22:30:41 DEBUG (SyncWorker_1) [custom_components.samsungtv] Create SamsungTVWSBridge for name (10.0.0.100)
2021-07-20 22:30:41 DEBUG (SyncWorker_1) [samsungtvws.remote] Get device info via rest api
2021-07-20 22:30:41 INFO (MainThread) [custom_components.hacs] HACS is enabled
2021-07-20 22:30:41 INFO (MainThread) [homeassistant.setup] Setting up device_tracker
2021-07-20 22:30:41 INFO (MainThread) [homeassistant.components.sensor] Setting up sensor.mobile_app
2021-07-20 22:30:41 INFO (MainThread) [homeassistant.components.binary_sensor] Setting up binary_sensor.mobile_app
2021-07-20 22:30:42 INFO (MainThread) [homeassistant.components.notify] Setting up notify.mobile_app
2021-07-20 22:30:42 INFO (MainThread) [homeassistant.setup] Setup of domain device_tracker took 0.0 seconds
2021-07-20 22:30:42 INFO (MainThread) [homeassistant.setup] Setting up default_config
2021-07-20 22:30:42 INFO (SyncWorker_3) [homeassistant.loader] Loaded stream from homeassistant.components.stream
2021-07-20 22:30:42 INFO (MainThread) [homeassistant.components.device_tracker] Setting up device_tracker.mobile_app
2021-07-20 22:30:42 INFO (MainThread) [homeassistant.setup] Setting up upnp
2021-07-20 22:30:42 INFO (MainThread) [homeassistant.setup] Setup of domain upnp took 0.0 seconds
2021-07-20 22:30:42 INFO (MainThread) [homeassistant.components.upnp] Device not discovered
2021-07-20 22:30:42 INFO (MainThread) [homeassistant.components.upnp] Unable to create UPnP/IGD, aborting
2021-07-20 22:30:42 WARNING (MainThread) [homeassistant.config_entries] Config entry 'Archer AX50' for upnp integration not ready yet: None; Retrying in background
2021-07-20 22:30:42 INFO (MainThread) [homeassistant.setup] Setting up stream
2021-07-20 22:30:42 INFO (MainThread) [homeassistant.setup] Setup of domain stream took 0.0 seconds
2021-07-20 22:30:42 INFO (MainThread) [homeassistant.setup] Setup of domain default_config took 0.1 seconds
2021-07-20 22:30:43 INFO (MainThread) [homeassistant.components.sensor] Setting up sensor.ipp
2021-07-20 22:30:43 INFO (MainThread) [homeassistant.setup] Setting up media_player
2021-07-20 22:30:43 INFO (MainThread) [homeassistant.setup] Setup of domain media_player took 0.0 seconds
2021-07-20 22:30:43 INFO (MainThread) [homeassistant.components.media_player] Setting up media_player.samsungtv
2021-07-20 22:30:43 DEBUG (SyncWorker_1) [samsungtvws.remote] Connection closed.
2021-07-20 22:30:43 DEBUG (SyncWorker_1) [custom_components.samsungtv] Create SamsungTVWSBridge for name (10.0.0.100)
2021-07-20 22:30:43 DEBUG (SyncWorker_1) [samsungtvws.remote] WS url wss://10.0.0.100:8002/api/v2/channels/samsung.remote.control?name=SG9tZUFzc2lzdGFudA==&token=None
2021-07-20 22:30:43 INFO (MainThread) [custom_components.hacs] Setup task HacsSetupTask.HACS_REPO
2021-07-20 22:30:43 INFO (SyncWorker_5) [homeassistant.loader] Loaded weather from homeassistant.components.weather
2021-07-20 22:30:43 INFO (MainThread) [homeassistant.setup] Setting up weather
2021-07-20 22:30:43 INFO (MainThread) [homeassistant.setup] Setup of domain weather took 0.0 seconds
2021-07-20 22:30:43 INFO (MainThread) [homeassistant.components.weather] Setting up weather.met
2021-07-20 22:30:45 DEBUG (SyncWorker_1) [samsungtvws.remote] Connection closed.
2021-07-20 22:30:45 DEBUG (SyncWorker_1) [custom_components.samsungtv] Access denied in getting remote object
2021-07-20 22:30:45 INFO (MainThread) [custom_components.hacs] <Integration hacs/integration> Registration completed
2021-07-20 22:30:45 INFO (MainThread) [custom_components.hacs] Restore started
2021-07-20 22:30:46 INFO (MainThread) [custom_components.hacs] Restore done
2021-07-20 22:30:46 INFO (MainThread) [custom_components.hacs] Setup task HacsSetupTask.SENSOR
2021-07-20 22:30:46 INFO (MainThread) [custom_components.hacs] Stage changed: HacsStage.WAITING
2021-07-20 22:30:46 INFO (MainThread) [custom_components.hacs] Setup complete, waiting for Home Assistant before startup tasks starts
2021-07-20 22:30:46 INFO (MainThread) [custom_components.hacs] HACS is enabled
2021-07-20 22:30:46 INFO (MainThread) [homeassistant.components.sensor] Setting up sensor.hacs
2021-07-20 22:30:46 INFO (MainThread) [homeassistant.setup] Setting up camera
2021-07-20 22:30:46 INFO (SyncWorker_0) [homeassistant.loader] Loaded switch from homeassistant.components.switch
2021-07-20 22:30:46 INFO (MainThread) [homeassistant.setup] Setting up switch
2021-07-20 22:30:46 INFO (MainThread) [homeassistant.setup] Setup of domain switch took 0.0 seconds
2021-07-20 22:30:46 INFO (MainThread) [homeassistant.setup] Setup of domain camera took 0.0 seconds
2021-07-20 22:30:47 INFO (MainThread) [homeassistant.components.binary_sensor] Setting up binary_sensor.synology_dsm
2021-07-20 22:30:47 INFO (MainThread) [homeassistant.components.sensor] Setting up sensor.synology_dsm
2021-07-20 22:30:47 INFO (MainThread) [homeassistant.components.switch] Setting up switch.synology_dsm
2021-07-20 22:30:47 INFO (MainThread) [homeassistant.components.camera] Setting up camera.synology_dsm
2021-07-20 22:30:47 INFO (MainThread) [homeassistant.components.binary_sensor] Setting up binary_sensor.synology_dsm
2021-07-20 22:30:47 INFO (MainThread) [homeassistant.components.camera] Setting up camera.synology_dsm
2021-07-20 22:30:47 INFO (MainThread) [homeassistant.components.sensor] Setting up sensor.synology_dsm
2021-07-20 22:30:47 INFO (MainThread) [homeassistant.components.switch] Setting up switch.synology_dsm
2021-07-20 22:30:48 INFO (MainThread) [homeassistant.bootstrap] Home Assistant initialized in 14.62s
2021-07-20 22:30:48 INFO (MainThread) [homeassistant.core] Starting Home Assistant
2021-07-20 22:30:48 INFO (MainThread) [homeassistant.core] Timer:starting
2021-07-20 22:30:48 INFO (MainThread) [homeassistant.components.zeroconf] Starting Zeroconf broadcast
2021-07-20 22:30:48 INFO (MainThread) [custom_components.hacs] Stage changed: HacsStage.STARTUP
2021-07-20 22:30:48 INFO (MainThread) [custom_components.hacs] setup task HacsSetupTask.CATEGORIES
2021-07-20 22:30:48 INFO (SyncWorker_4) [custom_components.hacs] Enable category: HacsCategory.INTEGRATION
2021-07-20 22:30:48 INFO (SyncWorker_4) [custom_components.hacs] Enable category: HacsCategory.PLUGIN
2021-07-20 22:30:48 INFO (SyncWorker_4) [custom_components.hacs] Enable category: HacsCategory.THEME
2021-07-20 22:30:48 DEBUG (MainThread) [custom_components.samsungtv] Samsung device found via SSDP: {'CACHE-CONTROL': 'max-age=1800', 'DATE': 'Tue, 20 Jul 2021 12:30:41 GMT', 'ssdp_ext': '', 'ssdp_location': 'http://10.0.0.100:7676/rcr/', 'ssdp_server': 'Samsung-Linux/4.1, UPnP/1.0, Samsung_UPnP_SDK/1.0', 'ssdp_st': 'urn:samsung.com:device:RemoteControlReceiver:1', 'ssdp_usn': 'uuid:e29ce5d8-57dc-403c-b798-7276925f47e0::urn:samsung.com:device:RemoteControlReceiver:1', 'Content-Length': '0', 'BOOTID.UPNP.ORG': '29', '_location_original': 'http://10.0.0.100:7676/rcr/', '_timestamp': datetime.datetime(2021, 7, 20, 22, 30, 43, 565087), '_host': '10.0.0.100', '_port': 42726, '_udn': 'uuid:e29ce5d8-57dc-403c-b798-7276925f47e0', '_source': 'search', 'deviceType': 'urn:samsung.com:device:RemoteControlReceiver:1', 'friendlyName': '[TV] Samsung 6 Series (65)', 'manufacturer': 'Samsung Electronics', 'manufacturerURL': 'http://www.samsung.com/sec', 'modelDescription': 'Samsung DTV RCR', 'modelName': 'UA65MU6100', 'modelNumber': '1.0', 'modelURL': 'http://www.samsung.com/sec', 'serialNumber': '20090804RCR', 'UDN': 'uuid:e29ce5d8-57dc-403c-b798-7276925f47e0', 'deviceID': 'SHCHC5ZTTO2RS', 'ProductCap': 'Resolution:1920X1080,Tizen,Y2017', 'serviceList': {'service': {'serviceType': 'urn:samsung.com:service:MultiScreenService:1', 'serviceId': 'urn:samsung.com:serviceId:MultiScreenService', 'controlURL': '/RCR/control/MultiScreenService', 'eventSubURL': '/RCR/event/MultiScreenService', 'SCPDURL': 'MultiScreenService.xml'}}, 'Capabilities': {'Capability': {'@name': 'samsung:multiscreen:1', '@port': '8001', '@location': '/ms/1.0/'}}}
2021-07-20 22:30:48 DEBUG (SyncWorker_2) [custom_components.samsungtv] Create SamsungTVWSBridge for name (10.0.0.100)
2021-07-20 22:30:48 DEBUG (SyncWorker_2) [samsungtvws.remote] Get device info via rest api
2021-07-20 22:30:48 INFO (MainThread) [custom_components.hacs] Loading known repositories
2021-07-20 22:30:48 INFO (MainThread) [homeassistant.components.sensor] Setting up sensor.upnp
2021-07-20 22:30:50 ERROR (MainThread) [custom_components.hacs] thomasloven/lovelace-dummy-entity-row - Repository is archived.
2021-07-20 22:30:50 ERROR (MainThread) [custom_components.hacs] thomasloven/lovelace-gap-card - Repository is archived.
2021-07-20 22:30:50 ERROR (MainThread) [custom_components.hacs] mammuth/ha-fritzbox-tools - Repository is archived.
2021-07-20 22:30:50 ERROR (MainThread) [custom_components.hacs] troykelly/hacs-amberelectric - Repository is archived.
2021-07-20 22:30:50 ERROR (MainThread) [custom_components.hacs] bieniu/ha-airly - Repository is archived.
2021-07-20 22:30:50 ERROR (MainThread) [custom_components.hacs] thomasloven/lovelace-gui-sandbox - Repository is archived.
2021-07-20 22:30:51 INFO (MainThread) [custom_components.hacs] <Integration kraineff/minecraft-version> Registration completed
2021-07-20 22:30:51 INFO (MainThread) [custom_components.hacs] <Integration kraineff/philips-airpurifier> Registration completed
2021-07-20 22:30:56 INFO (MainThread) [custom_components.hacs] Stage changed: HacsStage.RUNNING
2021-07-20 22:33:42 DEBUG (SyncWorker_5) [custom_components.samsungtv] Try config: {'name': 'HomeAssistant', 'host': '10.0.0.100', 'method': 'websocket', 'port': 8002, 'timeout': 31}
2021-07-20 22:33:42 DEBUG (SyncWorker_5) [samsungtvws.remote] WS url wss://10.0.0.100:8002/api/v2/channels/samsung.remote.control?name=SG9tZUFzc2lzdGFudA==&token=None
2021-07-20 22:33:44 DEBUG (SyncWorker_5) [samsungtvws.remote] Connection closed.
2021-07-20 22:33:44 DEBUG (SyncWorker_5) [samsungtvws.remote] Connection closed.
2021-07-20 22:33:44 DEBUG (SyncWorker_5) [custom_components.samsungtv] Failing config: {'name': 'HomeAssistant', 'host': '10.0.0.100', 'method': 'websocket', 'port': 8002, 'timeout': 31}, error: {'event': 'ms.remote.touchDisable'}
2021-07-20 22:33:44 DEBUG (SyncWorker_5) [custom_components.samsungtv] Try config: {'name': 'HomeAssistant', 'host': '10.0.0.100', 'method': 'websocket', 'port': 8001, 'timeout': 31}
2021-07-20 22:33:44 DEBUG (SyncWorker_5) [samsungtvws.remote] WS url ws://10.0.0.100:8001/api/v2/channels/samsung.remote.control?name=SG9tZUFzc2lzdGFudA==
2021-07-20 22:33:44 DEBUG (SyncWorker_5) [samsungtvws.remote] Connection closed.
2021-07-20 22:33:44 DEBUG (SyncWorker_5) [custom_components.samsungtv] Working but unsupported config: {'name': 'HomeAssistant', 'host': '10.0.0.100', 'method': 'websocket', 'port': 8001, 'timeout': 31}, error: Invalid close opcode.

I think I've found that running Plex on the TV changes the behaviour also... when I cancel out of Plex, and just have it at the source select screen, if I then restart HA I get it prompting for access repeatedly

It doesn't look like the token stuff is working, or something similar... the 'Connection closed' is a bit

2021-07-20 22:54:37 DEBUG (SyncWorker_0) [samsungtvws.remote] Connection closed.
2021-07-20 22:54:37 DEBUG (SyncWorker_0) [custom_components.samsungtv] Create SamsungTVWSBridge for name (10.0.0.100)
2021-07-20 22:54:37 DEBUG (SyncWorker_0) [samsungtvws.remote] WS url wss://10.0.0.100:8002/api/v2/channels/samsung.remote.control?name=SG9tZUFzc2lzdGFudA==&token=None
2021-07-20 22:54:39 INFO (MainThread) [custom_components.hacs] Stage changed: HacsStage.RUNNING
2021-07-20 22:54:39 DEBUG (SyncWorker_0) [samsungtvws.remote] Got token 99246483
2021-07-20 22:54:39 INFO (SyncWorker_0) [samsungtvws.remote] New token 99246483
2021-07-20 22:54:47 DEBUG (SyncWorker_0) [samsungtvws.remote] Connection closed.
2021-07-20 22:54:47 DEBUG (SyncWorker_0) [custom_components.samsungtv] Create SamsungTVWSBridge for name (10.0.0.100)
2021-07-20 22:54:47 DEBUG (SyncWorker_0) [samsungtvws.remote] WS url wss://10.0.0.100:8002/api/v2/channels/samsung.remote.control?name=SG9tZUFzc2lzdGFudA==&token=None
2021-07-20 22:54:49 DEBUG (SyncWorker_0) [samsungtvws.remote] Got token 11152456
2021-07-20 22:54:49 INFO (SyncWorker_0) [samsungtvws.remote] New token 11152456
2021-07-20 22:54:57 DEBUG (SyncWorker_4) [samsungtvws.remote] Connection closed.
2021-07-20 22:54:57 DEBUG (SyncWorker_4) [custom_components.samsungtv] Create SamsungTVWSBridge for name (10.0.0.100)
2021-07-20 22:54:57 DEBUG (SyncWorker_4) [samsungtvws.remote] WS url wss://10.0.0.100:8002/api/v2/channels/samsung.remote.control?name=SG9tZUFzc2lzdGFudA==&token=None
2021-07-20 22:54:59 DEBUG (SyncWorker_4) [samsungtvws.remote] Got token 14173967
2021-07-20 22:54:59 INFO (SyncWorker_4) [samsungtvws.remote] New token 14173967
2021-07-20 22:55:07 DEBUG (SyncWorker_3) [samsungtvws.remote] Connection closed.
2021-07-20 22:55:07 DEBUG (SyncWorker_3) [custom_components.samsungtv] Create SamsungTVWSBridge for name (10.0.0.100)
2021-07-20 22:55:07 DEBUG (SyncWorker_3) [samsungtvws.remote] WS url wss://10.0.0.100:8002/api/v2/channels/samsung.remote.control?name=SG9tZUFzc2lzdGFudA==&token=None
2021-07-20 22:55:09 DEBUG (SyncWorker_3) [samsungtvws.remote] Got token 61137426
2021-07-20 22:55:09 INFO (SyncWorker_3) [samsungtvws.remote] New token 61137426
2021-07-20 22:55:17 DEBUG (SyncWorker_2) [samsungtvws.remote] Connection closed.
2021-07-20 22:55:17 DEBUG (SyncWorker_2) [custom_components.samsungtv] Create SamsungTVWSBridge for name (10.0.0.100)
2021-07-20 22:55:17 DEBUG (SyncWorker_2) [samsungtvws.remote] WS url wss://10.0.0.100:8002/api/v2/channels/samsung.remote.control?name=SG9tZUFzc2lzdGFudA==&token=None
2021-07-20 22:55:19 DEBUG (SyncWorker_2) [samsungtvws.remote] Got token 93543483
2021-07-20 22:55:19 INFO (SyncWorker_2) [samsungtvws.remote] New token 93543483
2021-07-20 22:55:27 DEBUG (SyncWorker_1) [samsungtvws.remote] Connection closed.
2021-07-20 22:55:27 DEBUG (SyncWorker_1) [custom_components.samsungtv] Create SamsungTVWSBridge for name (10.0.0.100)
2021-07-20 22:55:27 DEBUG (SyncWorker_1) [samsungtvws.remote] WS url wss://10.0.0.100:8002/api/v2/channels/samsung.remote.control?name=SG9tZUFzc2lzdGFudA==&token=None
2021-07-20 22:55:29 DEBUG (SyncWorker_1) [samsungtvws.remote] Got token 38723517
2021-07-20 22:55:29 INFO (SyncWorker_1) [samsungtvws.remote] New token 38723517
2021-07-20 22:55:37 DEBUG (SyncWorker_4) [samsungtvws.remote] Connection closed.
2021-07-20 22:55:37 DEBUG (SyncWorker_4) [custom_components.samsungtv] Create SamsungTVWSBridge for name (10.0.0.100)
2021-07-20 22:55:37 DEBUG (SyncWorker_4) [samsungtvws.remote] WS url wss://10.0.0.100:8002/api/v2/channels/samsung.remote.control?name=SG9tZUFzc2lzdGFudA==&token=None
2021-07-20 22:55:39 DEBUG (SyncWorker_4) [samsungtvws.remote] Got token 14410751
2021-07-20 22:55:39 INFO (SyncWorker_4) [samsungtvws.remote] New token 14410751
2021-07-20 22:55:47 DEBUG (SyncWorker_5) [samsungtvws.remote] Connection closed.
2021-07-20 22:55:47 DEBUG (SyncWorker_5) [custom_components.samsungtv] Create SamsungTVWSBridge for name (10.0.0.100)
2021-07-20 22:55:47 DEBUG (SyncWorker_5) [samsungtvws.remote] WS url wss://10.0.0.100:8002/api/v2/channels/samsung.remote.control?name=SG9tZUFzc2lzdGFudA==&token=None
2021-07-20 22:55:49 DEBUG (SyncWorker_5) [samsungtvws.remote] Got token 11229875
2021-07-20 22:55:49 INFO (SyncWorker_5) [samsungtvws.remote] New token 11229875
2021-07-20 22:55:57 DEBUG (SyncWorker_0) [samsungtvws.remote] Connection closed.
2021-07-20 22:55:57 DEBUG (SyncWorker_0) [custom_components.samsungtv] Create SamsungTVWSBridge for name (10.0.0.100)
2021-07-20 22:55:57 DEBUG (SyncWorker_0) [samsungtvws.remote] WS url wss://10.0.0.100:8002/api/v2/channels/samsung.remote.control?name=SG9tZUFzc2lzdGFudA==&token=None
2021-07-20 22:55:59 DEBUG (SyncWorker_0) [samsungtvws.remote] Got token 73869686
2021-07-20 22:55:59 INFO (SyncWorker_0) [samsungtvws.remote] New token 73869686
2021-07-20 22:56:07 DEBUG (SyncWorker_4) [samsungtvws.remote] Connection closed.
2021-07-20 22:56:07 DEBUG (SyncWorker_4) [custom_components.samsungtv] Create SamsungTVWSBridge for name (10.0.0.100)
2021-07-20 22:56:07 DEBUG (SyncWorker_4) [samsungtvws.remote] WS url wss://10.0.0.100:8002/api/v2/channels/samsung.remote.control?name=SG9tZUFzc2lzdGFudA==&token=None
2021-07-20 22:56:09 DEBUG (SyncWorker_4) [samsungtvws.remote] Got token 16661792
2021-07-20 22:56:09 INFO (SyncWorker_4) [samsungtvws.remote] New token 16661792
2021-07-20 22:56:17 DEBUG (SyncWorker_5) [samsungtvws.remote] Connection closed.
2021-07-20 22:56:17 DEBUG (SyncWorker_5) [custom_components.samsungtv] Create SamsungTVWSBridge for name (10.0.0.100)
2021-07-20 22:56:17 DEBUG (SyncWorker_5) [samsungtvws.remote] WS url wss://10.0.0.100:8002/api/v2/channels/samsung.remote.control?name=SG9tZUFzc2lzdGFudA==&token=None
2021-07-20 22:56:19 DEBUG (SyncWorker_5) [samsungtvws.remote] Got token 12980314
2021-07-20 22:56:19 INFO (SyncWorker_5) [samsungtvws.remote] New token 12980314
2021-07-20 22:56:27 DEBUG (SyncWorker_3) [samsungtvws.remote] Connection closed.
bevanweiss commented 3 years ago

A further update... I've updated my configuration.yaml to include the MAC for the TV explicitly and that appears to have fixed it. So I wonder if this does relate back to my TV reporting a wifiMac of 'none' Is there a reason that the integration doesn't just use the ARP provided MAC?

samsungtv:
  - host: 10.0.0.100
    mac: 68:27:37:0a:ee:cc
    name: Living Room TV
    turn_on_action:
      - service: wake_on_lan.send_magic_packet
        data:
          mac: 68:27:37:0a:ee:cc

EDIT: Nope.. for some reason the wifiMac is now showing up as valid, and networkType shows 'wireless'.. both on the 8002 and 8001 interfaces (which I assume are identical services, just HTTP vs HTTPS). Awesomely, it even looks like WOL is working for this.

My sole question for this ticket is:

  1. Is it expected that I should have needed to add the MAC to the configuration.yaml?

if so, then this should probably be clearer from the doco, but I could close this ticket. If not, any more investigation I could do to help resolve this issue for others?

chemelli74 commented 3 years ago

My sole question for this ticket is:

  1. Is it expected that I should have needed to add the MAC to the configuration.yaml?

configuration.yaml should not be used anymore, integration is based on a config flow. Info are automatically imported in the config entry.

We are working to find a reliable solution for all those situations that are not auto providing the MAC address ( basically LAN connection with static IP address); you can close this issue and follow #53117.

Simone