Help ! Samsung TV Bindings with >2016 Samsung TV

Please be aware there are some fundamental issues with this binding and jUpNp. It was taking down my Sonos devices for over a year until we figure out it was the SamsungTV binding.

Here’s the active debug on it right now.

Best, Jay

Hi All,
to echo previous comments, I observe lost of reliability in binding 2.5.2. What I found too is that in the jsondb file I have settings:

          "protocol": "None",
          "port": 55000,

whereas if I click on the thing settings for some reason it forces in the GUI Websocket (2016 and above) and port change 8001. Pressing OK often (not every time) breaks the thing but I didn’t see it written to the jsondb file which I intended to change as some of the guys suggested above (any I was surprised it didn’t change). Any try in the GUI of changing from Websocket/8001 to None port 55000 is unsuccessful, it still displays the same

Losing the token is driving me nuts. I find that I can keep it working… but every time openhab restarts I have to be near the TV to accept the “new” connection with the remote. None of the settings in the TV allow for and always allow type connection.

Hopefully @arjanmels is able to take a look at this when he has some time.

Otherwise the binding seems to work well.

I found out that i had some old WOL items for my samsung tv and some old rules etc.
Because they where wrong and not working it destroyed some ports or something with the samsung and tradfri binding. After i removed al those wrong items it works like it should.

Besides that the samsung binding is still very rocky and not stable at all.
Its better with the 2.5 update then before but still not stable enough to use easily.

hi

how can i launch apps like netflix or yourube with this binding?
it’s working fine but i cannot find any command …

Hi @morph166955

Any chance you have the app ID number for Disney+? Similar to the ones I have extracted from your posts.

Many thanks!

curl -X POST http://192.168.1.145:8001/api/v2/applications/3201512006963 (Plex)
curl -X POST http://192.168.1.145:8001/api/v2/applications/3201512006785 (Prime)

1 Like

I just revisited the binding capabilities after running it more or less unattended for some time. I think a main problem is lack of documention rather than lack of things to work, or rather the combination of this: which features work and which ones do not, and, which models is functionality eventually limited to.
And I believe this is something this community can help to enhance better than the developers themselves can do. Any developer usually has “his” TV to develop against, but has no means of testing interoperability of his works with other models at large nor a comprehensive view on all the possibilities available in the API. But that’s what a joint community effort can deliver.
So I would like to encourage everyone of you to follow this thread to help with testing and documenting. Note to contribute knowledge is as easy as posting it here, it does not have to be comprehensive statements. I guess that’s what most people believe - but every reliable piece of information will help with slowly improving things.
You as users can also (in)validate, enhance or expand the official (samsungtv binding) documentation. There’s a link at the bottom of each docs page you just need to follow.

As to my own contribution, I’m starting with the basics. To be more precise, as basic stuff like on/off is working, first thing I tried was to check through all channels that the current binding’s doc page advertises to be supported, including not-as-often-used features such as switching color temperature.

First 2 attempts were pretty demotivating right away:

2020-04-08 12:29:56.969 [WARN ] [tv.internal.handler.SamsungTvHandler] - Channel 'samsungtv:tv:69166696_9325_4504_b659_af4fe77d4843:sharpness' not supported
2020-04-08 12:30:06.308 [WARN ] [tv.internal.handler.SamsungTvHandler] - Channel 'samsungtv:tv:69166696_9325_4504_b659_af4fe77d4843:contrast' not supported

Next, a .sendCommand() worked on a colorTemperature channel which according to the docs is of Number type, so I would expect that to work, but the response below shows it does not.

Has anyone encountered the same and can shed more light onto what’s supposed to work with respect to these features ? Would they need to be rewritten to become API based ? Has anyone tried using the API to change these ?

2020-04-08 11:57:54.594 [ERROR] [nal.common.AbstractInvocationHandler] - An error occurred while calling method 'ThingHandler.handleCommand()' on 'org.openhab.binding.samsungtv.internal.handler.SamsungTvHandler@195cb3c': Command '2' not supported
java.lang.NumberFormatException: Command '2' not supported
        at org.openhab.binding.samsungtv.internal.service.MediaRendererService.setColorTemperature(MediaRendererService.java:330) ~[?:?]
        at org.openhab.binding.samsungtv.internal.service.MediaRendererService.handleCommand(MediaRendererService.java:163) ~[?:?]
        at org.openhab.binding.samsungtv.internal.handler.SamsungTvHandler.handleCommand(SamsungTvHandler.java:117) ~[?:?]
        at sun.reflect.GeneratedMethodAccessor4721.invoke(Unknown Source) ~[?:?]
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_222]
        at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_222]
        at org.eclipse.smarthome.core.internal.common.AbstractInvocationHandler.invokeDirect(AbstractInvocationHandler.java:152) [bundleFile:?]
        at org.eclipse.smarthome.core.internal.common.InvocationHandlerSync.invoke(InvocationHandlerSync.java:59) [bundleFile:?]
        at com.sun.proxy.$Proxy132735.handleCommand(Unknown Source) [?:?]
        at org.eclipse.smarthome.core.thing.internal.profiles.ProfileCallbackImpl.handleCommand(ProfileCallbackImpl.java:74) [bundleFile:?]
        at org.eclipse.smarthome.core.thing.internal.profiles.SystemDefaultProfile.onCommandFromItem(SystemDefaultProfile.java:48) [bundleFile:?]
        at sun.reflect.GeneratedMethodAccessor4782.invoke(Unknown Source) ~[?:?]
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_222]
        at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_222]
        at org.eclipse.smarthome.core.internal.common.AbstractInvocationHandler.invokeDirect(AbstractInvocationHandler.java:152) [bundleFile:?]
        at org.eclipse.smarthome.core.internal.common.Invocation.call(Invocation.java:52) [bundleFile:?]
        at java.util.concurrent.FutureTask.run(FutureTask.java:266) [?:1.8.0_222]
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [?:1.8.0_222]
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [?:1.8.0_222]
        at java.lang.Thread.run(Thread.java:748) [?:1.8.0_222]

