Samsung Hubitat TV Integration (2016 and later)

I am having a strange issue with this driver. Adding it for the first time to the Q90B 2022 model.
Followed all the instructions and when I first turn off the TV from the Hubitat device page, the pop up comes on the TV where I have to click on ‘Allow’.

I have also gone into the general settings for the TV and selected always allow for the connected Hubitat device.

My issue is that the pop up window continues to come up forcing me to click allow every time I try to control the TV from Hubitat.

The TV is showing the list of allowed services for the Hubitat device as ‘Play Mobile Content on TV’

Any ideas on why this is happening?

Try this. Go to
General -> External Device Manager -> Device Connect Manager ->

Access Notification - should be "First Time Only"
Device List - should have your Hubitat as allowed.

Turn your TV off (for at least 2 minutes), then back on.

Try again. If fixed, fine. if not, it is your set's software. Samsung keeps making it better - breaking everything.

PS - on my set, if "always on", I get the notification once when I start the TV each day.

1 Like

Hi, I have a Samsung Frame 2021, and am trying to create rules triggered by it going in and out of art mode (controlled by the remote control power button).

However, it only seems to work for a few seconds before eventually the Web socket closes and it stops recognizing any events unless they are done via Hubitat.

I've tried setting up the Smartthings integration and increasing the frequency of the power check, but neither seems to have helped.

I can get it working again by fully powering off the TV and back on, or by saving preferences on the device screen in Hubitat.

Is this expected? Is there any way I can have actions triggered on events from the TV remote?

Some recent log entries below - it stopped triggering events after the close message at 7:55:32.

[dev:737](http://192.168.2.25/logs?tab=past&deviceId=737#)2023-02-03 07:57:21.816 PM[trace](http://192.168.2.25/logs?tab=past&deviceId=737#)Samsung TV - Family Room-4.0-3: statusParse: [quickLog: [switch:[on, on], volume:[7, 7], mute:[unmuted, unmuted], input:[HDMI1, HDMI1], channel:[ , ], channelName:[art, art], pictureMode:[Movie, Movie], soundMode:[Standard, Standard], transportStatus:[n/a, null]]]

[dev:737](http://192.168.2.25/logs?tab=past&deviceId=737#)2023-02-03 07:57:21.813 PM[debug](http://192.168.2.25/logs?tab=past&deviceId=737#)Samsung TV - Family Room-4.0-3: statusParse: [quickLog: [switch:[on, on], volume:[7, 7], mute:[unmuted, unmuted], input:[HDMI1, HDMI1], channel:[ , ], channelName:[art, art], pictureMode:[Movie, Movie], soundMode:[Standard, Standard], transportStatus:[n/a, null]]]

[dev:737](http://192.168.2.25/logs?tab=past&deviceId=737#)2023-02-03 07:57:21.578 PM[debug](http://192.168.2.25/logs?tab=past&deviceId=737#)Samsung TV - Family Room-4.0-3: asyncGet: [path:/devices/0749add5-9553-8f10-07fe-de402a3f9f8a/status, parse:distResp], statusParse

[dev:737](http://192.168.2.25/logs?tab=past&deviceId=737#)2023-02-03 07:57:20.068 PM[debug](http://192.168.2.25/logs?tab=past&deviceId=737#)Samsung TV - Family Room-4.0-3: syncPost: [path:/devices/0749add5-9553-8f10-07fe-de402a3f9f8a/commands, cmdData:[component:main, capability:refresh, command:refresh, arguments:[]]]

[dev:737](http://192.168.2.25/logs?tab=past&deviceId=737#)2023-02-03 07:57:20.065 PM[trace](http://192.168.2.25/logs?tab=past&deviceId=737#)Samsung TV - Family Room-4.0-3: deviceCommand: [component:main, capability:refresh, command:refresh, arguments:[]]

[dev:737](http://192.168.2.25/logs?tab=past&deviceId=737#)2023-02-03 07:55:32.183 PM[debug](http://192.168.2.25/logs?tab=past&deviceId=737#)Samsung TV - Family Room-4.0-3: webSocketStatus: [status: closed, message: status: closing]

[dev:737](http://192.168.2.25/logs?tab=past&deviceId=737#)2023-02-03 07:55:32.068 PM[debug](http://192.168.2.25/logs?tab=past&deviceId=737#)Samsung TV - Family Room-4.0-3: close

[dev:737](http://192.168.2.25/logs?tab=past&deviceId=737#)2023-02-03 07:55:06.264 PM[trace](http://192.168.2.25/logs?tab=past&deviceId=737#)Samsung TV - Family Room-4.0-3: updated: onPollCount = 0

[dev:737](http://192.168.2.25/logs?tab=past&deviceId=737#)2023-02-03 07:55:06.262 PM[info](http://192.168.2.25/logs?tab=past&deviceId=737#)Samsung TV - Family Room-4.0-3: Attributes: [messageButton:null, mute:unmuted, pushed:null, switch:on, level:7, transportStatus:n/a, soundMode:Standard, currentApp: , numberOfButtons:45, variable:null, volume:7, trackDescription:art, tvChannelName:art, pictureMode:Movie, tvChannel: , artModeStatus:on, wsStatus:closed, inputSource:HDMI1]

[dev:737](http://192.168.2.25/logs?tab=past&deviceId=737#)2023-02-03 07:55:02.523 PM[info](http://192.168.2.25/logs?tab=past&deviceId=737#)Samsung TV - Family Room-4.0-3: statusParse: [volume:7]

[dev:737](http://192.168.2.25/logs?tab=past&deviceId=737#)2023-02-03 07:55:02.518 PM[trace](http://192.168.2.25/logs?tab=past&deviceId=737#)Samsung TV - Family Room-4.0-3: statusParse: [quickLog: [switch:[on, on], volume:[0, 7], mute:[unmuted, unmuted], input:[HDMI1, HDMI1], channel:[ , ], channelName:[art, art], pictureMode:[Movie, Movie], soundMode:[Standard, Standard], transportStatus:[n/a, null]]]

[dev:737](http://192.168.2.25/logs?tab=past&deviceId=737#)2023-02-03 07:55:02.516 PM[debug](http://192.168.2.25/logs?tab=past&deviceId=737#)Samsung TV - Family Room-4.0-3: statusParse: [quickLog: [switch:[on, on], volume:[0, 7], mute:[unmuted, unmuted], input:[HDMI1, HDMI1], channel:[ , ], channelName:[art, art], pictureMode:[Movie, Movie], soundMode:[Standard, Standard], transportStatus:[n/a, null]]]

[dev:737](http://192.168.2.25/logs?tab=past&deviceId=737#)2023-02-03 07:55:02.512 PM[info](http://192.168.2.25/logs?tab=past&deviceId=737#)Samsung TV - Family Room-4.0-3: deviceSetupParse: [supportedInputs:[digitalTv, HDMI1], pictureModes:[Dynamic, Movie, Natural, Standard], soundModes:[Amplify, Standard]]

[dev:737](http://192.168.2.25/logs?tab=past&deviceId=737#)2023-02-03 07:55:02.237 PM[debug](http://192.168.2.25/logs?tab=past&deviceId=737#)Samsung TV - Family Room-4.0-3: asyncGet: [path:/devices/0749add5-9553-8f10-07fe-de402a3f9f8a/status, parse:distResp], deviceSetup

[dev:737](http://192.168.2.25/logs?tab=past&deviceId=737#)2023-02-03 07:55:02.075 PM[debug](http://192.168.2.25/logs?tab=past&deviceId=737#)Samsung TV - Family Room-4.0-3: parse: [EVENT:d2d_service_message, artModeStatus:on]

[dev:737](http://192.168.2.25/logs?tab=past&deviceId=737#)2023-02-03 07:55:01.517 PM[debug](http://192.168.2.25/logs?tab=past&deviceId=737#)Samsung TV - Family Room-4.0-3: parse: [EVENT:ms.channel.ready]

[dev:737](http://192.168.2.25/logs?tab=past&deviceId=737#)2023-02-03 07:55:01.509 PM[debug](http://192.168.2.25/logs?tab=past&deviceId=737#)Samsung TV - Family Room-4.0-3: parse: [EVENT:ms.channel.connect, TOKEN:noChange]

[dev:737](http://192.168.2.25/logs?tab=past&deviceId=737#)2023-02-03 07:55:01.499 PM[debug](http://192.168.2.25/logs?tab=past&deviceId=737#)Samsung TV - Family Room-4.0-3: webSocketStatus: [status: open, message: status: open]

[dev:737](http://192.168.2.25/logs?tab=past&deviceId=737#)2023-02-03 07:55:01.441 PM[debug](http://192.168.2.25/logs?tab=past&deviceId=737#)Samsung TV - Family Room-4.0-3: webSocketStatus: [status: closed, message: status: closing]

[dev:737](http://192.168.2.25/logs?tab=past&deviceId=737#)2023-02-03 07:55:01.334 PM[debug](http://192.168.2.25/logs?tab=past&deviceId=737#)Samsung TV - Family Room-4.0-3: connect: function = frameArt

[dev:737](http://192.168.2.25/logs?tab=past&deviceId=737#)2023-02-03 07:55:01.321 PM[trace](http://192.168.2.25/logs?tab=past&deviceId=737#)Samsung TV - Family Room-4.0-3: sendMessage: [wsStatus: open, function: frameArt, data: {"method":"ms.channel.emit","params":{"data":"{\"request\":\"get_artmode_status\",\"id\":\"55960b61-7c12-4c79-aeec-070fd6a30e3c\"}","to":"host","event":"art_app_request"}}, connectType: close

[dev:737](http://192.168.2.25/logs?tab=past&deviceId=737#)2023-02-03 07:55:01.285 PM[debug](http://192.168.2.25/logs?tab=past&deviceId=737#)Samsung TV - Family Room-4.0-3: sendMessage: [wsStatus: open, function: frameArt, data: {"method":"ms.channel.emit","params":{"data":"{\"request\":\"get_artmode_status\",\"id\":\"55960b61-7c12-4c79-aeec-070fd6a30e3c\"}","to":"host","event":"art_app_request"}}, connectType: close

[dev:737](http://192.168.2.25/logs?tab=past&deviceId=737#)2023-02-03 07:55:01.248 PM[info](http://192.168.2.25/logs?tab=past&deviceId=737#)Samsung TV - Family Room-4.0-3: updated: [getDeviceData:[status:OK, dni:102B41BFEC2F, modelYear:2021, frameTv:true, tokenSupport:true], logEnable:true, infoLog:true, traceLog:true, setOnPollInterval:10, stUpdate:[connectST:true, stPollInterval:15], pollMethod:local]

[dev:737](http://192.168.2.25/logs?tab=past&deviceId=737#)2023-02-03 07:55:00.980 PM[debug](http://192.168.2.25/logs?tab=past&deviceId=737#)Samsung TV - Family Room-4.0-3: parse: [EVENT:d2d_service_message, artModeStatus:on]

[dev:737](http://192.168.2.25/logs?tab=past&deviceId=737#)2023-02-03 07:55:00.424 PM[debug](http://192.168.2.25/logs?tab=past&deviceId=737#)Samsung TV - Family Room-4.0-3: parse: [EVENT:ms.channel.ready]

[dev:737](http://192.168.2.25/logs?tab=past&deviceId=737#)2023-02-03 07:55:00.415 PM[debug](http://192.168.2.25/logs?tab=past&deviceId=737#)Samsung TV - Family Room-4.0-3: parse: [EVENT:ms.channel.connect, TOKEN:noChange]

[dev:737](http://192.168.2.25/logs?tab=past&deviceId=737#)2023-02-03 07:55:00.403 PM[debug](http://192.168.2.25/logs?tab=past&deviceId=737#)Samsung TV - Family Room-4.0-3: webSocketStatus: [status: open, message: status: open]

[dev:737](http://192.168.2.25/logs?tab=past&deviceId=737#)2023-02-03 07:55:00.335 PM[debug](http://192.168.2.25/logs?tab=past&deviceId=737#)Samsung TV - Family Room-4.0-3: connect: function = frameArt

[dev:737](http://192.168.2.25/logs?tab=past&deviceId=737#)2023-02-03 07:55:00.333 PM[trace](http://192.168.2.25/logs?tab=past&deviceId=737#)Samsung TV - Family Room-4.0-3: sendMessage: [wsStatus: closed, function: frameArt, data: {"method":"ms.channel.emit","params":{"data":"{\"request\":\"get_artmode_status\",\"id\":\"55960b61-7c12-4c79-aeec-070fd6a30e3c\"}","to":"host","event":"art_app_request"}}, connectType: close

[dev:737](http://192.168.2.25/logs?tab=past&deviceId=737#)2023-02-03 07:55:00.330 PM[debug](http://192.168.2.25/logs?tab=past&deviceId=737#)Samsung TV - Family Room-4.0-3: sendMessage: [wsStatus: closed, function: frameArt, data: {"method":"ms.channel.emit","params":{"data":"{\"request\":\"get_artmode_status\",\"id\":\"55960b61-7c12-4c79-aeec-070fd6a30e3c\"}","to":"host","event":"art_app_request"}}, connectType: close

[dev:737](http://192.168.2.25/logs?tab=past&deviceId=737#)2023-02-03 07:51:47.291 PM[info](http://192.168.2.25/logs?tab=past&deviceId=737#)Samsung TV - Family Room-4.0-3: onPollParse: [switch: on, powerState: on]

No. This (and all Samsung TV integrations I have seen) do not interface with the remote. If connected to SmartThings, it does detect the relevant states of the tv (on/off, volume, mute, inputSource, tvChannel, etc) as well as running app. Without SmartThings, it is limited to on/off and some app run/reporting functions (but highly limited).

Hello @djgutheinz ,

Thanks for this driver. Is it possible add shorter time intervals for the SmartThings Polling? 1 minute is too long for my use case. I'd prefer 10s at the maximum.

I use a Harmony remote and when the TV's input source is changed using a different remote (or Alexa), I have code to sync my Harmony to the right activity. To make this work fine, I basically need the input source to update as quickly as possible. Right now, it takes too long. I used to use HubConnect and that was almost instant. With the ST change, that's unfortunately gone away.

Also, I used to use ST as the power polling method but just changed to local. I noticed that detection of "on" status is very fast. However, detection of "off" status is slow and slower than ST polling. Any way to improve the "off" status detection timing? I have 10s selected in "Power Polling Interval".

Detection Times for polling methods:
ON status:
Local: 5s
ST: 10-15s

OFF status:
Local: 40s
ST: 10s-15s

I have a Samsung 65KS8000 and it's connected via ethernet.

Thanks

I just completed a HubiThings Replica driver for this that has a subscription event to SmartThings. Same functionality and does not require poll to SmartThings. See

For HubiThings Replica: [RELEASE] HubiThings Replica
For the Replica Samsung TV Driver: https://raw.githubusercontent.com/DaveGut/HubitatActive/master/HubiThingsReplica%20Drivers/Replica_Samsung_TV.groovy

Be sure to read the readMe for the TV at: HubitatActive/HubiThingsReplica Drivers/README.md at master · DaveGut/HubitatActive · GitHub

Interesting. Might this new driver be more capable with the 2022 frame tv? If it can handle turning on the tv in art mode, that would be great. Thanks for all your work on this!

Samsung has not provided a fix (yet) to the code they removed last year from the TV. This disabled setting artMode via websocket. This was also reported on the SmartThing interface, So, no changes.

Dave

1 Like

Oh wow... Didn't realize there was a HubConnect replacement. This community keeps surprising.

I actually just edited your code in my local instance and added an option for 10s and that's working fine. It detects input source changes within 5s. Also, I changed the power polling back to SmartThings and it now detects "off" within 5s also. "On" is still between 10 - 15s.

With HubiThings, do you know if it's instant (similar to HubConnect) or is there a polling interval? Might be worth using that although I was trying to divorce myself from SmartThings devices (still use SmartThings cloud for this).

For most attributes, it is under 2 seconds. This includes power on/off.

Thank you! I switched to this. The "on" detection isn't quite as fast as using your local detection method (probably takes about 10s) but everything else is almost instant. Thanks for the great work!

1 Like

My Frame TV integration suddenly stopped working tonight. For some reason, the TV no longer sends any signal to Hubitat that it is being turned on or off. I figured this out when the automation did not work this evening (it worked last night, and per the log, the tv was reporting/synching to Hubitat through this am...). There have been no changes to the setup (TV, router, network, etc) in over 2 weeks. TV is not internet connected, although the hub is.

Strangely, when trying to troubleshoot this, I was able to turn the TV ON from the Hubitat dashboard, but then I could not turn it OFF from Hubitat. Log is pasted below.

Any ideas on where I start with troubleshooting?

image

What has changed/happened in your Hubi-sphere? This may point to the problem. The logs do not indicate any error condition.

  • TV IP Address?
  • Hub Version?
  • Added something to the your LAN?
  • Changed router settings (i.e., AX support).

The logs do not indicate any error condition.

Typically, the log shows "onPollParse: [switch; OFF (or ON), powerState....] such as the 8 rows at the bottom, with one entry row each time the TV is turned on or off.
The log typically does not show the "off[frameTV:true] such as the many entries starting at 10:31...PM last night.

What has changed/happened in your Hubi-sphere?

Nothing.

  • TV reports same IP address that Hubitat reports for the TV in the device
  • Hub version is 2.3.4.132
  • Nothing added to LAN over the last few weeks
  • Until this problem had not even logged into router for over a week

In Hubitat, in the device, on the right side, it states: * wsStatus : closed-failure
I don't recall the word "failure" being there before. What does wsStatus mean?

Close-failure indicates that the last websocket message failed. That is normal since I do not close the socket as power is turned off.

Try running a Save Preferences. Sometimes poll gets unscheduled and this may restart it.

I too am experiencing this issue. It happens weekly and then I cannot use the app until i "save preferences".

Is there any way to add a Refresh attribute/function (like Off) to the app that would accomplish the same thing? This way I could write a Webcore piston that watches for it and then refreshes it as the "Save Preferences" is not exposed to Webcore.

I will look at it when I feel better. My question is why the periodically scheduled event is being removed. Nothing in my code for that.

Thank you @djgutheinz. Please, when you feel better as Health is more important than this. Then if you need any other info please reach out. Take care.

Tuesday, In Hubitat, in Devices, I opened the TV device and clicked both Save Device and Save Preferences. It did not help. The Hubitat and TV were not communicating at all anymore.

Wednesday, I spent time searching this site and found no new ideas, but for good measure did the above again. Surprisingly all of a sudden the Hubitat and TV are once again communicating....

In my case, when it is properly connected the ONLY entries in the log are those that include "onPollParse:..."

HOWEVER - tonight, while the TV was on, my automations that trigger when the TV goes off suddenly triggered. The log shows the TV went off and on within fractions of a second. Except it did NOT - I am sitting here, I see the remote and it was not touched. Can anyone advise what is going on here? Do I have a gremlin in my Hubitat TV device?

image

ETA: TV did it again, tonight, at the EXACT same time, 8:33:19 pm...I have absolutely NO automation causing this - the tv is somehow sending a switch off, then immediately a switch on signal. Again, when this happens, the TV never actually goes off. If the automations linked to turning off the TV were not triggering, I would have no idea this is happening...

ANY IDEAS???

Thank you for your reply - by remote, I meant using that as the trigger to turn the TV on and off versus using Hubitat to turn the TV on and off (well, it's a Frame, so really from Art mode to non-Art mode). When the TV goes out of art mode (I hit the power button on the remote), I want to turn the lights off. If that's not expected to work, that implies this integration is only to control the TV from Hubitat? But from some of the recent posts it sounds like others are doing something similar, but also seeing issues with it not receiving the events.