Help ! Samsung TV Bindings with >2016 Samsung TV

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 ā€¦

I use the configuration of the BaseThingHandler: getConfig. No clue how that works internally, so I am afraid I canā€™t really follow up on this.

Hi there,
I have OH 2.5, installed the last binding and I have:
java.lang.ClassNotFoundException: org.eclipse.smarthome.io.net.http.TrustAllTrustMananger cannot be found by org.openhab.binding.samsungtv_2.5.4.202004190717

I have 3 samsung >2016 , with the 2.4 binding they didnā€™t work, as u already know.
Any hint to bypass this problem?
Thank you for everything you are doing.
Andrea

Hi,
now I Installed binding 2.5.5.
I tried both secure web socket and web socket: both fails: see log:
2020-04-20 11:46:44.436 [INFO ] [g.discovery.internal.PersistentInbox] - Added new thing ā€˜samsungtv:tv:550df167_06e9_4da5_a622_5611ad550b20ā€™ to inbox.
2020-04-20 11:47:16.168 [INFO ] [rnal.service.RemoteControllerService] - Using SecureWebSocket interface
2020-04-20 11:48:17.047 [WARN ] [l.protocol.RemoteControllerWebSocket] - WebSocketClient failure: java.lang.RuntimeException: java.lang.InterruptedException
2020-04-20 11:50:34.725 [WARN ] [tv.internal.handler.SamsungTvHandler] - Cannot send WOL packet to 192.168.1.170 MAC address unknown
2020-04-20 11:51:22.637 [INFO ] [rnal.service.RemoteControllerService] - Using WebSocket interface
2020-04-20 11:51:52.741 [WARN ] [l.protocol.RemoteControllerWebSocket] - WebSocketClient failure: java.lang.RuntimeException: java.lang.InterruptedException
2020-04-20 11:51:52.743 [WARN ] [l.protocol.RemoteControllerWebSocket] - WebSocketClient failure: java.util.concurrent.RejectedExecutionException: org.eclipse.jetty.io.ManagedSelector$$Lambda$373/677340463@2b0dedff
2020-04-20 11:51:52.743 [WARN ] [l.protocol.RemoteControllerWebSocket] - Cannot connect to websocket remote control interface: org.eclipse.jetty.io.ManagedSelector$$Lambda$373/677340463@2b0dedff

I hope it can be useful.
Andrea

Hi, i have a UE50NU7400
I have just upgraded openhab2 to 2.5.4

When i discover the TV and add as a thing, it configure automatically to the port 8002, with Secure Websocket but without the Token field filled.I cannot change any parameter and i didnā€™t get any info from it, but i receive the change (es The volume get changed via the remote and the change propagate to openhab).

If i change the Protocol to Websocket and the port to 8001, i can change TV volume and set mute via openhab but i cannot turn off and on the tv or do anything else. No data of the application running or program is sent to openhab.

The TV is connected via Wired RJ45, not wifi.

Any hint?

Little update: i uninstalled completely the samsung binding and installed from scratch.
Now the TV get founded correctly and i can do anything (volumes, keys, ecc) except turning it on from being off. From log i see that the magic packet get sent (6 or 7 times).

Any hint then on how call application (Like Netflix or Plex) from openhab?

Read the thread. Post 91

Hi,
get this error, if i search on the TV after apps:

2020-05-03 21:36:53.483 [WARN ] [tv.internal.protocol.WebSocketRemote] - WebSocketRemote: Error (java.lang.IllegalStateException: Expected BEGIN_OBJECT but was STRING at line 1 column 39 path $.data) in message: {"event":"ms.remote.imeStart","data":"input"}

