Samsung TV integration Question -- Driver info starting post 127

I will be following this thread with intense interest. I am so happy to see this development in progress so thank you!!

I have 4 Samsung TVs 2018+ and have tried everything under the sun to integrate reliably without success. Due to time constraints involving my day job I cannot test this for about a week. Should I assume that all TVs must be configured for WiFi and not LAN to enable the power on command? WOL never worked reliably in my prior testing but I can confirm that once I configured the TVs to use WiFi I am able to use the new Samsung app to power on the TVs from an off state reliably for the first time (and this is only recently).

I have only tried on WiFi, not on wired connection. I will test tomorrow on wired.

2 Likes

Doesn‘t work for me on 2017 model:(
Log is as follows:
The device toket in the device section is: 12345678. Is that correct? And the popup on the tv is missing

dev:2642020-10-27 19:48:49.787warnnull

dev:2642020-10-27 19:48:49.696traceWS V3 || sendWsCmd: close |

dev:2642020-10-27 19:48:47.696warnnull

dev:2642020-10-27 19:48:47.683traceWS V3 || sendWsCmd: sendMessage | {"method":"ms.remote.control","params":{"Cmd":"Click","DataOfCmd":"KEY_MENU","Option":"false","TypeOfRemote":"SendRemoteKey"}}

dev:2642020-10-27 19:48:37.820warnnull

dev:2642020-10-27 19:48:37.591traceWS V3 || sendWsCmd: connect |

dev:2642020-10-27 19:48:37.586traceWS V3 || Performing test using tokenSupport = true

dev:2642020-10-27 19:48:35.533traceWS V3 || getDeviceData: year = 2017, frameTv = false, tokenSupport = true

dev:2642020-10-27 19:48:35.531debugWS V3 || getDeviceData: year = 2017, frameTv = false, tokenSupport = true

I will have to fix the code. The value for Token support is incorrect causing the error.

1 Like

WoL over LAN cable doesn't work on my 2020 Samsung and ASUS router.

Update to hopefully correct problem on 2017 model.

Dave

Doesn’t work for me on 2017.
Connect timed out:(

dev:2682020-10-28 06:59:43.811traceWS V3.1.1 || webSocketStatus: failure: connect timed out

dev:2682020-10-28 06:59:43.664traceWS V3.1.1 || sendWsCmd: remote | sendMessage | {"method":"ms.remote.control","params":{"Cmd":"Click","DataOfCmd":"KEY_VOLUP","TypeOfRemote":"SendRemoteKey"}}

dev:2682020-10-28 06:59:43.433traceWS V3.1.1 || sendWsCmd: remote | sendMessage | {"method":"ms.remote.control","params":{"Cmd":"Click","DataOfCmd":"KEY_VOLUP","TypeOfRemote":"SendRemoteKey"}}

dev:2682020-10-28 06:59:43.240traceWS V3.1.1 || sendWsCmd: remote | sendMessage | {"method":"ms.remote.control","params":{"Cmd":"Click","DataOfCmd":"KEY_VOLUP","TypeOfRemote":"SendRemoteKey"}}

dev:2682020-10-28 06:59:43.040traceWS V3.1.1 || sendWsCmd: remote | sendMessage | {"method":"ms.remote.control","params":{"Cmd":"Click","DataOfCmd":"KEY_VOLUP","TypeOfRemote":"SendRemoteKey"}}

dev:2682020-10-28 06:59:42.775traceWS V3.1.1 || sendWsCmd: remote | sendMessage | {"method":"ms.remote.control","params":{"Cmd":"Click","DataOfCmd":"KEY_VOLUP","TypeOfRemote":"SendRemoteKey"}}

dev:2682020-10-28 06:59:42.537traceWS V3.1.1 || sendWsCmd: remote | sendMessage | {"method":"ms.remote.control","params":{"Cmd":"Click","DataOfCmd":"KEY_VOLUP","TypeOfRemote":"SendRemoteKey"}}

dev:2682020-10-28 06:59:41.802traceWS V3.1.1 || sendWsCmd: remote | sendMessage | {"method":"ms.remote.control","params":{"Cmd":"Click","DataOfCmd":"KEY_VOLDOWN","TypeOfRemote":"SendRemoteKey"}}

dev:2682020-10-28 06:59:40.926traceWS V3.1.1 || sendWsCmd: remote | sendMessage | {"method":"ms.remote.control","params":{"Cmd":"Click","DataOfCmd":"KEY_VOLDOWN","TypeOfRemote":"SendRemoteKey"}}

dev:2682020-10-28 06:59:35.908traceWS V3.1.1 || sendWsCmd: remote | close |

dev:2682020-10-28 06:59:33.710traceWS V3.1.1 || sendWsCmd: remote | sendMessage | {"method":"ms.remote.control","params":{"Cmd":"Click","DataOfCmd":"KEY_MENU","TypeOfRemote":"SendRemoteKey"}}

dev:2682020-10-28 06:59:23.679traceWS V3.1.1 || sendWsCmd: remote | connect |

dev:2682020-10-28 06:59:23.672traceWS V3.1.1 || Performing test using tokenSupport = null

dev:2682020-10-28 06:59:16.371traceWS V3.1.1 || getDeviceData: Updating Device Data.

dev:2682020-10-28 06:59:14.347traceWS V3.1.1 || updated: get device data and model year

Updated code. Update driver only and save preferences.
Link to driver code (can use import button on driver's edit page).

Changes:

  • Correction for tokenSupport = null
  • Additional logging on setup to catch other errors.
  • Tweaked Art Mode commands to increase time from command to closing the socket to 10 seconds
  • Added more test commands:
    • A You Tube
    • commands to emulate TV, HDMIn keys.
      • A Source0 - should get you to source TV
      • A Source1 - should get you to the item immediately left of TV on the source list.
      • A Source2
      • A Source 3
      • A Source 4

Tested by reinstalling and testing keys on my 2015 and 2020 TV with expected results;

  • 2020 - works as planned
  • 2015
    • Device data updates as expected
    • WebSocket interface as expected (get errors on menu commands (2015 is not supported using this interface)).

Dave

Requirements:

  • Model Years 2016 - 2020
  • Need Node JS server for 2018 and later (can be tested on your pc/laptop)

Data and Instructions Location:

Request: need install log file for 2016 thru 2018 tv's and confirmation if it works. We have already tested on 2019/2020 models.

1 Like

Here’s my log:
dev:2692020-10-28 22:54:44.760warnnull

dev:2692020-10-28 22:54:44.708debugWS V3.1.3 || sendWsCmd: remote | connect |

dev:2692020-10-28 22:54:44.698infoWS V3.1.3 || Performing test using tokenSupport = true

dev:2692020-10-28 22:54:42.621debugWS V3.1.3 || getDeviceData: mac = D8:E0:E1:3D:6D:0C, uuid = 2e860567-ecf1-452e-9a16-ea65282405f8

dev:2692020-10-28 22:54:42.619infoWS V3.1.3 || getDeviceData: frameTv = false, tokenSupport = true

dev:2692020-10-28 22:54:42.599debugWS V3.1.3 || getDeviceData: [FrameTVSupport:false, GamePadSupport:true, ImeSyncedSupport:true, OS:Tizen, TokenAuthSupport:true, VoiceSupport:true, countryCode:DE, description:Samsung DTV RCR, developerIP:0.0.0.0, developerMode:0, duid:uuid:2e860567-ecf1-452e-9a16-ea65282405f8, firmwareVersion:Unknown, id:uuid:2e860567-ecf1-452e-9a16-ea65282405f8, ip:192.168.178.42, model:17_KANTM_UHD, modelName:UE55MU7009, name:[TV] Samsung 7 Series (55), networkType:wireless, resolution:3840x2160, smartHubAgreement:true, ssid:c8:0e:14:8d:6e:f5, type:Samsung SmartTV, udn:uuid:2e860567-ecf1-452e-9a16-ea65282405f8, wifiMac:D8:E0:E1:3D:6D:0C]

dev:2692020-10-28 22:54:42.525infoWS V3.1.3 || getDeviceData: Updating Device Data.

dev:2692020-10-28 22:54:40.508infoWS V3.1.3 || updated: get device data and model year

What I am see is that your device supports tokens. The code is trying to go to port 8002. In your browser:

  • enter "https://IPADDRESS:8002/api/v2/
  • You may have to accept the invalid certificate (this is safe) or accept the action on your TV.
  • Copy the results back to me.

You may have to install the nodeJS server. You can do this to your PC laptop temporarily. See installation instructions provided at site.

Once you get all the bugs worked out, any plans for nodejs on a raspberry pi? I don't really want to keep my pc running all day.

Lewis,

It is designed to work on a raspberry pi, pc, or any viable NodeJS platform. In the past, I even successfully ran on a Amazon Fire Tablet (TP-Link Kasa Integration). Setting up the pi is out of my expertise.
My use of the PC is for developmental purposes. A quick interface to modify the node applet as changes are necessary. The node app is pretty stable. Needs a few lockouts to avoid one error - but that is mostly in my chaotic development environment. Then modify logging for main events and errors only. However, I may change the applet to a webSocket interface.

Currently, I am in both a development and external testing. I have a 2020 standard and @Cal has a 2019 Frame TV. We are adding new - type functions (a few a day - like running youTube and browser yesterday) while testing on other years to expand the envelop. Also refining edits and assuring a relatively stable baseline. BUT - I need help on earlier models (2016, 2017, and 2018) to assure implementation.

I've just installed this driver and it seems to work OK on my 2016 Samsung UE49KU6400. I've only tested the Mute command as my wife is watching the TV at the moment. If there is anything you want me to try or any log details you want, I'm happy to help.

When you get time, try some of the other commands and see if the TV reacts. For example:
menu
exit
exit
home

{"device":{"FrameTVSupport":"false","GamePadSupport":"true","ImeSyncedSupport":"true","OS":"Tizen","TokenAuthSupport":"true","VoiceSupport":"true","countryCode":"DE","description":"Samsung DTV RCR","developerIP":"0.0.0.0","developerMode":"0","duid":"uuid:2e860567-ecf1-452e-9a16-ea65282405f8","firmwareVersion":"Unknown","id":"uuid:2e860567-ecf1-452e-9a16-ea65282405f8","ip":"192.168.178.42","model":"17_KANTM_UHD","modelName":"UE55MU7009","name":"[TV] Samsung 7 Series (55)","networkType":"wireless","resolution":"3840x2160","smartHubAgreement":"true","ssid":"c8:0e:14:8d:6e:f5","type":"Samsung SmartTV","udn":"uuid:2e860567-ecf1-452e-9a16-ea65282405f8","wifiMac":"D8:E0:E1:3D:6D:0C"},"id":"uuid:2e860567-ecf1-452e-9a16-ea65282405f8","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 7 Series (55)","remote":"1.0","type":"Samsung SmartTV","uri":"https://192.168.178.42:8002/api/v2/","version":"2.0.25"}

OK.
Have you installed the node.js app on a pc or raspberry pi and started that app? You need to do that to proceed. Instructions are at the my code site.

Dave

All the following commands worked fine:

home
menu
exit
vol up
vol down
mute
channel up
channel down
channel list
previous channel
enter
guide
hdmi (cycles through available HDMI connections)
numeric keypad
arrow up/down/left/right
source0/1/2/3/4 commands
On/Off
launch browser
Send key command worked with MUTE as the text. I don't know any others to try

The only commands that did nothing were the Art Mode on/off/status but I don't even know that my TV has that as a function. I have no idea what it is if it does!

Great work.

I think art mode is for the frame tv's.

1 Like

Do you have an instruction for Raspberry?
Unfortunately I don’t have a Windows OS at home.

Great. The 2016's work. I will be providing an initial release next week or so and now I know it works on 2016 + commands. With that will be an explanation of the keys as well as a way to integrate with dashboards.

Thanks for the assist.

Dave

1 Like