If anyone is still reading this I have solved it.

Hi,
I cannot connect to websocketV2 App. SAMSUNG 7 Series.
I need a connection to a Samsung account on TV or enable developer mode?
From browser link i reach …/api/V2.
The TV is asking for connection too. But after allow the connection, the error arrives.
Any ideas?
Thanks and greetings,
Markus

Hey,

Can you use terminal (Mac)/command prompt (Win)? Try the command below.

curl -X POST http://192.168.1.145:8001/ws/apps/Netflix

Samsung UE55NU7400S - 4K tv @mstormi

ON/OFF is working after i updated to 2.5 a while ago.
Mute is working also.

After reboot on raspberry i need to manually accept openhab on my samsung tv. I get a notification in my screen and i have to press ok on the tv.
After that the secure websocket works. But i have to do this every time i reboot openhab.

One other little problem is that turning the tv off and then on again does not work. It needs like 5 or 10 minutes to reset something. Not sure what that is.

On google home, with my tv connected trough smartthings it can instantly turn on and off again.

All other commands are not supported, when using things like mute or brightness i get this message:

2020-04-10 18:44:48.691 [ERROR] [nal.common.AbstractInvocationHandler] - An error occurred while calling method 'ThingHandler.handleCommand()' on 'org.openhab.binding.samsungtv.internal.handler.SamsungTvHandler@13d8eec': Command '0' not supported

java.lang.NumberFormatException: Command '0' not supported

	at org.openhab.binding.samsungtv.internal.service.MediaRendererService.setBrightness(MediaRendererService.java:282) ~[?:?]

	at org.openhab.binding.samsungtv.internal.service.MediaRendererService.handleCommand(MediaRendererService.java:154) ~[?:?]

	at org.openhab.binding.samsungtv.internal.handler.SamsungTvHandler.handleCommand(SamsungTvHandler.java:117) ~[?:?]

	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_222]

	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_222]

	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_222]

	at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_222]

	at org.eclipse.smarthome.core.internal.common.AbstractInvocationHandler.invokeDirect(AbstractInvocationHandler.java:152) [bundleFile:?]

	at org.eclipse.smarthome.core.internal.common.InvocationHandlerSync.invoke(InvocationHandlerSync.java:59) [bundleFile:?]

	at com.sun.proxy.$Proxy3418.handleCommand(Unknown Source) [?:?]

	at org.eclipse.smarthome.core.thing.internal.profiles.ProfileCallbackImpl.handleCommand(ProfileCallbackImpl.java:74) [bundleFile:?]

	at org.eclipse.smarthome.core.thing.internal.profiles.SystemDefaultProfile.onCommandFromItem(SystemDefaultProfile.java:48) [bundleFile:?]

	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_222]

	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_222]

	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_222]

	at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_222]

	at org.eclipse.smarthome.core.internal.common.AbstractInvocationHandler.invokeDirect(AbstractInvocationHandler.java:152) [bundleFile:?]

	at org.eclipse.smarthome.core.internal.common.Invocation.call(Invocation.java:52) [bundleFile:?]

	at java.util.concurrent.FutureTask.run(FutureTask.java:266) [?:1.8.0_222]

	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [?:1.8.0_222]

	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [?:1.8.0_222]

	at java.lang.Thread.run(Thread.java:748) [?:1.8.0_222]

For me this is enough, im happy on/off is working well.

I think you would need to store the token (as a thing property via PaperUI).
I don’t use the secure websocket and never needed a token to pair OH with the TV.

I’ve tried this via paperui and the .things file. It never persists unfortunately.

Hmmm, what token are we talking about. I have never seen any kind of token from my tv, just a little notification that ask if i want to accept openhab to control the tv yes or no.

I’m gonna look into it today if i find something

never used the secure variant. Possibly it’s logged when you enable DEBUG level

@Seth_K:
Yes, it works from my openhab Terminal. The TV asks again and then it starts.
Now the TV says allow a Media Decive. Out of the binding it says openhab.
Openhab is running on an Ubuntu server.
But in the logs cannot connect to webSocketV2 app.
Greetings, Markus

In paper UI there is allready a token entered. So it probably does that automatically.
So not sure what happens when rebooting. in some way it removes it i think.

But its not at all a problem for me, just know now that when i reboot i have to accept the tv notification otherwise websocket doesnt work. And i dont reboot that often.

It is indeed a security token for the websocket communication, that will be obtained automatically. It should be retained during reboots, if not the TV will ask for confirmation again.

1 Like

Hello there! I think quite a few of us have seen the token disappear on reboots, unfortunately. Do you have any idea what could be causing this? Is there any information you need to help solve this problem? Thanks for taking time to look into this!

EDIT: Now i feel dumb …
It worked with the sourceapp item by just forwarding the name as string …
Thanks mate

Hi!
It did something … My TV asked me if my mac is allowed to control. i hit yes but i am not getting netflix to run. the respond from the terminal is:

<html><body>401</body></html> **%**

What does that mean?
I own a 2019 the frame …