com.google.gson.JsonSyntaxException: java.lang.IllegalStateException: Expected BEGIN_OBJECT but was STRING at line 1 column 39 path $.data

	at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$Adapter.read(ReflectiveTypeAdapterFactory.java:224) ~[bundleFile:?]

	at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$1.read(ReflectiveTypeAdapterFactory.java:129) ~[bundleFile:?]

	at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$Adapter.read(ReflectiveTypeAdapterFactory.java:220) ~[bundleFile:?]

	at com.google.gson.Gson.fromJson(Gson.java:888) ~[bundleFile:?]

	at com.google.gson.Gson.fromJson(Gson.java:853) ~[bundleFile:?]

	at com.google.gson.Gson.fromJson(Gson.java:802) ~[bundleFile:?]

	at com.google.gson.Gson.fromJson(Gson.java:774) ~[bundleFile:?]

	at org.openhab.binding.samsungtv.internal.protocol.WebSocketRemote.onWebSocketText(WebSocketRemote.java:94) [bundleFile:?]

	at org.eclipse.jetty.websocket.common.events.JettyListenerEventDriver.onTextMessage(JettyListenerEventDriver.java:231) [bundleFile:9.4.20.v20190813]

	at org.eclipse.jetty.websocket.common.message.SimpleTextMessage.messageComplete(SimpleTextMessage.java:69) [bundleFile:9.4.20.v20190813]

	at org.eclipse.jetty.websocket.common.events.AbstractEventDriver.appendMessage(AbstractEventDriver.java:65) [bundleFile:9.4.20.v20190813]

	at org.eclipse.jetty.websocket.common.events.JettyListenerEventDriver.onTextFrame(JettyListenerEventDriver.java:179) [bundleFile:9.4.20.v20190813]

	at org.eclipse.jetty.websocket.common.events.AbstractEventDriver.incomingFrame(AbstractEventDriver.java:150) [bundleFile:9.4.20.v20190813]

	at org.eclipse.jetty.websocket.common.WebSocketSession.incomingFrame(WebSocketSession.java:321) [bundleFile:9.4.20.v20190813]

	at org.eclipse.jetty.websocket.common.extensions.ExtensionStack.incomingFrame(ExtensionStack.java:202) [bundleFile:9.4.20.v20190813]

	at org.eclipse.jetty.websocket.common.Parser.notifyFrame(Parser.java:226) [bundleFile:9.4.20.v20190813]

	at org.eclipse.jetty.websocket.common.Parser.parseSingleFrame(Parser.java:262) [bundleFile:9.4.20.v20190813]

	at org.eclipse.jetty.websocket.common.io.AbstractWebSocketConnection.readParse(AbstractWebSocketConnection.java:582) [bundleFile:9.4.20.v20190813]

	at org.eclipse.jetty.websocket.common.io.AbstractWebSocketConnection.onFillable(AbstractWebSocketConnection.java:441) [bundleFile:9.4.20.v20190813]

	at org.eclipse.jetty.websocket.common.io.AbstractWebSocketConnection.onFillable(AbstractWebSocketConnection.java:428) [bundleFile:9.4.20.v20190813]

	at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:311) [bundleFile:9.4.20.v20190813]

	at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:103) [bundleFile:9.4.20.v20190813]

	at org.eclipse.jetty.io.ChannelEndPoint$2.run(ChannelEndPoint.java:117) [bundleFile:9.4.20.v20190813]

	at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.runTask(EatWhatYouKill.java:336) [bundleFile:9.4.20.v20190813]

	at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.doProduce(EatWhatYouKill.java:313) [bundleFile:9.4.20.v20190813]

	at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.tryProduce(EatWhatYouKill.java:171) [bundleFile:9.4.20.v20190813]

	at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.run(EatWhatYouKill.java:129) [bundleFile:9.4.20.v20190813]

	at org.eclipse.jetty.util.thread.ReservedThreadExecutor$ReservedThread.run(ReservedThreadExecutor.java:367) [bundleFile:9.4.20.v20190813]

	at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:782) [bundleFile:9.4.20.v20190813]

	at org.eclipse.jetty.util.thread.QueuedThreadPool$Runner.run(QueuedThreadPool.java:918) [bundleFile:9.4.20.v20190813]

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

Caused by: java.lang.IllegalStateException: Expected BEGIN_OBJECT but was STRING at line 1 column 39 path $.data

	at com.google.gson.stream.JsonReader.beginObject(JsonReader.java:385) ~[bundleFile:?]

	at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$Adapter.read(ReflectiveTypeAdapterFactory.java:213) ~[bundleFile:?]

	... 30 more

WebSocket is connected but after this i get the warning:

[WARN ] [l.protocol.RemoteControllerWebSocket] - Cannot retrieve current app webSocketV2 is not connected

The only thing that works is the Power Switch.

Can someone help??
Greettings,
Markus

Hi Guys

I wanted to report that after restarting Openhab 2.5.4 running on Windows 10 I have to remove the Samsung TV binding restart again & re install it in order to keep it working.

For me I only use it to detect when the TV(s) is turned on & off to control other lights in the room which works perfectly except after I have restarted Openhab.

I had similiar issues with the updated SamsungTV binding from this GitHub version. I rolled back to 2.4 RC1.

Best, Jay

Hi @jwiseman,
I suffer this bug with my samsung TV (I really need to get it working because we heavy rely on rules I created to manage TV for kids),
Where do I find the 2.4 RC1 version of the binding? Does it work with openhab 2.5.4 ? What version of JuPnP is suggested?

Thank you very much

https://openhab.jfrog.io/openhab/webapp/#/home
Search using this --> * samsungtv-2.4.0.RC1 * <-- remove the spaces before/after the *'s

Iā€™m running jupnp 2.5.2, Iā€™m assuming the version your running will work fine.

Keep in mind, basic functionality is with 2.4 RC1 based on the model of your SamsungTV.

Best, Jay

1 Like

Iā€™m running openHAB 2.5.5 stable, assuming that Binding is also on v2.5.5? So is there a difference/enhancement to use 2.4 RC1 ???

And apologies for stupid question, do I have to install kind of jupnp in addition to binding??

Rgds,
Joerg

Yes, lots of differences between the two version. The 2.4 is stable but doesnā€™t have all the functionality of the 2.5.x version. You would just uninstall Samsung 2.5.x and drop the 2.4.0 RC1 into the Addonā€™s directory.

No, you donā€™t need to change the jupnp versions.

Best, Jay

Hi Jay,
thanks for swift feedback. I donā€™t have anything specific installed and just imagine if my system would be run[quote=ā€œjwiseman, post:118, topic:67053ā€]
and drop the 2.4.0 RC1
[/quote]

Before this I shall be able to find this on frog-repository :-/ but Iā€™m not. Neither package nor quick search or any other brings this one up :-/ HAs it been moved, or do I make something wrong in my search?? I looked for samsungtv-2.4.0.RC1, just as descibed above

Solved, got it. Wasnā€™t clear to me that I had to include *'s :wink:

1 Like

:-/ Same behavior => online for few minutes, then going offline.

btw: this version of binding is from 2018 already??

rgds
int5749

1 Like

Did you solve this?
I have the exact same problem and it seems that it is the slash that causes problems.
Try the URL without any slashes ā€œ192.168.1.134:81ā€
It doesnā€™t solve the problem but it isolates it :slight_smile:
Any URL with slashes causes my TV to do a google search where the slash has an backslash before.
Example:
ā€œ192.168.2.134:81/ui3.htmā€ will generate the same OH-error log message as you got and the TV will open a browser for the address ā€œ192.168.2.134:81/ui3.htmā€

The binding is also going offline, but thats another problem :slight_smile: