samsung-tv-ws-api
samsung-tv-ws-api copied to clipboard
2022 The Frame art mode websocket commands do not work
Hello,
I'm trying to run this library against a 2022 frame tv (model: QN65LS03BAFXZA). Non-art mode commands seem to work fine (i.e. tv.run_app('3201606009684')
), but art mode commands over the websocket hang and do not return.
Unfortunately, I don't have a non-2022 tv to test with, so I am not sure if this is an issue with my home setup, or a change in the 2022 models.
I am following this to see where the crossover is with a Homebridge project issue: https://github.com/tavicu/homebridge-samsung-tizen/issues/519
I upgraded from a 2020 Frame to a 2022 model, and the art mode command worked for the first week and then stopped working a few days ago. I am not sure if there was a firmware update to the television during this time.
Same issue occurs on 2022 model QA65LS03BAWXXY. Other ws requests work fine, but art mode requests time out. I own the TV and can test as needed.
FWIW the developers over at https://github.com/tavicu/homebridge-samsung-tizen/wiki/Frame-TVs have reported that Samsung removed the Art Mode API in Tizen 6.5 and newer.
I have the same issue with a pre 2022 Model.
Op ma 25 apr. 2022 om 20:11 schreef stephen @.***>
Hello,
I'm trying to run this library against a 2022 frame tv (model: QN65LS03BAFXZA). Non-art mode commands seem to work fine (i.e. tv.run_app('3201606009684')), but art mode commands over the websocket hang and do not return.
Unfortunately, I don't have a non-2022 tv to test with, so I am not sure if this is an issue with my home setup, or a change in the 2022 models.
— Reply to this email directly, view it on GitHub https://github.com/xchwarze/samsung-tv-ws-api/issues/108, or unsubscribe https://github.com/notifications/unsubscribe-auth/AA2HB2RFFV5J4XP7JRKLXJTVG3N6ZANCNFSM5UJLTJKA . You are receiving this because you are subscribed to this thread.Message ID: @.***>
Same issue, is there any workaround ?
As of firmware 1622, the art WebSocket api is back!
With some changes, but mostly works as it used to.
@NickWaterton do you happen to have any more information on what changes are needed? I just tried this out on a current generation frame tv at firmware 1622, and got the same error from ping.py
(samsungtvws.exceptions.ConnectionFailure: {'event': 'ms.channel.timeOut'}
)
The API endpoint has good information (lightly redacted below)
{'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': '', 'firmwareVersion': 'Unknown', 'id': '', 'ip': '', 'model': '22_PONTUSM_FTV', 'modelName': 'QN43LS03BDFXZA', 'name': 'Frame TV', 'networkType': 'none', 'resolution': '3840x2160', 'smartHubAgreement': 'true', 'ssid': '', 'type': 'Samsung SmartTV', 'udn': '', 'wifiMac': 'none'}, 'id': '', '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': 'Frame TV', 'remote': '1.0', 'type': 'Samsung SmartTV', 'uri': 'http://10.x.y.z:8001/api/v2/', 'version': '2.0.25'}
@paultag You have to use port 8002. ie
tv = SamsungTVWS('192.168.xxx.xxx', port=8002)
Then accept the connection on your TV (make sure TV is on), or use the saved token method (if you don't want to accept the connection every time).
# Autosave token to file
token_file = os.path.dirname(os.path.realpath(__file__)) + '/tv-token.txt'
tv = SamsungTVWS(host='192.168.xxx.xxx', port=8002, token_file=token_file)
This seems to be working. Not all commands work, get_thumbnail
, send_image
, get_brightness
and get_color_temperature
are not working. Don't know if these are simply not implemented, or not supported - or it the implementation has just changed.
get_api_version
has been renamed api_version
, and 'auto_rotation' has been renamed 'slideshow', so get_slideshow_status
, and set_slideshow_status
are the new commands - I don't think this library implements these command anyway, but they do work.
get_brightness
and send_image
are the command I would really like to get working.
Let me know what you find out.
Update:
here is a list of commands that used to work on 2021 frame TV's. Don't know which ones work on the new api:
get_api_version (or api_version) for new api
get_artmode_status and set
get_auto_rotation_status and set (or get_slideshow_status and set) for new api
get_device_info
get_content_list
get_current_artwork
get_thumbnail - downloads thumbnail in same format as uploaded
send_image - uploads image jpg/png etc
delete_image_list
select_image - selects image to display (display optional)
get_photo_filter_list
set_photo_filter
get_matte_list
set_matte with content_id and matte_id
change_matte with content_id and matte_id
get_motion_timer (and set) valid values: "off","5","15","30","60","120","240", send settiing in "value"
get_motion_sensitivity (and set) min 1 max 3 set in "value"
get_color_temperature (and set) min -5 max +5 set in "value"
get_brightness (and set) min 1 max 10 set in "value"
get_brightness_sensor_setting (and set) on or off
change_favourite with content_id value (or status) on or off (untested)
Ok, figured out get_thumbnail
, it's now get_thumbnail_list
and accepts a list of content_ids as an argument content_id_list
(like delete_list
). Works for a list of 1, I haven't tried more.
You also have to use a secure socket connection if the conn_info
returns secured : True
.
Working on send_image
now, it seems to work in a similar way.
Tested Nick's changes and it works great! Was able to get my art mode changes unblocked. Thanks Nick!
@NickWaterton any luck with send_image
?
Yes, got everything working.
@Emily Check out my fork at https://github.com/NickWaterton/samsung-tv-ws-api
I also added an async_art.py module, and several async_art examples.
The problem is that if it is fixed for one version it breaks for the other... it would be necessary to find a way to determine which version of the service is running. Just as the "tv control" service has its api that shows the version information and capabilities of the TV, this other service should have a similar one. Otherwise it can also be used as a version flag if one of the new apis fails.
Anyway I reiterate that the resulting code has to support both versions but those who have tizen 5 and 6 will be broken....
Are we talking about the art api? Because get_api_version
tells you what version of the api is available on the TV, and I’ve made all the common commands work for both versions.
There are version specific commands, eg get_auto_rotation_status
is the old api command, and get_slideshow_status
is the new api command, but you can use get_api_version
to decide which to use, or just use the one for your model year (old is 2021 and earlier, new is 2022 and later).
I forgot to reply here, I was also able to get my Frame working, but it was initially failing because the request was from a different /24 than the TV was on. After moving to the same subnet, the TV stopped resetting the connection and it looked a lot better. Thanks for tracking this down!