Samsung Hubitat TV Integration (2016 and later)

New version 2.0.0 available.

Changes:

  • Optimized onOff Polling to minimize reported Hub resource utilization.
  • Changed artMode to a toggle on/off interface.
  • Added additional button implementations.

Installation Instructions:
"HubitatActive/Samsung TV Remote.pdf at master · DaveGut/HubitatActive · GitHub"

GitHub Location: "HubitatActive/SamsungTvRemote at master · DaveGut/HubitatActive · GitHub"

Raw Driver: "https://raw.githubusercontent.com/DaveGut/HubitatActive/master/SamsungTvRemote/SamsungTVRemote.groovy"

Hubitat Package Manager:

  • Tags: Control, LAN, Utility
  • name: Samsung TV Remote
4 Likes

Updated to 2.0.1 to fix error with method artMode.

1 Like

I think my set is too old. Probably no IP interface like my Yamaha NVR amplifier has. Oh well, at least I can access it through the Harmony for now.

What is the year or model of your TV? Design is for 2016 or later.

Dave

I tried it on the IP my my 2019 4K sets and nothing is working. I just keep getting " Updated failed connect test. Rerun Save Preferences. Ooops! I needed to be in the room with the remote to give it permission to connect, TWICE. Now I can not get the other set to work but got one of them to work.... ... and hour or so later... ...not sure what happened by the router changed the IP address to the other TV at some point. When I logged it is was at a new address. I was finally able to connect using my tablet as an interface and then the remote to tell it yes twice. Power ON still does not work nor do any of the apps, like Amazon Video, but the basic functions like volume and channels works. I did get HDMI inputs to change on one so I assume those work too. Not sure the full number but I think it is the 710D series from 2019. They are now on 700D at Costco. Probably 50" or whatever was the minimum size for that series.

1 Like

I finally got it partially working. Power On does not work, nor apps, I tried various volume (including mute, both mute and unmute work the same) and channels and the HDMI so far. No Apps work and it does not have any ambient frames and all the fancy stuff to try but the Apps should have worked. I understand you are still having problems getting power on to work. It is still a big step forward for those two. The 60" is Plasma from near the end when Panasonic and Samsung were making the best models and Sears still sold TV. I got it direct from Samsung at a black Friday price. It has LAN and built-in apps and I can play videos, etc. on a DLNA server but nit is still Tizen so I can not install apps other then from their list. I kind of wish I got the Panasonic instead. All Samsung TV have a mirror like reflection that is annoying. Not a problem in bedroom but in other rooms it is.

I have 3, 2 are not partially working. I think the other is too old. PM60F5500AFXZA 60-inch Plasma 600Hz refresh rate. When was Smart TV 2.0 out? I would guess 2014? Maybe earlier? Remote uses Bluetooth or IR. Not sure what magic Logitech is using but it can find it on the LAN and connect using neither. I have found a document with the command set somewhere. Not sure where I put it but Logitech seem to know them all somehow. Tons of commands. The Roku can control it including power on / off. Logitech seems to use Bluetooth, not sure but I suspect the NVidia Shield controls it via Bluetooth too.

Smart Hub, "Full" Web Browser, Dolby Digital Plus / Dolby Pulse, DTS Premium Sound 5.1 , etc.

Big issue is that the driver is only designed to work on the 2106 and later TV's. Some functions may work on earlier models. Logitech use the IR interface, my driver uses LAN and WAN functions to control the set.

Dave

The Logitech scans my network to add new devices. I am using IR remote for nothing. I was editing a new activity to switch to the NVidia Shield and it popped up as a suggested device to use since it found it. For the Roku Ultra I had it scan the network to add it. I can do IR too but it does not. It automatically added all the child controller once I added it as a Bluetooth device to the NVidia Shield. It just acts like another controller like the one I already have. I have the original one, the game controller and the triangle one that glows, my favorite. Once I added the Logitech as another remote it all added those three controller to the Harmony Hub. Both can also see my Tablo DVR. I hear someone was working on Roku for Hubitat so I better hunt it down next.

Just installed the driver 2.0.0 and it does what I need! Absolutely great work on this, Dave!

I have a QN75Q8FNBF (bought in 2018), and I noticed that the Youtube, Prime Video and "App Open by Name" buttons don't work for me. Apologies if you have already addressed this, I read through most, but not all of this thread. Just providing my findings.

It is not a problem for me as I was able to use the Python library samsungtvws and get a list of the application codes for my TV. The "App Open by Code" feature works fine. Just to note the App names for the key ones I tried with "App Open by Name" are "Prime Video" and "Plex", but no go.

Again, excellent work, all the best!

1 Like

None of the app buttons are guaranteed to work. The actual call varies by year. See the various text files at for a discussion of how I derived the list. Note that you can create your own.

