SAWSUBE icon indicating copy to clipboard operation
SAWSUBE copied to clipboard

samsungtvws library not installed

Open jmbenevise opened this issue 7 months ago • 11 comments

Installed with docker. Built was done correctly. Server started fine.

Discovery showed no result. After adding a TV manually, pairing generated the following message 500: {"detail"."samsungtvws library not installed"} Docker log includes INFO: 192.168.1.48:50669 - "GET /api/tvs/1/art/settings HTTP/1.1" 200 OK 2026-04-24 06:43:17,840 WARNING backend.services.tv_manager list_mattes failed: samsungtvws library not installed INFO: 192.168.1.48:50669 - "GET /api/tvs/1/art/mattes HTTP/1.1" 200 OK INFO: 192.168.1.48:50669 - "GET /api/images/tv/1 HTTP/1.1" 200 OK INFO: 192.168.1.48:50669 - "POST /api/tvs/1/pair HTTP/1.1" 500 Internal Server Error INFO: 192.168.1.48:54892 - "POST /api/tvs/1/pair HTTP/1.1" 500 Internal Server Error

jmbenevise avatar Apr 24 '26 06:04 jmbenevise

Hey, good catch — tracked this down. The issue is that the Docker build was pulling [samsungtvws] from PyPI (xchwarze's fork), but the library that actually works with Frame TVs is NickWaterton's fork, which has a different internal structure. The PyPI version fails the import silently so the app boots fine but throws 500 on anything TV-related.

Fixed in the requirements — it now pulls directly from NickWaterton's repo. Just rebuild your image with 'docker compose build --no-cache' and you should be good.

As for discovery not finding anything, that's a Docker networking limitation — SSDP multicast doesn't cross the bridge network. The [docker-compose.yml] has [network_mode: host] commented out at the top; uncomment that on Linux and discovery will work. On Windows/Mac Docker Desktop, host networking works differently so manually adding the TV IP is the workaround there.

WB2024 avatar Apr 24 '26 13:04 WB2024

I did a rebuild, then removed everything and built again. I even create the docker with host network.

Discovery is working. But, I get pair failed on the server. Tv prompt to allow, deny or close

This is the docker log. < INFO: Started server process [1] INFO: Waiting for application startup. 2026-04-24 13:53:09,223 INFO apscheduler.scheduler Scheduler started 2026-04-24 13:53:09,231 INFO sawsube SAWSUBE up on 0.0.0.0:8000 INFO: Application startup complete. INFO: Uvicorn running on http://0.0.0.0:8000 (Press CTRL+C to quit) INFO: 192.168.1.61:53441 - "GET / HTTP/1.1" 200 OK INFO: 192.168.1.61:53441 - "GET /assets/index-Bj86ekYh.js HTTP/1.1" 200 OK INFO: 192.168.1.61:53442 - "GET /assets/index-C7zo2DUK.css HTTP/1.1" 200 OK INFO: 192.168.1.61:53441 - "GET /Logo.png HTTP/1.1" 200 OK INFO: 192.168.1.61:53441 - "GET /api/tvs HTTP/1.1" 200 OK INFO: 192.168.1.61:53441 - "GET /api/tvs HTTP/1.1" 200 OK INFO: 192.168.1.61:53441 - "GET /api/stats HTTP/1.1" 200 OK INFO: 192.168.1.61:53441 - "GET /api/history?limit=20 HTTP/1.1" 200 OK 2026-04-24 13:53:38,311 INFO httpx HTTP Request: GET http://192.168.1.220:8001/api/v2/ "HTTP/1.1 200 OK" 2026-04-24 13:53:38,466 INFO httpx HTTP Request: GET http://192.168.1.45:8001/api/v2/ "HTTP/1.1 200 OK" INFO: 192.168.1.61:53443 - "GET /api/tvs/discover HTTP/1.1" 200 OK INFO: 192.168.1.61:53451 - "WebSocket /ws" [accepted] INFO: connection open INFO: 192.168.1.61:53452 - "POST /api/tvs HTTP/1.1" 200 OK INFO: 192.168.1.61:53452 - "GET /api/tvs HTTP/1.1" 200 OK INFO: 192.168.1.61:53462 - "POST /api/tvs/1/pair HTTP/1.1" 200 OK INFO: 192.168.1.61:53452 - "GET /api/tvs/1/status HTTP/1.1" 200 OK INFO: 192.168.1.61:53452 - "GET /api/tvs/1/status HTTP/1.1" 200 OK 2026-04-24 13:54:28,197 WARNING backend.services.tv_manager device_info failed: {'data': {'attributes': {'name': 'VGhlLUZyYW1l', 'token': 'None'}, 'connectTime': 1777038862042, 'deviceName': 'VGhlLUZyYW1l', 'id': 'd60c556-c1ff-43bd-97d-81c8d2c43ed0', 'isHost': False}, 'event': 'ms.channel.clientDisconnect'} INFO: 192.168.1.61:53476 - "GET /api/tvs/1/info HTTP/1.1" 200 OK 2026-04-24 13:54:28,356 WARNING backend.services.tv_manager device_info failed: {'event': 'ms.channel.timeOut'} INFO: 192.168.1.61:53452 - "GET /api/tvs/1/info HTTP/1.1" 200 OK INFO: 192.168.1.61:53476 - "GET /api/tvs/1/art/settings HTTP/1.1" 200 OK 2026-04-24 13:54:28,567 WARNING backend.services.tv_manager get_settings failed: {'event': 'ms.channel.timeOut'} INFO: 192.168.1.61:53452 - "GET /api/tvs/1/art/settings HTTP/1.1" 200 OK 2026-04-24 13:54:28,574 WARNING backend.services.tv_manager list_mattes failed: {'data': {'attributes': {'name': 'VGhlLUZyYW1l', 'token': 'None'}, 'connectTime': 1777038862417, 'deviceName': 'VGhlLUZyYW1l', 'id': 'e6af509b-dd4d-4cec-be3c-3c51a8654ac', 'isHost': False}, 'event': 'ms.channel.clientDisconnect'} INFO: 192.168.1.61:53476 - "GET /api/tvs/1/art/mattes HTTP/1.1" 200 OK INFO: 192.168.1.61:53476 - "GET /api/images/tv/1 HTTP/1.1" 200 OK 2026-04-24 13:54:28,725 WARNING backend.services.tv_manager list_mattes failed: {'event': 'ms.channel.timeOut'} INFO: 192.168.1.61:53452 - "GET /api/tvs/1/art/mattes HTTP/1.1" 200 OK INFO: 192.168.1.61:53452 - "GET /api/images/tv/1 HTTP/1.1" 200 OK INFO: 192.168.1.61:60520 - "POST /api/tvs/1/pair HTTP/1.1" 200 OK INFO: 192.168.1.61:60520 - "GET /api/tvs/1/status HTTP/1.1" 200 OK 2026-04-24 13:55:45,828 INFO httpx HTTP Request: GET http://192.168.1.220:8001/api/v2/ "HTTP/1.1 200 OK" 2026-04-24 13:55:45,916 INFO httpx HTTP Request: GET http://192.168.1.45:8001/api/v2/ "HTTP/1.1 200 OK" INFO: 192.168.1.61:60521 - "GET /api/tvs/discover HTTP/1.1" 200 OK INFO: 192.168.1.61:60520 - "GET /api/tvs/1/info HTTP/1.1" 200 OK 2026-04-24 13:56:02,852 WARNING backend.services.tv_manager device_info failed: {'data': {'attributes': {'name': 'VGhlLUZyYW1l', 'token': 'None'}, 'connectTime': 1777038922858, 'deviceName': 'VGhlLUZyYW1l', 'id': '6df7b9d9-132b-4ce2-a716-f98fd1ff912', 'isHost': False}, 'event': 'ms.channel.clientDisconnect'} 2026-04-24 13:56:02,999 WARNING backend.services.tv_manager get_settings failed: {'event': 'ms.channel.timeOut'} INFO: 192.168.1.61:60520 - "GET /api/tvs/1/art/settings HTTP/1.1" 200 OK 2026-04-24 13:56:03,150 WARNING backend.services.tv_manager list_mattes failed: {'event': 'ms.channel.timeOut'} INFO: 192.168.1.61:60520 - "GET /api/tvs/1/art/mattes HTTP/1.1" 200 OK INFO: 192.168.1.61:60520 - "GET /api/images/tv/1 HTTP/1.1" 200 OK

Good thing is, discovery even found my Sammung R3 speaker

jmbenevise avatar Apr 24 '26 14:04 jmbenevise

the library is loading now so the 500 is fixed. The pair fail is a different issue I can see from your logs.

When you click Pair, the server opens a WebSocket to the TV (which is what triggers the Allow/Deny prompt on screen), but the old code checked for the saved token file immediately after opening the connection — before you've had a chance to press Allow. So it always returned "pair failed" even though the handshake was working correctly.

Fixed it so the server now keeps the connection open and polls every 2 seconds waiting for you to press Allow, up to 60 seconds. When you press Allow, the TV sends the token over the existing connection, the library saves it, and the server detects it and returns success.

Rebuild with docker compose build --no-cache and try pairing again — click Pair, wait for the prompt on the TV, press Allow, and it should come back as Paired within a couple seconds.

WB2024 avatar Apr 24 '26 15:04 WB2024

No error message anymore, but the TV does not pair. The prompt on the TV comes back every 2 seconds for about 30 seconds, then stops for about 30 seconds, and stats again...

Here is to docker log. < 2026-04-25 02:58:28,208 DEBUG samsungtvws.async_connection WS url wss://192.168.1.220:8002/api/v2/channels/com.samsung.art-app?name=VGhlLUZyYW1l&token=None 2026-04-25 02:58:28,211 DEBUG samsungtvws.helper Processing API response: {"data":{"attributes":{"name":"VGhlLUZyYW1l","token":"None"},"connectTime":1777085898242,"deviceName":"VGhlLUZyYW1l","id":"3f4d8977-fcf5-449d-8294-f36253a9c1","isHost":false},"event":"ms.channel.clientDisconnect"} 2026-04-25 02:58:28,211 DEBUG samsungtvws.connection SamsungTVWS websocket event: {'data': {'attributes': {'name': 'VGhlLUZyYW1l', 'token': 'None'}, 'connectTime': 1777085898242, 'deviceName': 'VGhlLUZyYW1l', 'id': '3f4d8977-fcf5-449d-8294-f36253a9c1', 'isHost': False}, 'event': 'ms.channel.clientDisconnect'} 2026-04-25 02:58:28,211 DEBUG samsungtvws.async_connection Connection closed. 2026-04-25 02:58:28,211 WARNING backend.services.tv_manager device_info failed: {'data': {'attributes': {'name': 'VGhlLUZyYW1l', 'token': 'None'}, 'connectTime': 1777085898242, 'deviceName': 'VGhlLUZyYW1l', 'id': '3f4d8977-fcf5-449d-8294-f36253a9c1', 'isHost': False}, 'event': 'ms.channel.clientDisconnect'} INFO: 192.168.1.61:54727 - "GET /api/tvs/1/info HTTP/1.1" 200 OK 2026-04-25 02:58:28,244 DEBUG samsungtvws.async_connection WS url wss://192.168.1.220:8002/api/v2/channels/com.samsung.art-app?name=VGhlLUZyYW1l&token=None 2026-04-25 02:58:30,137 DEBUG samsungtvws.helper Processing API response: {"data":{"attributes":{"name":"VGhlLUZyYW1l","token":"None"},"connectTime":1777085898245,"deviceName":"VGhlLUZyYW1l","id":"3c209356-6df5-4f28-9412-b59415f6c56","isHost":false},"event":"ms.channel.clientDisconnect"} 2026-04-25 02:58:30,138 DEBUG samsungtvws.connection SamsungTVWS websocket event: {'data': {'attributes': {'name': 'VGhlLUZyYW1l', 'token': 'None'}, 'connectTime': 1777085898245, 'deviceName': 'VGhlLUZyYW1l', 'id': '3c209356-6df5-4f28-9412-b59415f6c56', 'isHost': False}, 'event': 'ms.channel.clientDisconnect'} 2026-04-25 02:58:30,138 DEBUG samsungtvws.async_connection Connection closed. 2026-04-25 02:58:30,138 DEBUG samsungtvws.helper Processing API response: {"data":{"attributes":{"name":"VGhlLUZyYW1l","token":"None"},"connectTime":1777085898245,"deviceName":"VGhlLUZyYW1l","id":"3c209356-6df5-4f28-9412-b59415f6c56","isHost":false},"event":"ms.channel.clientDisconnect"} 2026-04-25 02:58:30,139 DEBUG samsungtvws.connection SamsungTVWS websocket event: {'data': {'attributes': {'name': 'VGhlLUZyYW1l', 'token': 'None'}, 'connectTime': 1777085898245, 'deviceName': 'VGhlLUZyYW1l', 'id': '3c209356-6df5-4f28-9412-b59415f6c56', 'isHost': False}, 'event': 'ms.channel.clientDisconnect'} 2026-04-25 02:58:30,139 DEBUG samsungtvws.async_connection Connection closed. 2026-04-25 02:58:30,140 DEBUG samsungtvws.async_connection WS url wss://192.168.1.220:8002/api/v2/channels/com.samsung.art-app?name=VGhlLUZyYW1l&token=None 2026-04-25 02:58:30,141 DEBUG backend.services.tv_manager pair: reconnect attempt failed: {'data': {'attributes': {'name': 'VGhlLUZyYW1l', 'token': 'None'}, 'connectTime': 1777085898245, 'deviceName': 'VGhlLUZyYW1l', 'id': '3c209356-6df5-4f28-9412-b59415f6c56', 'isHost': False}, 'event': 'ms.channel.clientDisconnect'} 2026-04-25 02:58:31,584 DEBUG samsungtvws.helper Processing API response: {"data":{"attributes":{"name":"VGhlLUZyYW1l","token":"None"},"connectTime":1777085901141,"deviceName":"VGhlLUZyYW1l","id":"737ed46-8856-45b1-8629-9c54b0c3b","isHost":false},"event":"ms.channel.clientDisconnect"} 2026-04-25 02:58:31,584 DEBUG samsungtvws.connection SamsungTVWS websocket event: {'data': {'attributes': {'name': 'VGhlLUZyYW1l', 'token': 'None'}, 'connectTime': 1777085901141, 'deviceName': 'VGhlLUZyYW1l', 'id': '737ed46-8856-45b1-8629-9c54b0c3b', 'isHost': False}, 'event': 'ms.channel.clientDisconnect'} 2026-04-25 02:58:31,584 DEBUG samsungtvws.async_connection Connection closed. 2026-04-25 02:58:31,584 DEBUG samsungtvws.async_connection WS url wss://192.168.1.220:8002/api/v2/channels/com.samsung.art-app?name=VGhlLUZyYW1l&token=None 2026-04-25 02:58:32,141 DEBUG samsungtvws.connection version: 3.0.5 2026-04-25 02:58:32,142 DEBUG samsungtvws.connection version: 3.0.5 2026-04-25 02:58:32,142 DEBUG samsungtvws.connection version: 3.0.5 2026-04-25 02:58:32,210 DEBUG samsungtvws.helper Processing API response: {"device":{"EdgeBlendingSupport":"false","EdgeBlendingSupportGroup":"0","FrameTVSupport":"true","GamePadSupport":"true","ImeSyncedSupport":"true","Language":"en_GB","OS":"Tizen","PowerState":"on","TokenAuthSupport":"true","VoiceSupport":"true","WallScreenRatio":"-1","WallService":"false","countryCode":"TH","description":"Samsung DTV RCR","developerIP":"0.0.0.0","developerMode":"0","duid":"uuid:4e3b7011-e856-4ec4-9d06-f298f6983496","firmwareVersion":"Unknown","id":"uuid:4e3b7011-e856-4ec4-9d06-f298f6983496","ip":"192.168.1.220","model":"23_KANTSU2E_FTV_OS80","modelName":"QA32LS03CBKXXT","name":"The-Frame","networkType":"wireless","resolution":"1920x1080","smartHubAgreement":"true","ssid":"68:d7:9a:3a:7f:a5","type":"Samsung SmartTV","udn":"uuid:4e3b7011-e856-4ec4-9d06-f298f6983496","wifiMac":"F4:DD:06:2B:56:D7"},"id":"uuid:4e3b7011-e856-4ec4-9d06-f298f6983496","isSupport":"{"DMP_DRM_PLAYREADY":"false","DMP_DRM_WIDEVINE":"false","DMP_available":"true","EDEN_available":"true","FrameTVSupport":"true","ImeSyncedSupport":"true","TokenAuthSupport":"true","remote_available":"true","remote_fourDirections":"true","remote_touchPad":"true","remote_voiceControl":"true"}\n","name":"The-Frame","remote":"1.0","type":"Samsung SmartTV","uri":"https://192.168.1.220:8002/api/v2/","version":"2.0.25"} 2026-04-25 02:58:32,213 DEBUG samsungtvws.async_connection WS url wss://192.168.1.220:8002/api/v2/channels/com.samsung.art-app?name=VGhlLUZyYW1l&token=None INFO: 192.168.1.61:54727 - "GET /api/tvs/1/art/settings HTTP/1.1" 200 OK 2026-04-25 02:58:33,381 DEBUG samsungtvws.helper Processing API response: {"data":{"attributes":{"name":"VGhlLUZyYW1l","token":"None"},"connectTime":1777085901147,"deviceName":"VGhlLUZyYW1l","id":"f3c946a8-b3dc-4220-8122-68fefe2d8c53","isHost":false},"event":"ms.channel.clientDisconnect"} 2026-04-25 02:58:33,382 DEBUG samsungtvws.connection SamsungTVWS websocket event: {'data': {'attributes': {'name': 'VGhlLUZyYW1l', 'token': 'None'}, 'connectTime': 1777085901147, 'deviceName': 'VGhlLUZyYW1l', 'id': 'f3c946a8-b3dc-4220-8122-68fefe2d8c53', 'isHost': False}, 'event': 'ms.channel.clientDisconnect'} 2026-04-25 02:58:33,382 DEBUG samsungtvws.async_connection Connection closed. 2026-04-25 02:58:33,383 DEBUG samsungtvws.helper Processing API response: {"data":{"attributes":{"name":"VGhlLUZyYW1l","token":"None"},"connectTime":1777085901147,"deviceName":"VGhlLUZyYW1l","id":"f3c946a8-b3dc-4220-8122-68fefe2d8c53","isHost":false},"event":"ms.channel.clientDisconnect"} 2026-04-25 02:58:33,383 DEBUG samsungtvws.connection SamsungTVWS websocket event: {'data': {'attributes': {'name': 'VGhlLUZyYW1l', 'token': 'None'}, 'connectTime': 1777085901147, 'deviceName': 'VGhlLUZyYW1l', 'id': 'f3c946a8-b3dc-4220-8122-68fefe2d8c53', 'isHost': False}, 'event': 'ms.channel.clientDisconnect'} 2026-04-25 02:58:33,383 DEBUG samsungtvws.async_connection Connection closed. 2026-04-25 02:58:33,385 DEBUG backend.services.tv_manager pair: reconnect attempt failed: {'data': {'attributes': {'name': 'VGhlLUZyYW1l', 'token': 'None'}, 'connectTime': 1777085901147, 'deviceName': 'VGhlLUZyYW1l', 'id': 'f3c946a8-b3dc-4220-8122-68fefe2d8c53', 'isHost': False}, 'event': 'ms.channel.clientDisconnect'} 2026-04-25 02:58:33,419 DEBUG samsungtvws.connection version: 3.0.5 2026-04-25 02:58:33,420 DEBUG samsungtvws.connection version: 3.0.5 2026-04-25 02:58:33,420 DEBUG samsungtvws.connection version: 3.0.5 2026-04-25 02:58:33,515 DEBUG samsungtvws.helper Processing API response: {"device":{"EdgeBlendingSupport":"false","EdgeBlendingSupportGroup":"0","FrameTVSupport":"true","GamePadSupport":"true","ImeSyncedSupport":"true","Language":"en_GB","OS":"Tizen","PowerState":"on","TokenAuthSupport":"true","VoiceSupport":"true","WallScreenRatio":"-1","WallService":"false","countryCode":"TH","description":"Samsung DTV RCR","developerIP":"0.0.0.0","developerMode":"0","duid":"uuid:4e3b7011-e856-4ec4-9d06-f298f6983496","firmwareVersion":"Unknown","id":"uuid:4e3b7011-e856-4ec4-9d06-f298f6983496","ip":"192.168.1.220","model":"23_KANTSU2E_FTV_OS80","modelName":"QA32LS03CBKXXT","name":"The-Frame","networkType":"wireless","resolution":"1920x1080","smartHubAgreement":"true","ssid":"68:d7:9a:3a:7f:a5","type":"Samsung SmartTV","udn":"uuid:4e3b7011-e856-4ec4-9d06-f298f6983496","wifiMac":"F4:DD:06:2B:56:D7"},"id":"uuid:4e3b7011-e856-4ec4-9d06-f298f6983496","isSupport":"{"DMP_DRM_PLAYREADY":"false","DMP_DRM_WIDEVINE":"false","DMP_available":"true","EDEN_available":"true","FrameTVSupport":"true","ImeSyncedSupport":"true","TokenAuthSupport":"true","remote_available":"true","remote_fourDirections":"true","remote_touchPad":"true","remote_voiceControl":"true"}\n","name":"The-Frame","remote":"1.0","type":"Samsung SmartTV","uri":"https://192.168.1.220:8002/api/v2/","version":"2.0.25"} 2026-04-25 02:58:33,518 DEBUG samsungtvws.async_connection WS url wss://192.168.1.220:8002/api/v2/channels/com.samsung.art-app?name=VGhlLUZyYW1l&token=None 2026-04-25 02:58:35,017 DEBUG samsungtvws.helper Processing API response: {"data":{"attributes":{"name":"VGhlLUZyYW1l","token":"None"},"connectTime":1777085902966,"deviceName":"VGhlLUZyYW1l","id":"d00934c-55b4-41f6-801d-98115af9bcf9","isHost":false},"event":"ms.channel.clientDisconnect"} 2026-04-25 02:58:35,017 DEBUG samsungtvws.connection SamsungTVWS websocket event: {'data': {'attributes': {'name': 'VGhlLUZyYW1l', 'token': 'None'}, 'connectTime': 1777085902966, 'deviceName': 'VGhlLUZyYW1l', 'id': 'd00934c-55b4-41f6-801d-98115af9bcf9', 'isHost': False}, 'event': 'ms.channel.clientDisconnect'} 2026-04-25 02:58:35,017 DEBUG samsungtvws.async_connection Connection closed. 2026-04-25 02:58:35,017 WARNING backend.services.tv_manager list_mattes failed TV 1: {'data': {'attributes': {'name': 'VGhlLUZyYW1l', 'token': 'None'}, 'connectTime': 1777085902966, 'deviceName': 'VGhlLUZyYW1l', 'id': 'd00934c-55b4-41f6-801d-98115af9bcf9', 'isHost': False}, 'event': 'ms.channel.clientDisconnect'} Traceback (most recent call last): File "/app/backend/services/tv_manager.py", line 415, in list_mattes art = await conn._ensure_art() ^^^^^^^^^^^^^^^^^^^^^^^^ File "/app/backend/services/tv_manager.py", line 64, in _ensure_art await self.art.start_listening() File "/usr/local/lib/python3.11/site-packages/samsungtvws/async_art.py", line 110, in start_listening await self.open() File "/usr/local/lib/python3.11/site-packages/samsungtvws/async_art.py", line 87, in open await super().open() File "/usr/local/lib/python3.11/site-packages/samsungtvws/async_connection.py", line 78, in open raise exceptions.ConnectionFailure(response) samsungtvws.exceptions.ConnectionFailure: {'data': {'attributes': {'name': 'VGhlLUZyYW1l', 'token': 'None'}, 'connectTime': 1777085902966, 'deviceName': 'VGhlLUZyYW1l', 'id': 'd00934c-55b4-41f6-801d-98115af9bcf9', 'isHost': False}, 'event': 'ms.channel.clientDisconnect'} INFO: 192.168.1.61:54727 - "GET /api/tvs/1/art/mattes HTTP/1.1" 200 OK INFO: 192.168.1.61:54727 - "GET /api/images/tv/1 HTTP/1.1" 200 OK 2026-04-25 02:58:35,386 DEBUG samsungtvws.connection version: 3.0.5 2026-04-25 02:58:35,387 DEBUG samsungtvws.connection version: 3.0.5 2026-04-25 02:58:35,387 DEBUG samsungtvws.connection version: 3.0.5 2026-04-25 02:58:35,449 DEBUG samsungtvws.helper Processing API response: {"device":{"EdgeBlendingSupport":"false","EdgeBlendingSupportGroup":"0","FrameTVSupport":"true","GamePadSupport":"true","ImeSyncedSupport":"true","Language":"en_GB","OS":"Tizen","PowerState":"on","TokenAuthSupport":"true","VoiceSupport":"true","WallScreenRatio":"-1","WallService":"false","countryCode":"TH","description":"Samsung DTV RCR","developerIP":"0.0.0.0","developerMode":"0","duid":"uuid:4e3b7011-e856-4ec4-9d06-f298f6983496","firmwareVersion":"Unknown","id":"uuid:4e3b7011-e856-4ec4-9d06-f298f6983496","ip":"192.168.1.220","model":"23_KANTSU2E_FTV_OS80","modelName":"QA32LS03CBKXXT","name":"The-Frame","networkType":"wireless","resolution":"1920x1080","smartHubAgreement":"true","ssid":"68:d7:9a:3a:7f:a5","type":"Samsung SmartTV","udn":"uuid:4e3b7011-e856-4ec4-9d06-f298f6983496","wifiMac":"F4:DD:06:2B:56:D7"},"id":"uuid:4e3b7011-e856-4ec4-9d06-f298f6983496","isSupport":"{"DMP_DRM_PLAYREADY":"false","DMP_DRM_WIDEVINE":"false","DMP_available":"true","EDEN_available":"true","FrameTVSupport":"true","ImeSyncedSupport":"true","TokenAuthSupport":"true","remote_available":"true","remote_fourDirections":"true","remote_touchPad":"true","remote_voiceControl":"true"}\n","name":"The-Frame","remote":"1.0","type":"Samsung SmartTV","uri":"https://192.168.1.220:8002/api/v2/","version":"2.0.25"} 2026-04-25 02:58:35,452 DEBUG samsungtvws.async_connection WS url wss://192.168.1.220:8002/api/v2/channels/com.samsung.art-app?name=VGhlLUZyYW1l&token=None 2026-04-25 02:58:36,770 DEBUG samsungtvws.helper Processing API response: {"data":{"attributes":{"name":"VGhlLUZyYW1l","token":"None"},"connectTime":1777085904500,"deviceName":"VGhlLUZyYW1l","id":"5bf97af1-3ebd-463d-9f12-db224cba3cb6","isHost":false},"event":"ms.channel.clientDisconnect"} 2026-04-25 02:58:36,771 DEBUG samsungtvws.connection SamsungTVWS websocket event: {'data': {'attributes': {'name': 'VGhlLUZyYW1l', 'token': 'None'}, 'connectTime': 1777085904500, 'deviceName': 'VGhlLUZyYW1l', 'id': '5bf97af1-3ebd-463d-9f12-db224cba3cb6', 'isHost': False}, 'event': 'ms.channel.clientDisconnect'} 2026-04-25 02:58:36,771 DEBUG samsungtvws.async_connection Connection closed. 2026-04-25 02:58:36,771 DEBUG backend.services.tv_manager pair: reconnect attempt failed: {'data': {'attributes': {'name': 'VGhlLUZyYW1l', 'token': 'None'}, 'connectTime': 1777085904500, 'deviceName': 'VGhlLUZyYW1l', 'id': '5bf97af1-3ebd-463d-9f12-db224cba3cb6', 'isHost': False}, 'event': 'ms.channel.clientDisconnect'} 2026-04-25 02:58:38,503 DEBUG samsungtvws.connection version: 3.0.5 2026-04-25 02:58:38,503 DEBUG samsungtvws.connection version: 3.0.5 2026-04-25 02:58:38,504 DEBUG samsungtvws.connection version: 3.0.5 2026-04-25 02:58:38,575 DEBUG samsungtvws.helper Processing API response: {"device":{"EdgeBlendingSupport":"false","EdgeBlendingSupportGroup":"0","FrameTVSupport":"true","GamePadSupport":"true","ImeSyncedSupport":"true","Language":"en_GB","OS":"Tizen","PowerState":"on","TokenAuthSupport":"true","VoiceSupport":"true","WallScreenRatio":"-1","WallService":"false","countryCode":"TH","description":"Samsung DTV RCR","developerIP":"0.0.0.0","developerMode":"0","duid":"uuid:4e3b7011-e856-4ec4-9d06-f298f6983496","firmwareVersion":"Unknown","id":"uuid:4e3b7011-e856-4ec4-9d06-f298f6983496","ip":"192.168.1.220","model":"23_KANTSU2E_FTV_OS80","modelName":"QA32LS03CBKXXT","name":"The-Frame","networkType":"wireless","resolution":"1920x1080","smartHubAgreement":"true","ssid":"68:d7:9a:3a:7f:a5","type":"Samsung SmartTV","udn":"uuid:4e3b7011-e856-4ec4-9d06-f298f6983496","wifiMac":"F4:DD:06:2B:56:D7"},"id":"uuid:4e3b7011-e856-4ec4-9d06-f298f6983496","isSupport":"{"DMP_DRM_PLAYREADY":"false","DMP_DRM_WIDEVINE":"false","DMP_available":"true","EDEN_available":"true","FrameTVSupport":"true","ImeSyncedSupport":"true","TokenAuthSupport":"true","remote_available":"true","remote_fourDirections":"true","remote_touchPad":"true","remote_voiceControl":"true"}\n","name":"The-Frame","remote":"1.0","type":"Samsung SmartTV","uri":"https://192.168.1.220:8002/api/v2/","version":"2.0.25"} 2026-04-25 02:58:38,577 DEBUG samsungtvws.async_connection WS url wss://192.168.1.220:8002/api/v2/channels/com.samsung.art-app?name=VGhlLUZyYW1l&token=None 2026-04-25 02:58:40,036 DEBUG samsungtvws.helper Processing API response: {"data":{"attributes":{"name":"VGhlLUZyYW1l","token":"None"},"connectTime":1777085906443,"deviceName":"VGhlLUZyYW1l","id":"285909-d258-4ff4-85e-eda66362bb15","isHost":false},"event":"ms.channel.clientDisconnect"} 2026-04-25 02:58:40,037 DEBUG samsungtvws.connection SamsungTVWS websocket event: {'data': {'attributes': {'name': 'VGhlLUZyYW1l', 'token': 'None'}, 'connectTime': 1777085906443, 'deviceName': 'VGhlLUZyYW1l', 'id': '285909-d258-4ff4-85e-eda66362bb15', 'isHost': False}, 'event': 'ms.channel.clientDisconnect'} 2026-04-25 02:58:40,037 DEBUG samsungtvws.async_connection Connection closed. 2026-04-25 02:58:40,037 WARNING backend.services.tv_manager fetch_status tv 1 failed, resetting connection: {'data': {'attributes': {'name': 'VGhlLUZyYW1l', 'token': 'None'}, 'connectTime': 1777085906443, 'deviceName': 'VGhlLUZyYW1l', 'id': '285909-d258-4ff4-85e-eda66362bb15', 'isHost': False}, 'event': 'ms.channel.clientDisconnect'} Traceback (most recent call last): File "/app/backend/services/tv_manager.py", line 188, in fetch_status art = await conn._ensure_art() ^^^^^^^^^^^^^^^^^^^^^^^^ File "/app/backend/services/tv_manager.py", line 64, in _ensure_art await self.art.start_listening() File "/usr/local/lib/python3.11/site-packages/samsungtvws/async_art.py", line 110, in start_listening await self.open() File "/usr/local/lib/python3.11/site-packages/samsungtvws/async_art.py", line 87, in open await super().open() File "/usr/local/lib/python3.11/site-packages/samsungtvws/async_connection.py", line 78, in open raise exceptions.ConnectionFailure(response) samsungtvws.exceptions.ConnectionFailure: {'data': {'attributes': {'name': 'VGhlLUZyYW1l', 'token': 'None'}, 'connectTime': 1777085906443, 'deviceName': 'VGhlLUZyYW1l', 'id': '285909-d258-4ff4-85e-eda66362bb15', 'isHost': False}, 'event': 'ms.channel.clientDisconnect'}

jmbenevise avatar Apr 25 '26 03:04 jmbenevise

FWIW I also get almost the same error now (on a rasp pi running docker):

framemanager | 2026-04-26 17:28:10,598 DEBUG samsungtvws.helper Processing API response: {"device":{"EdgeBlendingSupport":"false","EdgeBlendingSupportGroup":"0","FrameTVSupport":"true","GamePadSupport":"true","ImeSyncedSupport":"true","Language":"en_US","OS":"Tizen","PowerState":"on","TokenAuthSupport":"true","VoiceSupport":"true","WallScreenRatio":"-1","WallService":"false","countryCode":"US","description":"Samsung DTV RCR","developerIP":"0.0.0.0","developerMode":"0","duid":"uuid:268d8258-89ab-403d-944e-c208b6eec3ee","firmwareVersion":"Unknown","id":"uuid:268d8258-89ab-403d-944e-c208b6eec3ee","ip":"192.168.69.158","model":"24_PONTUSM_FTV","modelName":"QN50LS03DAFXZA","name":"The Frame","networkType":"wireless","resolution":"3840x2160","smartHubAgreement":"true","ssid":"60:32:b1:a6:8f:fa","type":"Samsung SmartTV","udn":"uuid:268d8258-89ab-403d-944e-c208b6eec3ee","wifiMac":"F4:DD:06:3C:93:9E"},"id":"uuid:268d8258-89ab-403d-944e-c208b6eec3ee","isSupport":"{"DMP_DRM_PLAYREADY":"false","DMP_DRM_WIDEVINE":"false","DMP_available":"true","EDEN_available":"true","FrameTVSupport":"true","ImeSyncedSupport":"true","TokenAuthSupport":"true","remote_available":"true","remote_fourDirections":"true","remote_touchPad":"true","remote_voiceControl":"true"}\n","name":"The Frame","remote":"1.0","type":"Samsung SmartTV","uri":"https://192.168.69.158:8002/api/v2/","version":"2.0.25"} framemanager | framemanager | 2026-04-26 17:28:10,600 DEBUG samsungtvws.async_connection WS url wss://192.168.69.158:8002/api/v2/channels/com.samsung.art-app?name=VGhlIEZyYW1l&token=46771224 framemanager | 2026-04-26 17:28:40,720 DEBUG samsungtvws.helper Processing API response: {"event":"ms.channel.timeOut"} framemanager | framemanager | 2026-04-26 17:28:40,720 DEBUG samsungtvws.connection SamsungTVWS websocket event: {'event': 'ms.channel.timeOut'} framemanager | 2026-04-26 17:28:40,720 DEBUG samsungtvws.async_connection Connection closed. framemanager | 2026-04-26 17:28:40,720 DEBUG samsungtvws.async_connection connection not accepted on TV, or token missing/incorrect framemanager | 2026-04-26 17:28:40,720 WARNING backend.services.tv_manager fetch_status tv 1 failed, resetting connection: {'event': 'ms.channel.timeOut'} framemanager | Traceback (most recent call last): framemanager | File "/app/backend/services/tv_manager.py", line 188, in fetch_status framemanager | art = await conn._ensure_art() framemanager | ^^^^^^^^^^^^^^^^^^^^^^^^ framemanager | File "/app/backend/services/tv_manager.py", line 64, in _ensure_art framemanager | await self.art.start_listening() framemanager | File "/usr/local/lib/python3.11/site-packages/samsungtvws/async_art.py", line 110, in start_listening framemanager | await self.open() framemanager | File "/usr/local/lib/python3.11/site-packages/samsungtvws/async_art.py", line 87, in open framemanager | await super().open() framemanager | File "/usr/local/lib/python3.11/site-packages/samsungtvws/async_connection.py", line 78, in open framemanager | raise exceptions.ConnectionFailure(response) framemanager | samsungtvws.exceptions.ConnectionFailure: {'event': 'ms.channel.timeOut'} framemanager | 2026-04-26 17:29:00,724 DEBUG samsungtvws.connection version: 3.0.5

The TV repeatedly asks for Allow/Deny.

fellrider2 avatar Apr 26 '26 17:04 fellrider2

do you have the ability to run this not on docker and see if you have the same issue? let me know and ill update dockerfile if so

WB2024 avatar Apr 28 '26 22:04 WB2024

Same issue here, and I'm running native Linux

Jonb3132 avatar Apr 29 '26 01:04 Jonb3132

what TV are you using?

WB2024 avatar Apr 29 '26 14:04 WB2024

It's a QN55Q60CAFXZA with software T-NKLCAKUC-0090-2220.4.

Jonb3132 avatar Apr 30 '26 02:04 Jonb3132

QA32LS03CBKXXT (The-Frame) Software Version: T-KSU2ECUABC-0080-2028.0

jmbenevise avatar Apr 30 '26 03:04 jmbenevise

Thanks for building this. I now have SAWSUBE running on a Raspberry Pi 4, without Docker, connected to a 2020 Frame QE65LS03TAUXXU. Artwork uploads and display are working after some local changes.

Pairing through the normal remote-control channel, using SamsungTVWSAsyncRemote.pair(), gave us a genuine credential. We also removed the fallback that writes a developer-mode placeholder, as that could report successful pairing without a valid token.

Separately, on our TV’s 20_NIKEM_FRAME model, the Art Mode connection failed when supplied with the remote-control token. Keeping that credential for remote control but omitting it from the TLS art connection worked. We tested with the TV displaying artwork.

This has only been verified on our 2020 model, so I can’t say whether the same art-channel behaviour applies to the 2023/2024 models mentioned here. Hopefully the distinction between remote pairing and the art connection helps narrow it down. I have a working patch available to share.

dhansak79 avatar Nov 04 '26 10:11 dhansak79