Samsung Hubitat TV Integration (2016 and later)

Samsung TV Remote Control - Model Years 2016 and later.

A lot of issues by NOT reading the installation instructions. READ THE INSTALLATION instructions before you install.

Current Version: 4.1-2. See below GitHub link for installation and other information. Included fixes:

  • Fix issue of commands sometimes not executing when WS is closed by increasing delay between wsOpen and sendCommand.
  • Added wsOpen and wsClose to user interface per request.
  • Clarified conflict error on SmartThings Command with additional message. If a Conflict is detected, the device is off-line in SmartThings. It can take several minutes for ST to detect. This is a ST issue.

GitHub Location: "https://github.com/DaveGut/HubitatActive/tree/master/SamsungTvRemote"

Installation and update: see instructions at GitHub Location (above).

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

Hubitat Package Manager:

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

Great job on pulling this together. It's been tried several times but never got over the encryption problem. One future request if you have time to get around to it. Would be nice to see this added to HPM.

1 Like

Yes, that is on the roadmap. I want to get the integration app done first. Typically, I also allow a manual installation. The app will quickly install multiple TV's and provide the SmartThings link token (if I develop this).

Dave

2 Likes

I got it installed on all my TV's now and works great btw.

2 Likes

With the app will it have the ability to get the status from the devices such as what input is selected or app that is active? Maybe current volume setting?

Still investigating the smartThings connect and it's base capabilities.

Volume: I have a method to get the current volume in other code. Need to extend it to this integration (it is UPnP, so the app will eventually discover the devices, define ports and define UPnP event / control paths).

2 Likes

Question, and I barely understand most of this so forgive me..

For those of us using HubConnect, can you add "AudioVolume" and "Refresh" to the capabilities section? That would allow the hub on the other end of the connection to use the HubConnect AVR driver. Right now HubConnect just sees it as a switch when sharing, not a multimedia device.

I'm eagerly awaiting the new Hubitat firmware as it promises something a little easier than HubConnect and uses native drivers for the shared device instead of the generic HubConnect drivers... For folks like me that really don't fully understand the driver writing process, it looks like life will be a lot easier.. Especially thanks to folks like you who do all the hard work!

I have been sharing the TV's via SmartThings and HubConnect, but your driver is very cool and SmartThings is a PITA...

1 Like

I just dumped ST with the release of this driver. I wasn't doing much other than off on with ST so the transition was easy.

1 Like

Not designed to work with HubConnect. I am trying to link to Smaart Things (without HUB) to get audio volume and without having to use HubConnect. Future.

1 Like

@SuperDupe There's really nothing preventing you from using ST's for whatever control you want on the app and use this driver for local control of everything else. Don't even need HubConnect for that.

1 Like

I'd like to have everything I want to monitor/control in one place... Using HubConnect with ST lately has been problematic... I currently use one main Hubitat hub for all radio controlled devices and use a second Hubitat hub for various apps and cloud based connections, ultimately sharing them with the main hub... I have the TV's connected via my second hub and want to share them to the main... Currently using HubConnect, I'm limited in control... Hence the question earlier... :slight_smile:

1 Like

One thing I notice is that it doesn't track state changes if the TV's are powered on outside of the driver say via a remote control. Would it be possible to have it check if the tv is on or off at some interval? I use the tv power states to control things like fans and such.

I plan on creating a polling method. It will send a poll every 5 minutes and if there is a response, it will mark the TV on, otherwise off. Next beta version (this weekend hopefully). You will have to excuse the delay - I am consulting on a aerospace project (it seems at 72, I would rest).

5 Likes

Nice... Looking forward to the polling...

I have a LG TV in the living room and use HE to sync its status with my Harmony remote. So if someone turns it on via a different remote, HE then tells Harmony to start the relevant activity based on the TV's current source. If it's turned off, the TV sends a websocket message of turning off so HE tells harmony to turn off the activity. It's awesome and works great and I'm hoping to replicate this with my Samsung TV in the bedroom.

For the LG TV, I poll the websockets every 30 seconds (only when it's off) to see if there's a response. If there is, the TV is deemed to be on and the driver subscribes to the websocket. When the TV is on, the driver gets a message everytime the input source is changed and triggers the corresponding Harmony activity.

I see. I will provide a polling frequency preference for 30, 60, 300 seconds. This will allow the user to trade between hub performance and power latency (I did the same thing in TP-Link integration). But it has to occur always (in case someone turns the set off via another interface (such as fire tv voice control).

Yeah, my LG TV sends a websocket message that's specific to powering off. Having that meant polling wasn't necessary when the TV was on. Unlikely that the Samsung TV has something similar though.

It sends the message, but there is no guarantee the web-socket is active.

So I loaded the driver accordingly onto the system. Is there another step here as I dont see application specific code to install. I have 2019 and 2020 samsung TV's with the TIZEN OS. Thanks

1 Like

Go into Devices, and Add Virtual Device.
For the device name, enter anything (TV), and under type select Hubitat-Samsung Remote

6 Likes

thanks for the information. This did the job and thanks.

1 Like