Samsung TV Binding (Beta)

The binding is an OH 3 binding, it does not work with OH 4.

I have updated the PR for OH 4, but it’s not released yet.

1 Like

@kl8ter What TV model?

Does the status go OFF when the TV is turned off, then two hours later switches ON then OFF again while the TV remains off - is that what you mean?

I have an older Samsung model > ten years. I’ll have a look this afternoon.
@Nicholas_Waterton

The status of the TV changes directly when it is switched on or off (e.g.: remote control)
If it stays off for 2 hours. The status changes from ON to OFF.
I don’t know if it comes from OpenHAB or from the TV. It only happens once.

Hi @Nicholas_Waterton when will be available the OH4 version? I would like to migrate everything to the new version but I miss this binding…

1 Like

@Rickytr ,

It’s actually ready to go, I just haven’t had time to post it yet, I was waiting until 4.0 was released, so I could test it out properly.

I’ll see if I can get it out this weekend.

1 Like

@Rickytr ,

The Openhab 4.0 version of the binding is released! Please see the top post for the jar/kar file.

3 Likes

Thank you very much for this great plugin!
Using it from the first release on and enjoying it since then.
Works like a charm as well on OH4.0.1 / 2018 TV.

I wonder why this binding does not replace the samsung tv binding which is bundled with openhab.

samsung_binding_log.txt (56.2 KB)
I’m having real problems getting the binding to work. I can’t seem to get the binding to request a token from the TV. I have enabled remote IP access on the TV, and can control the TV over wifi from my iphone using an app. I’m running openhab 4 on ubuntu 22.04 and have upgraded to the lastest version of the binding. I’ve attached my log file, UPNP info and api v2 info. Any suggestions?
API_v2_response.txt (1.2 KB)
UPNP_response.txt (2.9 KB)

@chris_helbren ,

I’m not sure what exactly is happening. The TV keeps cycling between on and offline.

Was the TV on when you started Openhab? That’s when the discovery happens, and you get to accept the token.

If you start OH with the TV off (the first time), it won’t work, as the binding can’t discover an off TV.

Thank you!
I stopped and restarted openhab with the TV on, the TV invited me to accept openhab as a remote control, and the binding now has a websocket token and appears to be working. Sorry if it had missed this in the earlier discussions - I had tried reinstalling the binding with the TV on but not restarting openhab.
Updated log:
samsung_log_2.txt (279.6 KB)

Glad you got it working, it’s a bit finicky with the timing.

Also not every command works with every TV, Samsung does a lot of random stuff.

Once you have added the thing from the inbox, you can try enabling the (experimental) subscription option, see if that works. It should cut down on the polling.

This is the first release of the 4.0 binding, and OH changed some stuff, so I think I have some work to do on the binding.

1 Like

It was talked about, but the OH people have a lot of processes to go through.

Thank you very much for this binding :slight_smile:.
I just set up Samsung S95B 65" OLED 2022 (amazing tv!) and here is my experience in case someone is doing the same.
I am currently running OH 3.4.4 stable, manual installation on RPi4.
For such setting the standard Samsung TV binding was not working, therefore I uninstalled it and I am trying the Beta.
One important remark is that, through the OH Market Place, OH3 installed beta 4.1.0 on my system: I do not know if that’s supposed to be so, but after installation the binding resulted as “Installed” and not as “Active”. It was not even showing up in the “add thing” page (I did install the UPnP transport as described, in case wondering). I unistalled 4.1.0 and went with the 3.3.0-SNAPSHOT.jar file just copied in \openhab\addons.
The Setting:
TCP Port: 8002
Remote Control Protocol: Secure websocket (2016 and later TV’s)
No need to set MAC.
Now it is quite working: the TV asked me to allow OH control, I can send commands to “Channel (Number)” and it works.
Unfortunately Binding Channels like “Channel name” and “Program title” still show NULL; I suppose reading strings from TV might be an incompatible feature, but that’s not much important to me.
Thanks :wink:

To be fair, I believe the status right now is that you need to rebase the branch and migrate to 4.0:

@Kai has offered a review after that. @J-N-K has offered assistance with thing updates. And I have offered regression testing with a legacy TV.

We are welcoming these improvements and looking forward to merging them into the codebase. :slight_smile:

After upgrading to OH4.0 I suspected that the binding was causing some problems, so I removed the binding and reinstalled it.

The problems were caused by a different issue.
But now, after reinstalling the Samsung Beta Binding, I have the problem, that the connect message doesn’t appear on the TV.

I have the message in the logs but no message on the TV anymore.

2023-08-21 22:04:09.831 [WARN ] [l.protocol.RemoteControllerWebSocket] - 192.168.188.24: WebSocketRemote connecting without Token, please accept the connection on the TV within 30 seconds
2023-08-21 22:04:09.821 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'samsungtv:tv:xxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxx' changed from ONLINE to UNKNOWN
2023-08-21 22:04:10.216 [WARN ] [tv.internal.protocol.WebSocketRemote] - 192.168.188.24: Remote Control is not authorized, please allow access on your TV

You may have to delete the OpenHab entry on your TV access list, and try again. You only get 30 seconds to accept before the message disappears.

Rebased and ready to merge.

Finding the right menu took a bit of time, but it works.


Here a frontail pic for the issue.
And again exact after 2 hours.

Don’t know if this works with your TV, too: How to troubleshoot the Samsung TV that keeps turning on by itself | Samsung LEVANT

I don’t use the binding but also have an older model of a Samsung TV. From to time it sounds like it is turning on and off itself within a second. As far as I remember somewhen I read that this is done to scan for its bluetooth remote control.