I was hoping for the same solution, SmartThing w TV to HE via Hub Connect or my new amour Node-Red. Trouble is my TV is ~2015 model and can't add to ST hub.
Status of my effort (If anyone cares) on Samsung TV Remote
04.17.20.
- There are three different integrations depending the TV model. These are NOT compatible:
- Samsung: For newer TVs, that respond to http://TV-IP-ADDRESS:8001/api/v2/
- Samsung (encrypted): For H, HU, J, JU and JS models from 2014 and 2015, that respond to http://TV-IP-ADDRESS:8001/ms/1.0/
- Samsung (legacy): For TVs from 2013 or before, that respond to port 55000.
- I developed test code for the Samsung driver (just in-case) based on info on GitHub
- I was able to connect using webSocket interface.
- The command derived an error "unrecognized method value", meaning that my device doesn't support this (as expected).
- Code for the experiment may work on post 2016 models. I would appreciate feedback if it does. The code is just to light the fire for a single-driver integration.
Dave
import groovy.json.*
metadata {
definition (name: "AA TV via WS", namespace: "davegut", author: "Dave Gutheinz")
{ command "test" }
}
def ip() { return "192.168.50.143:8001" } // Change ip portion to your IP.
def getTestKey() { // Pick key you want to test.
// return "KEY_PLAY"
// return "KEY_PAUSE"
// return "KEY_VOLUP"
// return "KEY_VOLDOWN"
return "KEY_MUTE"
// return "KEY_POWER"
}
def test() {
log.trace "<b>Test Started Test Started Test Started</b>"
runIn(5, close)
interfaces.webSocket.connect("ws://${ip()}/api/v2/channels/samsung.remote.control")
pauseExecution(500)
interfaces.webSocket.sendMessage(getCommand(getTestKey()))
}
def close() {
interfaces.webSocket.close()
}
def getCommand(key) {
def command = [method: "ms.remote.control",
params: [Cmd: "Click", DataOfCmd: key,
Option: "false",TypeOfRemote: "SendRemoteKey"]]
log.trace new JsonBuilder(command).toPrettyString()
return new JsonBuilder(command).toPrettyString()
}
def parse(response) { log.trace "parse: " + response }
def webSocketStatus(response) {
log.trace "status: " + response
}
Link to git please
Tia
Thanks for testing. Your model number indicates you have a 2014 model. I have the 2015. I have found more out:
- The code provided will work on 2016 and later (not tested). If it does, I am willing to continue developing with collaboration of a user who can do some testing so I can make the driver work properly.
- For 2014 and 2015 models, I will work independently to develop a driver. These models use AES encryption (ouch).
- The legacy (very old) sets are going to be orphaned unless I hear a large begging for better results.
Thank you very much for your efforts.....
Don't know if this helps or not, but here is the results from my Samsung UN60JS7000:
Here are the results from my Samsung UN50NU6900:
Don't know what any of this means or if it is even helpful!
Thank you for trying to get this to work!
Here is a test on a 2019 QN43LS03RAFXZA TV
I don't know if this is any help, but I ran across this on GitHub where a lot of the different year TVs seem to be working:
My TV responds to http://192.168.x.x:8001/api/v2/ in a web browser. Here is the log from Hubitat on this same TV. It is a couple year old UN65MU7000.
[dev:2726](http://192.168.0.115/logs#dev2726)2020-04-19 06:24:57.592 pm [trace](http://192.168.0.115/device/edit/2726){ "method": "ms.remote.control", "params": { "Cmd": "Click", "DataOfCmd": "KEY_POWER", "Option": "false", "TypeOfRemote": "SendRemoteKey" } }
[dev:2726](http://192.168.0.115/logs#dev2726)2020-04-19 06:24:57.185 pm [trace](http://192.168.0.115/device/edit/2726)status: failure: Code 1005 is reserved and may not be used.
[dev:2726](http://192.168.0.115/logs#dev2726)2020-04-19 06:24:57.116 pm [trace](http://192.168.0.115/device/edit/2726)status: status: open
[dev:2726](http://192.168.0.115/logs#dev2726)2020-04-19 06:24:56.960 pm [trace](http://192.168.0.115/device/edit/2726) **Test Started Test Started Test Started**
Going to standby for a while and determine direction. There are three Samsung remote api's
- Legacy (pre-2014) uses hex-coded to a port 55000. Because of age of devices, I will not work this.
- Encrypted (2014, 2015 (mine). Will probably be second up. Requires implementing a complex handshake for a pin and AES encoding.
- Current (assumed 2016+): Resides on port 8001. Will work this first, I will be putting some test code together for this and ask for help. First I want to fully understand flow.
Dave
I just tried it on my 2016 UN65KS9000 TV and got the following error on both power and mute:
Tried it on my 2019 model and got this:
Thanks. I have work to do on the initial comms.
Any progress on this?
Ran into a roadblock getting the encryption on the device to work properly. The algorithm was very long and not suitable for Hubitat. Isigh)
Dave
Using Hubitat HTTP Momentary Switch Driver :
I am able to start Netflix.
I got the idea from :
Also I can start the TV using WOL :
It seems that the issue with websocket is related to a token :
My TV is 2018 : UN65NU8000
I installed the Chromecast Integration and it found my NVidia SHIELD but nothing else. Not sure how I can use that ability though.
Hello guys, I ended up making a driver to control the TV via IR using a UFO-R1 with tasmota.
It's working really well, just copy your TV's IR command codes inside the device, as you can see in the photo
Only problem is that I can't make it appear on the Dashboard, or on Alexa, or on Homebridge.
They appear only as a switch.
Hello, can you help me to connect to Samsung Smart. May be you have data sheet about Samsung api