Samsung TV integration Question -- Driver info starting post 127

Doesn't work on mine. Was looking at the HomeAssistant code for Samsung TV and he uses the SmartThings API to get the current source:

I wonder if that's something you might be able to add... It involves getting a token from the developer site in but opens a world of options. As an example, you can use a single button to change the HDMI source (instead of left, left, left, ..., right). Seems to work great from the HA thread (haven't tried this version yet but had the default Samsung integration on my HA).

@djgutheinz
Thanks for the latest update!
Port 7677 doesn't work, but port 7678 does respond with a UPNP webpage.
http://YOURIPADDRESS:7678/MainTVServer2/

Could you start this driver its own thread? Would make it easier to find since you could update the top post with changes.

1 Like

try this command: http://YOURIPADDRESS:7678/MainTVServer2/

Found out that on 2019 TVs, the port ID changed.
Dave

My TV gives a UPnP error:

<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/" s:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">

<s:Body>

<s:Fault>

<faultcode>s:Client</faultcode>

<faultstring>UPnPError</faultstring>

<detail>

<UPnPError xmlns="urn:schemas-upnp-org:control-1-0">

<errorCode>402</errorCode>

<errorDescription>Invalid Args</errorDescription>

</UPnPError>

</detail>

</s:Fault>

</s:Body>

</s:Envelope>

Any chance you can look into the SmartThings API?

Yes, I will consider; however it is a major change and will require a Smart App to get and maintain the token.

NEW THREAD for Hubitat-Samsung TV Remote Driver

Starting new thread dedicated to the driver (it now has a life of it's own).

Link: Samsung Hubitat TV Integration

Don't want to crowd the new thread but here's the SmartThings API link:

Thanks

For those still unable to get the tv to turn on while using LAN, here is my work around.
I installed a WOL app and created a TV Power switch. Set the app up with the TVs LAN Mac, then linked it to the switch created. Turning this switch on will power on the TV AFTER its been shut down and gone into full sleep. So if using the Samsung TV app power on button doesn't work because it's gone to sleep, this button will turn it on. Bind them together and turning either on will do the trick.

Now if you could simply add the WOL function within the Samsung TV app, thus eliminating a second app and switch, you'd have a winner.

I never tried linking the app to the Samsung TV apps power switch, but that might work too so f then you wouldn't need the virtual switch.

@lewis.heidrick, Hi.
Thank you for your help, all your instruction works well for me.
But, I have one issue. Tv asks each time when I connect my app confirmation. In tv settings I set Ask only once on first connection, but it steel appear again. Should I somehow describe client to avoid this confirmation? May be I should send client name, ip or MAC?
I tried something like this:
'{"method": "ms.remote.control", "params": {"Cmd": "Click", "Option": "false", "TypeOfRemote": "SendRemoteKey", "DataOfCmd": "KEY_VOLUP"}, "data": {"mac": "00:c3:f4:bf:e6:5b", "ip": "192.168.1.144", "name": "someremote"}}',
It didn't work

Make sure to assign a static address to your devices in the router. It's probably seeing it coming from a different ip.

You just set the ip in the device you don't need to piddle with the code.

The device get ip by DHCP, but it is exactly the same (.144), and tv asks confirmation for each time when I do

document.wbsocket = new WebSocket('wss://192.168.1.51:8002/api/v2/channels/samsung.remote.control?token=10475273');

new connection.

I have a 2019 Frame, and the Ambient option doesn't do anything. All of the other options work great! The log simply says:

dev:379 2021-04-22 09:01:25.380 pm debug 98063C02D966, 1.3.9.3 || ambientMode: frameTv = true

Separate question, I noticed for SmartThings integration it calls for a SmartThings API Key which I'm assuming is the Personal Access Token? And the Device Id is the id field (minus the uuid: from the /api/v2/ endpoint)? What capabilities need these settings?

Thanks! I'm grateful I can replace my Logitech Harmony setup because of this driver!

Hello.
Did you ever get this done? I will soon have to get to the bottom of trying to use hubitat to trigger modes on a Samsung frame tv

Thx

It was reserved but it also appears the address was wrong. Oddly the commands were working somehow.

I have 2 Samsung SmartTV sets plus a LG C1. I checked again and it seems I did have the right address but somehow the errors are gone. Meanwhile, I fixed an app that was polling the wrong sets conditions. I have 21 items with reserved IP addresses.

Per post #168, please use the following thread for continued discussion

1 Like