Apologies if these were answered above but two questions.

Is there a way to open the browser to a specific webpage?

Do we have an App code or name that can open the xfinity app?

how do i stop the TV from asking every time i power it on to allow Hubitat access.

Hi all how can I fix this

  • currentFunction : remote
  • driverError : Updated failed connect test. Rerun Save Preferences.
  • token : 12345678

Your TV was likely not on when running Save Preferences. Assure the TV is on (displaying video) then try again.

Dave

1 Like

I've been using this driver for a while. Recently updated it, and now it's intermittently producing two on events within milliseconds of one another. The IP address is correct and the config shows the correct MAC address. I even saved the prefs again with the TV on. But the two events continue to occur. The reason this is annoying is because I setup a notify when the TV turns on and I get two notifications.

Anyone aware of a way to fix the two on events?

Firstly, thanks very much for this driver. I have just started using it with my 2020 Samsung Q80T and it's working very well.

Does anyone know the key names to use for the following?

The AD/SUBT button on the full remote that goes directly into the Accessibility menu so that you can turn subtitles on or off.

The Record command.

I have googled without success and tried a few random guesses in the sendkey box but have had no luck so far.

Edit. Update. More trial and error has found that REC is the record key name. Still no luck with subtitles so far.

Edit. Update 2. Subtitle is send key SUB_TITLE

I found a useful list here:

Samsung Keycodes

I've been playing with this driver using a 2020 Frame TV for a bit now. Using Hubitat, everything (all the buttons) works as I would expect. However, I'm having trouble with Hubitat recognizing it was powered on/off via other means (e.g. Remote).

Hoping someone can help me understand the polling, which seemingly would do what I want. From the debug logs, I don't see anything happening every 30 seconds (my power polling interval), and even with the refresh of 5 minutes I'm not seeing the switch updated to on/off. Eventually, after 15-20 minutes, it seems to give up and turn the switch off, but I'd like to understand what is happening to hopefully make it more streamlined. Here are some logs...

I turned off the T.V. using the physical remote at ~11:27. Every 5 minutes thereafter, I would get logs like this...

2021-10-11 11:40:13.067 pm debug[null, 2.0.0]:: getStDeviceData failed.  Data not updated. Preference connectST is false
2021-10-11 11:40:12.079 pm debug[null, 2.0.0]:: parseWebsocket: event = d2d_service_message, artMode status = on
2021-10-11 11:40:12.075 pm debug[null, 2.0.0]:: parseWebsocket: [data:{
  "id": "3e1d6fd0-e893-4d15-a4de-4caa05595cde",
  "event": "artmode_status",
  "value": "on",
  "target_client_id": "cba70d7-ced7-4f86-9ad2-eb813bc33d83"
}, from:fb55ea61-b6cd-4c21-9bd2-54511aa13bd, event:d2d_service_message]
2021-10-11 11:40:12.041 pm debug[null, 2.0.0]:: sendMessage: function = frameArt | data = {"method":"ms.channel.emit","params":{"data":"{\"request\":\"get_artmode_status\",\"id\":\"3e1d6fd0-e893-4d15-a4de-4caa05595cde\"}","to":"host","event":"art_app_request"}} | connectType = frameArt
2021-10-11 11:40:12.033 pm debug[null, 2.0.0]:: refresh: getting artMode and SmartThings status data 

Nothing changed with the switch state until 11:42:02.062 (from Device Logs). Around that time, a different set of debug logs were seen.

2021-10-11 11:42:50.249 pm debug[null, 2.0.0]:: webSocketStatus: Failure.  Closing Socket.
2021-10-11 11:41:36.521 pm debug[null, 2.0.0]:: parseWebsocket: event = d2d_service_message
2021-10-11 11:41:36.510 pm debug[null, 2.0.0]:: parseWebsocket: [data:{
  "event": "go_to_standby"
}, from:fb55ea61-b6cd-4c21-9bd2-54511aa13bd, event:d2d_service_message]

Any thoughts on what is failing here?

Powering off the device does not stop the polling, etc, So every 5 minutes (poll interval?) it will attempt a message.

i will look what can be done to cut this noise down. However, the total hub resource usage when off is extremely low.

@djgutheinz - Thanks for taking time to look at this, this device is great.

To clarify, I'm not concerned about the usage, as you note, its low. My issue is that if I turn off the t.v. with the physical remote (i.e. Not Hubitat), it takes nearly 20 minutes for the switch in the Hubitat device to register as "Off". This is despite the refresh interval being 5 minutes, and the power polling interval being 30 seconds.

I wasn't sure if anything in the debug logs (there were some failures) showed why this would be. I was expecting the switch to move to an "Off" state more quickly, based on one of the two polling intervals I noted.