Samsung TV binding issues

Hello,

In the latest version (which is 2.5.1) I have major issues with samsung TV binding.
First of all it forgets the Websocket Token for my TV during restarts and loses the ability to actually control my TV.
Second of all when this happens I’m unable to change the thing’s settings (it just doesnt’t remember them - like when typing a mac address it says that setttings were saved but they are not there anymore).

From what I’ve seen this happens only when the binding forgets the Websocket Token (which is like I said during every restart off openhab2).
Curiously before the Websocket Token is forgotten the binding works fine and I can change any setting on the thing.

I have tried reinstalling multiple times as well as clearing the tmp and cache.
Is there anything else I can do? I was also considering downgrading the binding to 2.5.0 but I do not know where I can find it.

Thanks in advance for any help :wink:

Ok now suddenly it works ok after a few restarts… That is weird. But I’ll update once I’ll have it working for some time. From what I’ve noticed the binding can make the whole thing hang a bit after being working for some time. I’ll update in a few days if the problem persists.

Now the issue was most prelevant when I was shutting the service down without restarting the system. But there should be no difference between this and a regular restart right?

Do the five commands in the docs here to change OH versions.

Right but I wanted to downgrade that single binding no the whole OH :wink:

Try using the console or uninstall the binding via PaperUI and use one of the jar files here.
https://openhab.jfrog.io/openhab/libs-pullrequest-local/org/openhab/addons/bundles/org.openhab.binding.samsungtv/

Place the file in usr/share/openhab2/addons and restart OH.

Alright, thanks. Will do that but first I’ll let the original binding work for a few days now that it seems to stabilize somewhat.

Ok so it happened again. Funny enough it works ok until a restart. After that you can see that it hangs. When you try to shutdown openhab it just hangs during shutdown so it seems the binding is just hanging somewhere. I’ve tried putting the bindings in the links but none of them seems to work (openhab does not show any ability to add a samsung tv once they are put in the directory you specified).
Am I doing something wrong?

Post the output of: ls -al /usr/share/openhab2/addons

sure:

drwxr-xr-x 2 openhab openhab 4096 lut 15 12:20 .
drwxr-xr-x 4 openhab openhab 4096 sty 25 22:54 …
-rwxrwxr-- 1 openhab openhab 108165 lut 15 12:17 org.openhab.binding.samsungtv-2.5.2-SNAPSHOT.jar
-rw-r–r-- 1 openhab openhab 70 sty 12 22:53 README

Comparing your addon file to mine the only difference is the executable e.g the x’s. I have -rw-rw-r-- for the addon. Maybe the jar file should not be executable?

Have you tried using openhabian-config tool to fix permissions?

I’m running this on top of Raspbian buster unfortunately so I probably don’t have this tool.
As for the xes, I have added them later once it didn’t register… Before that it was like in your example. ;/

Openhabian-tool is very useful and you can add it (and run it, last command) with these commands:

# install git
sudo apt-get update
sudo apt-get install git

# download and link
sudo git clone https://github.com/openhab/openhabian.git /opt/openhabian
sudo ln -s /opt/openhabian/openhabian-setup.sh /usr/local/bin/openhabian-config

# execute
sudo openhabian-config

I have downgraded whole openhab to 2.5.0 (from 2.5.2). The same issue occurs. So I guess using different versions won’t help me here although this particular plugin seems kind of broken.

Perhaps openjdk is buggy? What can I do to debug the issue and maybe help with bug fixes in the plugin?

It looks like you haven’t consulted the log file.
That’s the first thing you should have done.
Put the binding into TRACE mode and let it run until you see problems.