Samsung TV issues

Hi I’m currently on OH version 2.5.8 and have a QN65Q90. in previous OH versions (around 2.5.5/2.5.6) this binding used to work flawlessly. In the most recent version, however, I’ve encountered issues with turning the tv off. Whenever I use OH to send a power off command the tv does turn off but then it turns right back on. The logs during this are attached below. I’ve noticed that the websocketclient failure message pop up when I turn the tv off via the remote as well.

> 2020-09-01 11:00:15.961 [WARN ] [org.eclipse.jetty.io.ManagedSelector] - java.nio.channels.ClosedSelectorException
> 2020-09-01 11:00:15.961 [WARN ] [l.protocol.RemoteControllerWebSocket] - WebSocketClient failure: java.lang.InterruptedException
> 2020-09-01 11:00:15.975 [WARN ] [ngtv.internal.protocol.WebSocketBase] - WebSocketRemote sending command while socket not connected: {"method":"ms.remote.control","params":{"Cmd":"Click","DataOfCmd":"KEY_POWER","Option":"false","TypeOfRemote":"SendRemoteKey"}}
> 2020-09-01 11:00:15.975 [ERROR] [nal.common.AbstractInvocationHandler] - An error occurred while calling method 'ThingHandler.handleCommand()' on 'org.openhab.binding.samsungtv.internal.handler.SamsungTvHandler@5c89a562': null
> java.lang.NullPointerException: null
>         at org.openhab.binding.samsungtv.internal.protocol.WebSocketBase.sendCommand(WebSocketBase.java:119) ~[?:?]
>         at org.openhab.binding.samsungtv.internal.protocol.WebSocketRemote.sendKeyData(WebSocketRemote.java:224) ~[?:?]
>         at org.openhab.binding.samsungtv.internal.protocol.RemoteControllerWebSocket.sendKeyData(RemoteControllerWebSocket.java:331) ~[?:?]
>         at org.openhab.binding.samsungtv.internal.protocol.RemoteControllerWebSocket.sendKey(RemoteControllerWebSocket.java:265) ~[?:?]
>         at org.openhab.binding.samsungtv.internal.protocol.RemoteControllerWebSocket.sendKey(RemoteControllerWebSocket.java:250) ~[?:?]
>         at org.openhab.binding.samsungtv.internal.service.RemoteControllerService.sendKeyCode(RemoteControllerService.java:413) ~[?:?]
>         at org.openhab.binding.samsungtv.internal.service.RemoteControllerService.handleCommand(RemoteControllerService.java:290) ~[?:?]
>         at org.openhab.binding.samsungtv.internal.handler.SamsungTvHandler.handleCommand(SamsungTvHandler.java:122) ~[?:?]
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_265]
>         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_265]
>         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_265]
>         at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_265]
>         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.$Proxy257.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_265]
>         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_265]
>         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_265]
>         at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_265]
>         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_265]
>         at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [?:1.8.0_265]
>         at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [?:1.8.0_265]
>         at java.lang.Thread.run(Thread.java:748) [?:1.8.0_265]

As an update to this - I removed the sourceId channel link and it seeems to be cooperating a bit more. The ‘websocketclient failure’ error message has ceased as well

In case anyone finds this - I have also found that the switch channel will continually cycle to an off status and then right back on instantly while the tv is on. I use the state changes of the tv to turn a backlight on and off and i’ve found that as is that light will occasionally pulse as the tv is on because it will change to an off state even though the tv is still on / immediately switch back to on only microseconds later.