Help ! Samsung TV Bindings with >2016 Samsung TV

@Nicholas_Waterton that’s exactly what I thought I was missing: I linked the volume channel and I cannot see the polling for the channel in log. And also I cannot the changing in MediaRenderer service when I switch ON/OFF my TV. The thing (and all associated channel) remains always in the same state.
It seems that the update cycle is not started.

Can the new binding work with a KS7090 from 2016? It has Tizen and api/v2. It automaticly chose the websocket connection on 8001. But at start of the TV it get the warning: cannot retrieve current webSocketV2 is not connected.
Thanks for help and greetings,

@Master79 ,
This is the applications control channel. may not be significant. does yout TV give an access code when an app tries to connect? if so, it uses encrypted websockets, and the binding doesn’t support that.

If it just asks to allow the connection, then it should be OK. TV’s from 2015/2016 are dodgy though because this is when Samsung was doing the encrypted websocket thing.

I have posted an updated binding - try that, and post the log so I can see what is happening.

New update.
Includes feedback from Frame TV’s (SOURCE_APP channel shows current art displayed when TV is in artMode).
KEY_CODE channel now supports mouse events. Send {"x":0, "y":0} to move the mouse to 0,0, send "LeftClick" or "RightClick" (including the ") to click the mouse/
KEY_CODE channel now supports entering text. Send "text" to send the word test to the TV. Any text that you want to send has to be enclosed in " to be recognized as a text entry.
BROWSER_URL now launches the browser (but will not fill in the URL - haven’t figured this out yet).
I’m sending the following to the KEY_CODE channel to fill in the URL after launching the browser:

'3000,{"x":0, "y":-430},1000,KEY_ENTER,2000,"http://your_url_here"'

Your delay value and position of the mouse may vary. You can also launch the browser by sending Internet to the SOURCE_APP channel.
Sending "" to the SOURCE_APP channel will close the current open app, or send a long press of KEY_EXIT if no app is open. This is the same as sending ON to the STOP_BROWSER channel.

New applist file, updated the Internet appID for my TV, I don’t know if it’s the same on other TV’s. Internet is the browser.

# This file is for the samsungtv binding
# It contains a list in json format of apps that can be run on the TV
# It is provided for TV >2020 when the api that returns a list of installed apps was removed
# format is:
# { "name":"app name", "appId":"app id", "type":2 }
# Where "app name" is the plain text name used to start or display the app, eg "Netflix", "Disney+"
# "app id" is the internal appId assigned by Samsung in the app store. This is hard to find
# See for the details
# app id is usually a 13 digit number, eg Netflix is "3201907018807"
# the type is an integer, either 2 or 4. 2 is DEEP_LINK (all apps are this type on >2020 TV's)
# type 4 is NATIVE_LAUNCH and the only app that used to use this was "com.tizen.browser" for the
# built in webbrowser.
# This default list will be overwritten by the list retrived from the TV (if your TV is prior to 2020)
# You should edit this list down to just the apps you have installed on your TV.
# NOTE! it is unknown how accurate this list is!
{ "name":"Internet"                , "appId":"3202010022079"    , "type":2 }
{ "name":"Netflix"                 , "appId":"3201907018807"    , "type":2 }
{ "name":"YouTube"                 , "appId":"111299001912"     , "type":2 }
{ "name":"YouTube TV"              , "appId":"3201707014489"    , "type":2 }
{ "name":"YouTube Kids"            , "appId":"3201611010983"    , "type":2 }
{ "name":"HBO Max"                 , "appId":"3201601007230"    , "type":2 }
{ "name":"Hulu"                    , "appId":"3201601007625"    , "type":2 }
{ "name":"Plex"                    , "appId":"3201512006963"    , "type":2 }
{ "name":"Prime Video"             , "appId":"3201910019365"    , "type":2 }
{ "name":"Rakuten TV"              , "appId":"3201511006428"    , "type":2 }
{ "name":"Disney+"                 , "appId":"3201901017640"    , "type":2 }
{ "name":"NOW TV"                  , "appId":"3201603008746"    , "type":2 }
{ "name":"NOW PlayTV"              , "appId":"3202011022131"    , "type":2 }
{ "name":"VOYO.RO"                 , "appId":"111299000769"     , "type":2 }
{ "name":"Discovery+"              , "appId":"3201803015944"    , "type":2 }
{ "name":"Apple TV"                , "appId":"3201807016597"    , "type":2 }
{ "name":"Apple Music"             , "appId":"3201908019041"    , "type":2 }
{ "name":"Spotify"                 , "appId":"3201606009684"    , "type":2 }
{ "name":"TIDAL"                   , "appId":"3201805016367"    , "type":2 }
{ "name":"TuneIn"                  , "appId":"121299000101"     , "type":2 }
{ "name":"Deezer"                  , "appId":"121299000101"     , "type":2 }
{ "name":"Radio UK"                , "appId":"3201711015226"    , "type":2 }
{ "name":"Radio WOW"               , "appId":"3202012022468"    , "type":2 }
{ "name":"Steam Link"              , "appId":"3201702011851"    , "type":2 }
{ "name":"Gallery"                 , "appId":"3201710015037"    , "type":2 }
{ "name":"Focus Sat"               , "appId":"3201906018693"    , "type":2 }
{ "name":"PrivacyChoices"          , "appId":"3201909019271"    , "type":2 }
{ "name":""           , "appId":"3201611011005"    , "type":2 }
{ "name":"Eurosport Player"        , "appId":"3201703012079"    , "type":2 }
{ "name":"EduPedia"                , "appId":"3201608010385"    , "type":2 }
{ "name":"BBC News"                , "appId":"3201602007865"    , "type":2 }
{ "name":"BBC Sounds"              , "appId":"3202003020365"    , "type":2 }
{ "name":"BBC iPlayer"             , "appId":"3201601007670"    , "type":2 }
{ "name":"The Weather Network"     , "appId":"111399000741"     , "type":2 }
{ "name":"Orange TV Go"            , "appId":"3201710014866"    , "type":2 }
{ "name":"Facebook Watch"          , "appId":"11091000000"      , "type":2 }
{ "name":"ITV Hub"                 , "appId":"121299000089"     , "type":2 }
{ "name":"UKTV Play"               , "appId":"3201806016432"    , "type":2 }
{ "name":"All 4"                   , "appId":"111299002148"     , "type":2 }
{ "name":"VUDU"                    , "appId":"111012010001"     , "type":2 }
{ "name":"Explore Google Assistant", "appId":"3202004020674"    , "type":2 }
{ "name":"Amazon Alexa"            , "appId":"3202004020626"    , "type":2 }
{ "name":"My5"                     , "appId":"121299000612"     , "type":2 }
{ "name":"SmartThings"             , "appId":"3201910019378"    , "type":2 }
{ "name":"BritBox"                 , "appId":"3201909019175"    , "type":2 }
{ "name":"TikTok"                  , "appId":"3202008021577"    , "type":2 }
{ "name":"RaiPlay"                 , "appId":"111399002034"     , "type":2 }
{ "name":"DAZN"                    , "appId":"3201806016390"    , "type":2 }
{ "name":"McAfee Security"         , "appId":"3201612011418"    , "type":2 }
{ "name":"hayu"                    , "appId":"3201806016381"    , "type":2 }
{ "name":"Tubi"                    , "appId":"3201504001965"    , "type":2 }
{ "name":"CTV"                     , "appId":"3201506003486"    , "type":2 }
{ "name":"Crave"                   , "appId":"3201506003488"    , "type":2 }
{ "name":"MLB"                     , "appId":"3201603008210"    , "type":2 }
{ "name":"Love Nature 4K"          , "appId":"3201703012065"    , "type":2 }
{ "name":"SiriusXM"                , "appId":"111399002220"     , "type":2 }
{ "name":"7plus"                   , "appId":"3201803015934"    , "type":2 }
{ "name":"9Now"                    , "appId":"3201607010031"    , "type":2 }
{ "name":"Kayo Sports"             , "appId":"3201910019354"    , "type":2 }
{ "name":"ABC iview"               , "appId":"3201812017479"    , "type":2 }
{ "name":"10 play"                 , "appId":"3201704012147"    , "type":2 }
{ "name":"Telstra"                 , "appId":"11101000407"      , "type":2 }
{ "name":"Telecine"                , "appId":"3201604009182"    , "type":2 }
{ "name":"globoplay"               , "appId":"3201908019022"    , "type":2 }
{ "name":"DIRECTV GO"              , "appId":"3201907018786"    , "type":2 }
{ "name":"Stan"                    , "appId":"3201606009798"    , "type":2 }
{ "name":"BINGE"                   , "appId":"3202010022098"    , "type":2 }
{ "name":"Foxtel"                  , "appId":"3201910019449"    , "type":2 }
{ "name":"SBS On Demand"           , "appId":"3201510005981"    , "type":2 }
{ "name":"Security Center"         , "appId":"3202009021877"    , "type":2 }
{ "name":"Google Duo"              , "appId":"3202008021439"    , "type":2 }
{ "name":"Kidoodle.TV"             , "appId":"3201910019457"    , "type":2 }
{ "name":"Embly"                   , "appId":"vYmY3ACVaa.emby"  , "type":2 }
{ "name":"Viaplay"                 , "appId":"niYSnzL6h1.Viaplay"          , "type":2 }
{ "name":"SF Anytime"              , "appId":"sntmlv8LDm.SFAnytime"        , "type":2 }
{ "name":"SVT Play"                , "appId":"5exPmCT0nz.svtplay"          , "type":2 }
{ "name":"TV4 Play"                , "appId":"cczN3dzcl6.TV4"              , "type":2 }
{ "name":"C More"                  , "appId":"7fEIL5XfcE.CMore"            , "type":2 }
{ "name":"Comhem Play"             , "appId":"SQgb61mZHw.ComhemPlay"       , "type":2 }
{ "name":"Viafree"                 , "appId":"hs9ONwyP2U.ViafreeBigscreen" , "type":2 }

Download link org.openhab.binding.samsungtv-3.2.0-SNAPSHOT.jar

@Rickytr ,

The update cycle is irrelevant to almost everything, it is literally only used to update Volume and Mute channels (and apps now but that’s a new thing). Correctly working UpNp is key to the binding working successfully.

You have some other issue going on. Can you post a screen capture of your Thing, and its channels, and the output of your log when you turn the TV on and off. please post the full log, it’s hard to figure out what is going on when you only post a small part of the log. You should see the UPnP devices appearing and disappearing as you turn the TV on and off.

If you don’t see them appear and disappear, there is some sort of network issue. Have you given the TV a fixed ip address? what about hard wiring the TV to ethernet? can you see the TV on a UPnP sniffer (I use uPnP Mate on my iPad, it will quickly show you what is happening with UpNp on your network).

Hi @Nicholas_Waterton,

I just want to give you a short feedback about the Situation on my side.
Thanks again for our trial and error scenario, I really appreciated your support.

Long story short: Its working now.
Is it realted to the Samsung Binding: No
What was the reason? As I tried to connect my Sonos speakers I faced the same storry. I guess the reason is JPNP reacts together with an InfluxDB in a docker environment in a strange way. If I set the InfluxDB to “host” mode JUPNP is working fine if I set to to “bridged” the discovery itself works great but receiving the device description like shown below is not working.

2021-11-17 13:34:37.338 [INFO ] [org.jupnp.transport.spi.StreamClient] - Timeout of 10 seconds while waiting for HTTP request to complete, aborting: (StreamRequestMessage) GET

Details see here: Sonos problems with Docker - #13 by FranzS

I’ve just wanted to let you know that in case someone else is having similar problems.

Have an awesome weekend!

1 Like

@FranzS ,

Thanks for the feedback. At least it confirms what I was saying, that correctly working UPNP is crucial to the operation of the binding.

Hopefully this will help other people who are seeing similar problems.

1 Like

@Nicholas_Waterton I finally made it work. Using the tool you suggested I discovered that one of my switches after a fw update started to filter out UPNP packets. I did’t thought about this because I have other UPNP devices and are all working. But they are all on ANOTHER swith.
Thanks a lot for your support and your GREAT work.

Probably an easy fix or explanation.

Ive had my 2016 tv running on this app for a while now.
Connected using secure websocket.
Volume, input, all remote buttons etc work, the only thing is the power.
Only works if the TV is on and i turn it off.
If the TV is off and i try to turn it on, nothing happens. The TV is offline while its off.

Any way i can have this so i can turn the TV on using openhab, rather than manually?

I have installed the addon with my 2019 TV. Works great. I no longer have the problem of the binding losing its authorization, so its more reliable.
I got the app-list working once I created the folder, assigned ownership to openhab and set the right permissions. If the addon can create the folder if it needs it, that would probably a good thing to try at startup.

Do you have WOL enabled on the TV? not all TV’s support it, but you have to turn it on on the TV. It also may not work if you have a soundbar connected to the ARC output, or are connected via WiFi.

@samsp ,

I’ll think about it, it’s only needed on TV’s that don’t download the app list, which is hard to detect at startup.

The folder is also used by the exec binding (which is why I used it), so it may already exist on some peoples configuration.

I have a new version of the binding in process, which should enable the SOURCE_NAME channel, which I know a lot of people were wanting.

Maybe another week before I’m happy with it.

1 Like

@samsp ,

I just thought, the app API was only supposed to be removed in >2020 TV’s, but you say yours is a 2019 TV?

In theory, you shouldn’t need the applist file (unless we are wrong about when the api was removed…).

Can you send me a log of when the binding starts up? you should see this in the log:

2021-11-26 17:00:34.689 [TRACE] [ngtv.internal.protocol.WebSocketBase] - WebSocketRemote: sendCommand: {"method":"","params":{"event":"ed.installedApp.get","to":"host"}}

That’s the request for the list of installed apps. On TV’s >2020, you don’t get anything back, so you need the manual applist file, on earlier TV’s you should get a list of installed apps back.

Can you show me what you get after that command is sent (next 30 seconds or so should do it). I just want to make sure I haven’t broken the binding for TV’s that do actually return the app list, and the timing is a bit unknown (I wait 5 seconds, and if the list isn’t populated, then I load the applist file).

I don’t have a TV that returns the installed app list, so I can’t test it myself.


the weird thing is. I have home assistant running side by side and the power on WOL works perfect on that. The only difference is i have it configured to send 5 WOL packets. It wakes up after 5 seconds.
openhab binding does nothing to power the TV on

@Christopher_Hemmings ,

The samsungtv binding should send 10 WOL packets, it then checks to see if the TV comes online, if not it repeats sending the WOL packets every 10 seconds, until it gives up after 30 seconds.

It only does this if you have the MAC address entered in the configuration (it does try to fill this in itself when the Thing is created). If you are using file based Things, you have to fill the MAC address in yourself.

You should be able to see this activity in the logs (if set to TRACE). You do have to wait about 1 minute after powering off the TV, before WOL will work, as Samsung TV’s take a little while to actually power down after turning off.

Can you post your logs when you power OFF, wait 1 minute then power ON?



New binding release! Lots of new features in this.

  • Support for SOURCE_NAME
  • Support for SOURCE_ID
  • Support for CHANNEL
  • Support for CHANNEL_NAME
  • Three new Frame TV channels

New Support for Old CHANNELS:
On TV’s >2016 the SOURCE_NAME, SOURCE_ID, CHANNEL and CHANNEL_NAME channels weren’t supported, as there was no way to retrieve these values from the websocket interface. You could set CHANNEL, but not read it back.

I have implemented an interface to the Smartthings cloud, in order to be able to access these settings. This allows you to see the current source (TV, HDMI1, HDMI2, etc), and change the input source by sending the appropriate string to the SOUCE_NAME channel. SOURCE_ID is a read only numerical value representing the input source.
NOTE: this is ONLY for TV’s using the websocket interface (ie >2016). Earlier TV’s use UPNP for this functionality.

In order to connect to the Smartthings cloud, there are a few steps to take.

  1. Set the samsungtv logs to at least DEBUG
  2. Create a Samsung account (probably already have one when you set up your TV)
  3. Add Your TV to the Smartthings App
  4. Go to and create a Personal Access Token (PAT). check off all the features you want (I would add them all).
  5. Go to the Openhab Samsung TV Thing, and update the configuration with your PAT (click on advanced). You will fill in Device ID later if necessary.
  6. Save the Thing, and watch the logs.

The binding will attempt to find the Device ID for your TV. If you have several TV’s, you will have to manually identify the Device ID for the current Thing from the logs. The device ID should look something like 996ff19f-d12b-4c5d-1989-6768a7ad6271. If you have only one TV, Device ID should get filled in for you.

Once you have the right Device Id, go back to the Thing configuration, and enter the Device ID. Save the update.

You can now link the SOURCE_NAME, SOURCE_ID, CHANNEL and CHANNEL_NAME channels, and should see the values updating. You can change the TV input source by sending "HDMI1", or "HDMI2" to the SOURCE_ID channel, the exact string will depend on your TV, and how many inputs you have.

NOTE: You may not get anything for CHANNEL_NAME, as most TV’s don’t report it. You can only send commands to CHANNEL and SOURCE_NAME, the others are read only.

Legacy TV’s:
I have reworked the entire Legacy TV support system to improve reliability. Let me know if I have broken anything.
Legacy TV NOTE: On TV’s <2016, using the legacy interface, you may see an error similar to this in your logs:

2021-12-08 12:19:50.262 [DEBUG] [port.upnp.internal.UpnpIOServiceImpl] - Error reading SOAP response message. Can't transform message payload: org.jupnp.model.action.ActionException: The argument value is invalid. Invalid number of input or output arguments in XML message, expected 2 but found 1.

This is not an actual error, but is what is returned when a value is polled that does not yet exist, such as the URL for the TV browser, when the browser isn’t running. These messages are not new, and can be ignored.

New Art Channels:
Three new channels, specifically for Frame TV owners (click on advanced in channels to see them).


The first channel, ART_SELECTED is an Image channel, it will show you a thumbnail of the currently selected artwork. This updates in real time if you change the selected artwork. The artwork is shown, irrespective of the TV mode (ie it still shows with the TV on, or in artMode). It will update if you have slideshow enabled, and the artwork changes. Unfortunately Image channels do not support sending commands, so this is really a read only channel.

ART_LABEL is a String channel, that shows the internal label given by the TV for the current artwork. It will also update in real time if the artwork changes. This will be something like MY_F0028 - you will have to determine what this actually represents. On my TV, MY_F0028 is “High Park Cherry Blossom”.

You can send commands to the ART_LABEL channel. If you send another text label (eg MY_F0029 or another valid internal label), the artwork displayed will change to be whatever you send represents. you will have to figure out what your labels are for your TV.

In addition, you can send images to the ART_LABEL channel (because you cant send them to the ART_SELECTED channel). I have tested .jpg and .png files, and they both work.The images should be a RawType, or a string representation of a RawType (just like updating an Image item). You could use the FTP Binding or a rule to upload an image to the TV.

This is how you upload a png image to an item Samsung_TV_Image linked to the ART_LABEL channel. This is a string representation of a RawType image. The actual image data is base64 encoded and added to the string (in this case iVBORw0KGgoAAA... is the image data base64 encoded). You can also send a regular RawType variable.


The images you upload should be 3840x2160 pixels in size exactly, to fill the screen. They are uploaded without a mat applied. The uploaded images will not display immediately, they are added to the My Photos section of My Collection, and a new Image is uploaded each time you send (ie they don’t get overwritten). You have to view them and/or delete them on the TV. If you have a <2021 Frame TV, you can fill the TV’s internal memory if you are not careful.

NOTE: For Developers use only!
The ART_JSON channel is also a String channel, it reports the json received from the websocket art channel on the TV as received (prettied up a bit). You can use this for your own programs/rules. You can also send commands to the TV’s websocket art channel this way.

If you send a plain text command eg "get_artmode_status", or "get_auto_rotation_status", it is sent wrapped in an artMode websocket json command. The response will be received on the same channel. Sending get_current_artwork would retrieve a json list of all the artwork currently on your TV.

if you wrap the command with {}, then the command is sent as json, exactly as you send it (message id is added automatically if you don’t include it), this is so that you can experiment with artMode json commands, that I may not know of.

The current list of commands that I know work are:

    get_artmode_status and set
    get_auto_rotation_status and set
    select_image - selects image to display (display optional)

Some of these command require extra variables, so you have to know what to send (eg delete_image_list expects you to include an image list, and select_image expects an image id to be included). Do Not Use This feature unless you have a reason! You have been warned!

Other New features:
The URL channel will now start the browser (but does not fill in the URL - have not figured this out yet). You can exit by sending ON to the STOP_BROWSER channel, or sending "" to the APPLICATION channel. However see below:

The KEY_CODE channel now supports mouse move, and actions. Plus new Keys KEY_AMBIENT and KEY_BT_VOICE. key KEY_BT_VOICE simulates pressing (or releasing) the voice button on the remote.

To send mouse actions, you would send to the KEY_CODE channel:

{"x":0, "y":-430},1000,LeftClick

Where “x” and “y” are the coordinates to send the mouse cursor to, followed by a 1 second delay, then a left mouseclick. RightClick also works.

To send text, enclose the string in "", so "http://your_url\r" would enter the text, followed by a return. You may have to escape the " using \ depending on how you send the text. this makes it possible to fill in a URL for the browser if you trigger on the URL channel changing, by moving the mouse to the URL entry bar, sending KEY_ENTER, and entering the text url. I have a rule that does this, but you may need to experiment with the mouse position and timing.

This is my rule (sorry it’s written n Python):

class TVURL(HABApp.Rule):
    Send a URL to the TV browser

    watch_items =  []
    change_items = []
    command_item = ['TV_Cameras']
    items =        ['TVRemoteControl',

    def __init__(self):
        self.log = logging.getLogger('MyRule.'+self.__class__.__name__)
        self.url_position = {"x":0, "y":-430}

    def command_received(self, event):
        self.log.debug('Item %s command received %s' % (, event.value))
        if == 'TV_Cameras':
    def set_url(self, event):"sending mouse to {}".format(json.dumps(self.url_position)))
        #3 second delay, move mouse (relative), click and send url.
        delay = 3000
        if self.item['TV_Power'].value == 'OFF':
            delay = 15000
        if self.item['TV_App'].value == 'Internet':
            self.oh.send_command(self.item['TVRemoteControl'], 'KEY_ENTER,2000,"{}"'.format(event.value+"\r"))
            self.oh.send_command(self.item['TVRemoteControl'], '{},{},1000,KEY_ENTER,2000,"{}"'.format(delay, json.dumps(self.url_position), event.value+"\r"))


The APPLICATION channel has been updated to support artMode commands. Normally this channel allows you to send an application name, or id, to start the application. it also displays the name of the currently running application. Sending "" to the channel exits the current application.

Now, the channel also displays artMode if the TV is a Frame TV displaying artwork. It displays an empty string for normal TV mode, Internet for the web browser, and the slideshow type if the frame TV is displaying a slideshow.

For Example, if a frame TV is showing a random slideshow (in artMode), the display would be:

shuffleslideshow 30 MY-C004

shuffleslideshow (or slideshow) is the slideshow type, 30 is the rotation time in minutes, and MY-C004 is the category, one of Favorites, My Photos, or My Shelf - the exact string will vary from TV to TV.

You can also set the slideshow settings by sending a string to the APLLICATIONS channel. The string should be in the same format as that above, with , between the fields, but the Category can be left out.
Eg, sending

shuffleslideshow, 1440

Would set a random slideshow, duration 1440 minutes (1 day) using the current category (whatever it is).

NOTE: if you set the current displayed art using the ART_LABEL channel, it will disable any current slideshow you have running.

Text File Configuration:
This is an example of a text thing:

Thing samsungtv:tv:family_room "Samsung The Frame 55" [ hostName="", port=8002, macAddress="10:2d:42:01:6d:17", refreshInterval=1000, protocol="SecureWebSocket", webSocketToken="16225986", smartThingsApiKey="cae5ac2a-6770-4fa4-a531-4d4e415872be", smartThingsDeviceId="996ff19f-d12b-4c5d-1989-6768a7ad6271" ]

Here are my Items:

String  TVRemoteControl         "TV Control [%s]"           <television>        (GF_Family)     { channel="samsungtv:tv:family_room:keyCode", autoupdate="false" }
Dimmer  TV_Volume               "TV Volume [%s]"            <soundvolume>       (GF_Family)     { channel="samsungtv:tv:family_room:volume" }
String TVSource_Name          "TV Source [%s]"            <television>        (GF_Family)     { channel="samsungtv:tv:family_room:sourceName" }
Number TV_Channel             "Channel [%s]"              <television>        (GF_Family)     { channel="samsungtv:tv:family_room:channel" }
// TV programTitle doesn't work on my TV
// String TV_Title               "Program Title [%s]"        <television>        (GF_Family)     { channel="samsungtv:tv:family_room:programTitle" }
String TV_Name                "Channel Name [%s]"         <television>        (GF_Family)     { channel="samsungtv:tv:family_room:channelName" }
Number TV_SourceId            "Source id [%s]"            <television>        (GF_Family)     { channel="samsungtv:tv:family_room:sourceId" }
/* Frame TV only*/
Switch TV_ArtMode               "TV Art Mode [%s]"          <television>        (GF_Family)     { channel="samsungtv:tv:family_room:artMode" }
/* Supported on all TV's */
Switch TV_Power                 "TV Power [%s]"             <television>        (GF_Family)     { channel="samsungtv:tv:family_room:power" }
Switch TV_Mute                  "TV Mute [%s]"              <soundvolume_mute>  (GF_Family)     { channel="samsungtv:tv:family_room:mute" }
String  TV_Cameras              "TV Cameras [%s]"           <camera>            (GF_Family)     { channel="samsungtv:tv:family_room:url", autoupdate="false" }
String  TV_App                  "TV App [%s]"               <television>        (GF_Family)     { channel="samsungtv:tv:family_room:sourceApp" }
Switch  TV_StopBrowser          "TV Stop Browser [%s]"      <television>        (GF_Family)     { channel="samsungtv:tv:family_room:stopBrowser", autoupdate="false" }
/* New artMode Channels for Frame TV */
String  TV_ArtJson              "TV ArtJson [%s]"           <television>        (GF_Family)     { channel="samsungtv:tv:family_room:artJson", autoupdate="false" }
String  TV_ArtLabel             "TV ArtLabel [%s]"          <television>        (GF_Family)     { channel="samsungtv:tv:family_room:artLabel", autoupdate="false" }
Image   TV_ArtImage             "TV ArtImage"               <television>        (GF_Family)     { channel="samsungtv:tv:family_room:artImage", autoupdate="false" }

And my SiteMap

Switch item=TV_Power mappings=[ON="ON", OFF="OFF"]
Switch item=TV_ArtMode mappings=[ON="ON", OFF="OFF"]
Switch item=TVRemoteControl label="TV POWER" mappings=["-4000,KEY_POWER"="SHUTDOWN", "KEY_POWER"="TOGGLE"]
Slider item=TV_Volume
Setpoint item=TV_Volume minValue=0 maxValue=100 step=1
Switch item=TV_Volume mappings=[INCREASE="increase", DECREASE="decrease"]
Switch item=TV_Mute mappings=[ON="ON", OFF="OFF"]
Text item=TV_Name
Text item=TVSource_Name
Text item=TV_SourceId
Switch item=TVSource_Name mappings=[HDMI1="HDMI 1", HDMI2="HDMI 2", HDMI3="HDMI 3", HDMI4="HDMI 4"]
Switch item=TV_Channel mappings=[3="Ch 3", 6="Ch 6", 23="Ch 23", 123="Ch 123"]
Switch item=TV_Cameras mappings=[""="All",""="Porch",""="Hallway",""="Garden",""="Side"]
Switch item=TV_App mappings=["Netflix"="Netflix","Apple TV"="Apple TV","Disney+"="Disney+","Tubi"="Tubi","Internet"="Internet",""="Exit"]
Switch item=TV_StopBrowser mappings=[ON="Stop", OFF="Quit"]
Switch item=TV_App label="Slideshow" mappings=["shuffleslideshow,1440"="shuffle 1 day","suffleslideshow,3"="shuffle 3 mins","slideshow,1440"="slideshow 1 day","slideshow,off"="Off"]
Text item=TV_App
Text item=TV_ArtLabel
Switch item=TV_ArtLabel mappings=["MY_F0018"="Millie","MY_F0019"="Cottage","MY_F0028"="High park","MY_F0038"="Vacation","SAM-S0611"="Fosilized Wood"]
Text item=TV_ArtJson
Switch item=TV_ArtJson mappings=["{\"request\":\"get_artmode_status\"}"="Get Art Status","get_content_list"="Get Art List"]
Image item=TV_ArtImage visibility=[TV_ArtImage!=NULL]

Download link org.openhab.binding.samsungtv-3.2.0-SNAPSHOT.jar

1 Like

Kudos for taking your time with the binding!

In the log files I saw everything popping in. However I added it via .things file and now I can’t get it to work again.

In the log it says:

2021-12-08 21:39:46.983 [DEBUG] [tv.internal.protocol.WebSocketRemote] - Remote channel connected. Token = 12345678
2021-12-08 21:39:46.984 [DEBUG] [ngtv.internal.protocol.WebSocketBase] - 192.168.xx.xx: WebSocketArt connection error
2021-12-08 21:39:46.985 [DEBUG] [ngtv.internal.protocol.WebSocketBase] - 192.168.xx.xx: WebSocketV2 connection established: 192.168.xx.xx
2021-12-08 21:39:46.998 [DEBUG] [tv.internal.handler.SamsungTvHandler] - 192.168.xx.xx: Updated Configuration webSocketToken:123456
2021-12-08 21:39:46.999 [DEBUG] [ngtv.internal.protocol.WebSocketBase] - 192.168.xx.xx: WebSocketArt connecting to: wss://192.168.xx.xx:8002/api/v2/channels/
2021-12-08 21:39:47.032 [DEBUG] [sungtv.internal.protocol.WebSocketV2] - 192.168.xx.xx: V2 channel connected. Token = null
2021-12-08 21:39:47.033 [DEBUG] [ngtv.internal.protocol.WebSocketBase] - 192.168.xx.xx: WebSocketArt connection established: 192.168.xx.xx
2021-12-08 21:39:47.036 [DEBUG] [tv.internal.protocol.WebSocketRemote] - Installed Apps: 111299001912 = YouTube, 3201612011287 = SVT Play, 3201711015273 = TV4 Play, 111477001080 = Smart IPTV, 3201710015016 = SmartThings, 3201710015037 = Gallery, 3201511006428 = Rakuten TV, org.tizen.browser = Internet, 20182100010 = e-Manual, 11101200001 = Netflix, 3201601007250 = Google Play TV och film, 3201512006785 = Prime Video, 3201807016597 = Apple TV, 3201909019271 = PrivacyChoices, 3201612011418 = McAfee Security for TV, 3201908019041 = Apple Music, 3201901017640 = Disney+, 3201803015944 = discovery+, 11111300404 = Viaplay, 3201606009684 = Spotify – musik och podcaster
2021-12-08 21:39:47.100 [DEBUG] [ungtv.internal.protocol.WebSocketArt] - 192.168.xx.xx: Art channel connected
2021-12-08 21:39:47.246 [DEBUG] [sungtv.internal.protocol.WebSocketV2] - 192.168.xx.xx: WebSocketV2 Error received: {"error":{"code":404,"details":"","message":"Not found error.","status":404},"id":"org.tizen.browser"} 

Only volume and power works at the moment.

Also, if I do not create my TV via the bindings file but via normal discovery… where do I fill in the PAT?
I checked the advance box, but then I only see webtoken. Nothing else

@sintei ,

That doesn’t look like the latest binding. The latest binding shows the ip address on every line. I’ll check the download link isn’t pointing to the wrong file.

Can you set your log to TRACE, and post the full log? Your internal ip addresses are of no use to anyone by the way, you don’t need to remove them.

If you use a text file for things, you have to put the PAT in the text description of the Thing. You should be able to see it in the Thing configuration under advanced though.

What year is your TV?

Log (with TRACE enabled) should look like this:

2021-12-08 17:35:30.980 [DEBUG] [covery.SamsungTvDiscoveryParticipant] - Created a DiscoveryResult for device 'QN55LS03AAFXZC' with UDN 'ea645e34-d3dd-4b9b-a246-e2947f8973d6' and properties: {hostName=}
2021-12-08 17:35:33.044 [DEBUG] [tv.internal.handler.SamsungTvHandler] - Create a Samsung TV Handler for thing 'samsungtv:tv:family_room'
2021-12-08 17:35:33.054 [DEBUG] [tv.internal.handler.SamsungTvHandler] - Initializing Samsung TV handler for uid 'samsungtv:tv:family_room'
2021-12-08 17:35:33.061 [DEBUG] [tv.internal.handler.SamsungTvHandler] - Updated artModeSupported: true and PowerState: true
2021-12-08 17:35:33.062 [DEBUG] [tv.internal.handler.SamsungTvHandler] - Check and create missing services
2021-12-08 17:35:33.063 [TRACE] [tv.internal.handler.SamsungTvHandler] - Skipping unknown service: QN55LS03AAFXZC, ScreenMirroring (adc92018-fd3b-4276-b534-19ea2d3e007a)
2021-12-08 17:35:33.063 [TRACE] [tv.internal.handler.SamsungTvHandler] - Skipping unknown service: QN55LS03AAFXZC, dialreceiver (e6b20cd8-719b-4225-81e2-897c3198068f)
2021-12-08 17:35:33.068 [TRACE] [tv.internal.handler.SamsungTvHandler] - Skipping unknown service: QN55LS03AAFXZC, IPControlServer (3469735c-b428-4bd4-ad80-49ca7c042eaf)
2021-12-08 17:35:33.071 [DEBUG] [nternal.service.MediaRendererService] - Creating a Samsung TV MediaRenderer service
2021-12-08 17:35:33.071 [DEBUG] [tv.internal.handler.SamsungTvHandler] - Started service for: QN55LS03AAFXZC, MediaRenderer (ea645e34-d3dd-4b9b-a246-e2947f8973d6)
2021-12-08 17:35:33.086 [DEBUG] [rnal.service.RemoteControllerService] - Creating a Samsung TV RemoteController service: is UPNP:false
2021-12-08 17:35:33.105 [TRACE] [l.protocol.RemoteControllerWebSocket] - openConnection()
2021-12-08 17:35:33.105 [DEBUG] [l.protocol.RemoteControllerWebSocket] - RemoteControllerWebSocket start Client
2021-12-08 17:35:33.105 [TRACE] [l.protocol.RemoteControllerWebSocket] - WebSocketClient starting
2021-12-08 17:35:33.118 [TRACE] [l.protocol.RemoteControllerWebSocket] - WebSocketClient started
2021-12-08 17:35:33.118 [TRACE] [l.protocol.RemoteControllerWebSocket] - connectWebSockets()
2021-12-08 17:35:33.120 [DEBUG] [ngtv.internal.protocol.WebSocketBase] - WebSocketRemote connecting to: wss://
2021-12-08 17:35:33.121 [TRACE] [ngtv.internal.protocol.WebSocketBase] - Connecting session Future: java.util.concurrent.CompletableFuture@463cb366[Not completed, 1 dependents]
2021-12-08 17:35:33.121 [DEBUG] [ngtv.internal.protocol.WebSocketBase] - WebSocketArt connecting to: wss://
2021-12-08 17:35:33.122 [TRACE] [ngtv.internal.protocol.WebSocketBase] - Connecting session Future: java.util.concurrent.CompletableFuture@2998136a[Not completed, 1 dependents]
2021-12-08 17:35:33.122 [DEBUG] [ngtv.internal.protocol.WebSocketBase] - WebSocketV2 connecting to: wss://
2021-12-08 17:35:33.123 [TRACE] [ngtv.internal.protocol.WebSocketBase] - Connecting session Future: java.util.concurrent.CompletableFuture@23a54a2d[Not completed, 1 dependents]
2021-12-08 17:35:33.123 [DEBUG] [tv.internal.handler.SamsungTvHandler] - Started service for: QN55LS03AAFXZC, RemoteControlReceiver ()
2021-12-08 17:35:33.127 [DEBUG] [ternal.service.SmartThingsApiService] - Creating a Samsung TV Smartthings Api service
2021-12-08 17:35:33.127 [DEBUG] [tv.internal.handler.SamsungTvHandler] - Started service for: QN55LS03AAFXZC, SmartthingsApi ()
2021-12-08 17:35:33.127 [DEBUG] [tv.internal.handler.SamsungTvHandler] - TV is online
2021-12-08 17:35:33.128 [DEBUG] [tv.internal.handler.SamsungTvHandler] - Start refresh task, interval=1000
2021-12-08 17:35:33.129 [DEBUG] [nternal.service.MediaRendererService] - Received channel: volume, command: REFRESH
2021-12-08 17:35:33.139 [DEBUG] [tv.internal.handler.SamsungTvHandler] - Received value 'volume':'21' for thing 'samsungtv:tv:family_room'
2021-12-08 17:35:33.140 [DEBUG] [nternal.service.MediaRendererService] - Received channel: mute, command: REFRESH
2021-12-08 17:35:33.154 [DEBUG] [tv.internal.handler.SamsungTvHandler] - Received value 'mute':'OFF' for thing 'samsungtv:tv:family_room'
2021-12-08 17:35:33.155 [DEBUG] [ternal.service.SmartThingsApiService] - Received channel: channel, command: REFRESH
2021-12-08 17:35:33.156 [TRACE] [ternal.service.SmartThingsApiService] - Sending
2021-12-08 17:35:33.221 [DEBUG] [ngtv.internal.protocol.WebSocketBase] - WebSocketRemote connection established:
2021-12-08 17:35:33.265 [DEBUG] [tv.internal.handler.SamsungTvHandler] - Received value 'channel':'-1' for thing 'samsungtv:tv:family_room'
2021-12-08 17:35:33.265 [DEBUG] [ternal.service.SmartThingsApiService] - Received channel: channelName, command: REFRESH
2021-12-08 17:35:33.266 [DEBUG] [tv.internal.handler.SamsungTvHandler] - Received value 'channelName':'' for thing 'samsungtv:tv:family_room'
2021-12-08 17:35:33.267 [DEBUG] [ternal.service.SmartThingsApiService] - Received channel: sourceName, command: REFRESH
2021-12-08 17:35:33.267 [DEBUG] [tv.internal.handler.SamsungTvHandler] - Received value 'sourceName':'HDMI1' for thing 'samsungtv:tv:family_room'
2021-12-08 17:35:33.269 [DEBUG] [tv.internal.handler.SamsungTvHandler] - Received value 'sourceId':'1' for thing 'samsungtv:tv:family_room'
2021-12-08 17:35:34.270 [DEBUG] [nternal.service.MediaRendererService] - Received channel: volume, command: REFRESH
2021-12-08 17:35:34.278 [TRACE] [nternal.service.MediaRendererService] - Value '21' for CurrentVolume hasn't changed, ignoring update
2021-12-08 17:35:34.279 [DEBUG] [nternal.service.MediaRendererService] - Received channel: mute, command: REFRESH
2021-12-08 17:35:34.284 [TRACE] [nternal.service.MediaRendererService] - Value 'false' for CurrentMute hasn't changed, ignoring update
2021-12-08 17:35:34.284 [DEBUG] [rnal.service.RemoteControllerService] - Received channel: sourceApp, command: REFRESH
2021-12-08 17:35:34.285 [WARN ] [l.protocol.RemoteControllerWebSocket] - Cannot retrieve current app webSocketV2 is not connected
2021-12-08 17:35:34.285 [DEBUG] [ternal.service.SmartThingsApiService] - Received channel: channel, command: REFRESH
2021-12-08 17:35:34.286 [TRACE] [ternal.service.SmartThingsApiService] - Sending
2021-12-08 17:35:34.331 [TRACE] [ngtv.internal.protocol.WebSocketBase] - WebSocketRemote: onWebSocketText: {"data":{"clients":[{"attributes":{"name":"b3BlbkhBQg==","token":"16295986"},"connectTime":1639002933227,"deviceName":"b3BlbkhBQg==","id":"46d95a0-2e5-4a60-983f-b6446fa24590","isHost":false}],"id":"46d95a0-2e5-4a60-983f-b6446fa24590"},"event":""}
2021-12-08 17:35:34.338 [DEBUG] [ngtv.internal.protocol.WebSocketBase] - WebSocketArt connection established:
2021-12-08 17:35:34.341 [DEBUG] [tv.internal.protocol.WebSocketRemote] - Remote channel connected. Token =
2021-12-08 17:35:34.342 [TRACE] [ngtv.internal.protocol.WebSocketBase] - WebSocketRemote: sendCommand: {"method":"","params":{"event":"ed.installedApp.get","to":"host"}}
2021-12-08 17:35:34.347 [DEBUG] [ngtv.internal.protocol.WebSocketBase] - WebSocketV2 connection established:
2021-12-08 17:35:34.354 [TRACE] [ngtv.internal.protocol.WebSocketBase] - WebSocketArt: onWebSocketText: {"data":{"clients":[{"attributes":{"name":null},"connectTime":1638857818901,"deviceName":"Smart Device","id":"c8d72b61-e1c7-4dea-bd2b-41f227bd366e","isHost":true},{"attributes":{"name":"b3BlbkhBQg=="},"connectTime":1639002934363,"deviceName":"b3BlbkhBQg==","id":"7eb21525-846b-4ff0-83a5-7d243f8728c","isHost":false}],"id":"7eb21525-846b-4ff0-83a5-7d243f8728c"},"event":""}
2021-12-08 17:35:34.354 [TRACE] [ngtv.internal.protocol.WebSocketBase] - WebSocketV2: onWebSocketText: {"data":{"clients":[{"attributes":{"name":"b3BlbkhBQg=="},"connectTime":1639002934371,"deviceName":"b3BlbkhBQg==","id":"efbb5964-848-4577-b6fc-b395f26f8ac0","isHost":false}],"id":"efbb5964-848-4577-b6fc-b395f26f8ac0"},"event":""}
2021-12-08 17:35:34.356 [DEBUG] [ungtv.internal.protocol.WebSocketArt] - Art channel connected
2021-12-08 17:35:34.356 [TRACE] [ngtv.internal.protocol.WebSocketBase] - WebSocketArt: onWebSocketText: {"data":null,"event":""}
2021-12-08 17:35:34.356 [DEBUG] [ungtv.internal.protocol.WebSocketArt] - Art channel ready
2021-12-08 17:35:34.358 [DEBUG] [sungtv.internal.protocol.WebSocketV2] - V2 channel connected. Token = null
2021-12-08 17:35:34.360 [TRACE] [ngtv.internal.protocol.WebSocketBase] - WebSocketArt: sendCommand: {"method":"","params":{"event":"art_app_request","to":"host","data":"{\"request\":\"get_artmode_status\",\"file_size\":0,\"id\":\"2b786d55-1f79-4cee-8a63-d8fd3ecc74fe\"}"}}
2021-12-08 17:35:34.361 [TRACE] [ngtv.internal.protocol.WebSocketBase] - WebSocketArt: sendCommand: {"method":"","params":{"event":"art_app_request","to":"host","data":"{\"request\":\"get_auto_rotation_status\",\"file_size\":0,\"id\":\"2b786d55-1f79-4cee-8a63-d8fd3ecc74fe\"}"}}
2021-12-08 17:35:34.361 [TRACE] [ngtv.internal.protocol.WebSocketBase] - WebSocketArt: sendCommand: {"method":"","params":{"event":"art_app_request","to":"host","data":"{\"request\":\"get_current_artwork\",\"file_size\":0,\"id\":\"2b786d55-1f79-4cee-8a63-d8fd3ecc74fe\"}"}}
2021-12-08 17:35:34.373 [TRACE] [ternal.service.SmartThingsApiService] - Value '-1' for channel hasn't changed, ignoring update
2021-12-08 17:35:34.373 [DEBUG] [ternal.service.SmartThingsApiService] - Received channel: channelName, command: REFRESH
2021-12-08 17:35:34.373 [TRACE] [ternal.service.SmartThingsApiService] - Value '' for channelName hasn't changed, ignoring update
2021-12-08 17:35:34.374 [DEBUG] [ternal.service.SmartThingsApiService] - Received channel: sourceName, command: REFRESH
2021-12-08 17:35:34.374 [TRACE] [ternal.service.SmartThingsApiService] - Value 'HDMI1' for sourceName hasn't changed, ignoring update
2021-12-08 17:35:34.374 [TRACE] [ternal.service.SmartThingsApiService] - Value '1' for sourceId hasn't changed, ignoring update
2021-12-08 17:35:34.390 [TRACE] [ngtv.internal.protocol.WebSocketBase] - WebSocketArt: onWebSocketText: {"data":"{\n  \"id\": \"2b786d55-1f79-4cee-8a63-d8fd3ecc74fe\",\n  \"event\": \"current_artwork\",\n  \"content_id\": \"MY_F0028\",\n  \"matte_id\": \"flexible_polar\",\n  \"portrait_matte_id\": \"flexible_polar\",\n  \"target_client_id\": \"7eb21525-846b-4ff0-83a5-7d243f8728c\"\n}","event":"d2d_service_message","from":"c8d72b61-e1c7-4dea-bd2b-41f227bd366e"}
2021-12-08 17:35:34.392 [DEBUG] [tv.internal.handler.SamsungTvHandler] - Received value 'artJson':'{ "id": "2b786d55-1f79-4cee-8a63-d8fd3ecc74fe", "event": "current_artwork", "content_id": "MY_F0028", "matte_id": "flexible_polar", "portrait_matte_id": "flexible_polar", "target_client_id": "7eb21525-846b-4ff0-83a5-7d243f8728c"}' for thing 'samsungtv:tv:family_room'
2021-12-08 17:35:34.392 [DEBUG] [tv.internal.handler.SamsungTvHandler] - Received value 'artLabel':'MY_F0028' for thing 'samsungtv:tv:family_room'
2021-12-08 17:35:34.396 [TRACE] [ngtv.internal.protocol.WebSocketBase] - WebSocketArt: sendCommand: {"method":"","params":{"event":"art_app_request","to":"host","data":"{\"request\":\"get_thumbnail\",\"content_id\":\"MY_F0028\",\"file_size\":0,\"id\":\"2b786d55-1f79-4cee-8a63-d8fd3ecc74fe\",\"conn_info\":{\"d2d_mode\":\"socket\",\"connection_id\":2705890518,\"id\":\"2b786d55-1f79-4cee-8a63-d8fd3ecc74fe\"}}"}}
2021-12-08 17:35:34.397 [TRACE] [ngtv.internal.protocol.WebSocketBase] - WebSocketArt: onWebSocketText: {"data":"{\n  \"id\": \"2b786d55-1f79-4cee-8a63-d8fd3ecc74fe\",\n  \"event\": \"artmode_status\",\n  \"value\": \"on\",\n  \"target_client_id\": \"7eb21525-846b-4ff0-83a5-7d243f8728c\"\n}","event":"d2d_service_message","from":"c8d72b61-e1c7-4dea-bd2b-41f227bd366e"}
2021-12-08 17:35:34.398 [DEBUG] [tv.internal.handler.SamsungTvHandler] - Received value 'artJson':'{ "id": "2b786d55-1f79-4cee-8a63-d8fd3ecc74fe", "event": "artmode_status", "value": "on", "target_client_id": "7eb21525-846b-4ff0-83a5-7d243f8728c"}' for thing 'samsungtv:tv:family_room'
2021-12-08 17:35:34.399 [DEBUG] [ungtv.internal.protocol.WebSocketArt] - artmode_status: on
2021-12-08 17:35:34.405 [DEBUG] [tv.internal.handler.SamsungTvHandler] - PowerState is: on


2021-12-08 17:35:34.341 [DEBUG] [tv.internal.protocol.WebSocketRemote] - Remote channel connected. Token =

Has the ip address. Also, you have a number in the Token field (I assume 12345678 is not real) - you should not have a token in this field if you have accepted the remote access on your TV. It only appears the first time you accept the remote access, and then you would get a message saying Updated configuration - which you don’t have.

So this has to be an older version of the binding. The latest one is 154k in size (aprox). I checked the link, and it seems correct. can you try downloading it again, maybe dropbox took a while to update the file.

This is a brand new OH3 openhabian with one JAR inserted in it, the one from the download link.
Nothing else is installed.
The TV was autodiscovered.
When added the TV popup was granted to allow openhab.
The TV is a 2018 modell Samsung QN65Q6FN.
If I press advanced under THINGS on the TV, it only shows webtoken. There is no place I can insert PAT.
Here is the log file with trace with openhab restarted and TV scanned/found/added.
log.txt (80.7 KB)