Help ! Samsung TV Bindings with >2016 Samsung TV

I’m not sure what broke, but all 4 of my TV things just failed at the same time. They won’t update any state and the state of the thing is stuck in the state it was in. What can I do to provide trace/debugs? I’m on nightly 1633 right now.

For reference, when I set logs to TRACE, I get absolutely nothing other than:

2019-07-17 15:05:06.768 [DEBUG] [covery.SamsungTvDiscoveryParticipant] - Retrieved Thing UID for a Samsung TV '[TV]Living Room' model 'QN75Q75FM' thing with UDN 'REDACTED'
2019-07-17 15:05:06.768 [DEBUG] [covery.SamsungTvDiscoveryParticipant] - Created a DiscoveryResult for device 'QN75Q75FM' with UDN 'REDACTED' and properties: {hostName=REDACTED}

openhab> log:set TRACE org.openhab.binding.samsungtv
openhab> log:get | grep samsung
org.openhab.binding.samsungtv                │ TRACE

256 │ Active │  80 │ 2.5.0.201907050419    │ openHAB Add-ons :: Bundles :: SamsungTV Binding

I’ve been running the native OH 2.4 Samsung binding for quite some time. All I care about with the binding if the TV is ON or OFF due to rules firing based off that status.

Based on this new binding; anything special I need to know before I upgrade it?

Do I need 2 bindings for Samsung TV (one 2015 and below and one for 2016 and above)?

Here’s my items for my Samsung TV’s.

// Samsung TVs

Thing samsungtv:tv:livingroom				[ hostName="192.168.0.169", port=55000, refreshInterval=15 ]
Thing samsungtv:tv:parker					[ hostName="192.168.0.142", port=55000, refreshInterval=15 ]
Thing samsungtv:tv:ryan 					[ hostName="192.168.0.184", port=55000, refreshInterval=15 ]
Thing samsungtv:tv:basement 				[ hostName="192.168.0.180", port=55000, refreshInterval=15 ]
Thing samsungtv:tv:basementwired			[ hostName="192.168.0.128", port=55000, refreshInterval=15 ]
Thing samsungtv:tv:bedroom					[ hostName="192.168.0.183", port=55000, refreshInterval=15 ]
Thing samsungtv:tv:gym						[ hostName="192.168.0.176",	port=55000, refreshInterval=15 ]

Best, Jay

Hi,

There is only one binding for all Samsung TVs.

In haven’t tried manual specification like you do. It could be that you need to add a key to indicate yhe binding type legacy or websocket. As I am on holidays I cannot look up thr exact syntax.

Arjan

I migrated some weeks ago from the native one to this one. I use the same settings like you and I am also interested in the on/off status.
This is working for me for a 2012, 2013 and a 2019 QLED.

Upgraded the binding to the latest 2.5 stable build; but all my TV’s are UNKNOWN.

Do I need to connect to a different port based on newer TV’s? I don’t see the documentation online about what years should be using a different port than the 55000?

Here’s my log file . . .

2019-08-04 17:48:33.837 [INFO ] [rnal.service.RemoteControllerService] - Using None interface
2019-08-04 17:48:33.852 [INFO ] [rnal.service.RemoteControllerService] - Using None interface
2019-08-04 17:48:33.867 [INFO ] [rnal.service.RemoteControllerService] - Using None interface
2019-08-04 17:48:33.885 [INFO ] [rnal.service.RemoteControllerService] - Using None interface
2019-08-04 17:48:33.899 [INFO ] [rnal.service.RemoteControllerService] - Using None interface
2019-08-04 17:48:33.914 [INFO ] [rnal.service.RemoteControllerService] - Using None interface
2019-08-04 17:48:33.927 [INFO ] [rnal.service.RemoteControllerService] - Using None interface

Best, Jay

I’m not sure what is causing this, but it’s still happening. I believe it may be related to https://github.com/openhab/openhab2-addons/issues/5892 that I opened a month ago. If I restart the org.jupnp service it semi-fixes this but I end up having to completely restart openhab to get this stable.

EDIT: Apparently it didn’t clip my original post. I was referring to all of my TV things just ceasing to get state changes. I would believe that it’s somehow related to JuPnP. I’ve also noticed that I still get the occasional pop-up when the TV powers on that openHAB wants to connect.

@arjanmels,
I tested and can change to different HDMI (ex HDMI 1, 2, 3 or 4) with discrete IR codes.
So I think it would be plausible to do this via this binding as well via websockets.

Does the binding show everything that the TV broadcast via websockets?
Then maybe you could add that bit so we can trace it in the logs?

Or am I thinking wrong?

Using (on android) “Samsung TV remote”, there I can see all the applications that are installed. So that should also be possible.
I know you might not have the time, but I’m just asking.
I will continue to use google-foo and see if I can manage to get some information that can help.

@sintei You have keys KEY_HDMI1, KEY_HDMI2, … and should be able to switch using these.

KEY_HDMI works but toggles the different HDMIs.
But selecting a HDMI1, 2, or 3 directly does not work.

Since discrete IR codes work, I think via websocket should work as well.
Maybe the code is KEY_HDMI_1 etc.
I’ll try some different combos, but this is a needle in a haystack :slight_smile:

EDIT: Its not possible to have own combos, the binding throws error its not a key.

@arjanmels, how do you send the command, do you send it with the comman KEY_HDMI or do you send the the value that corresponds to KEY_HDMI?
If so, can you check if the value is really 1205 and 1206 for HDMI 2 respective HDMI3?
From googling this everyone is saying you can’t choose HDMI input this way, but it seems odd that it works via IR. :frowning:

" everyone is saying you can’t choose HDMI input this way" <- which way? Using 1205/1206?

Sorry for being vague :slight_smile:

What I ment with “everyone” is that all similar projects I’ve come across seems to use KEY_HDMIx but the ‘projects’ state that it does not work on all TV models.
Ex samsungctl.

I found on samsung developer site (can’t remember where) that the KEY_HDMI (etc) is represented by an ID (in this case 1205 and 1206 was hdmi2 and 3).

@sintei. The key codes are sent by their full text, e.g. KEY_HDMI1.
You may be referring to this webpage for the key values: https://developer.samsung.com/tv/develop/legacy-platform-library/API00004/AppCommon_175

I don’t use this for any of the keys, so I am afraid the TV just doesn’t support the direct selection, but I am not certain.

@sintei I happen to have the same TV as you (Q6FN) and get weird behavior from the binding with the current 2.5.0.M3 version:

  • I do not get the current app, source name etc.
  • I can turn off, but not turn on. Exception: There is a certain set of actions after which turning off does turn on the TV, e.g. if it thinks the TV is on (but failed due to wake on LAN somehow not working). If needed, I can try to explain in detail and post logs. This tells me that somehow it must be possible to turn on the TV, but the binding does not do it correctly. Also, it seems that it turns on even when not sending wake-on-lan but tries to turn off?! I am lost here.
  • Detection of power on/off works.
  • I can change the volume most of the time.

@sintei Does turning on and off work for you without hassle? Do you see similar problems?

Also I want to add that I added the MAC of the TV manually, because otherwise an error about missing MAC address appeared in the logs.

Having trouble with a 2017 UN65MU8000. I can get it’s on off status to be recognized under the thing page, but as you can see from the log, it doesn’t like my colorTemperature inputs. I can select a mapping via my iPhone & see the mapping change on PaperUI, but nothing is changing on the TV. Any ideas??? Thanks!

Here’s my item:

//Samsung TV
Number SamsungTV_ColorTemp “ColorTemp” { channel=“samsungtv:tv:colorTemperature” }

Here’s my sitemap:

   Frame label="SamsungTV_ColorTemp"
   {
       Switch item=SamsungTV_ColorTemp  icon=“tv” mappings=[0=" Day ", 1=" Cloudy ", 2=" Afternoon ", 3=" Evening ", 4=" Night "]
       Setpoint item=SamsungTV_ColorTemp minValue=0 maxValue=4 step=1
   }

Log w/ TRACE enabled:

2019-10-20 14:25:37.623 [TRACE] [nternal.service.MediaRendererService] - Value ‘0’ for CurrentVolume hasn’t changed, ignoring update
2019-10-20 14:25:37.629 [TRACE] [nternal.service.MediaRendererService] - Value ‘false’ for CurrentMute hasn’t changed, ignoring update
2019-10-20 14:25:39.329 [DEBUG] [tv.internal.handler.SamsungTvHandler] - Received channel: samsungtv:tv:d3524deb_a4a1_41eb_8ee0_d8b2d4087f77:colorTemperature, command: 4
2019-10-20 14:25:39.329 [DEBUG] [nternal.service.MediaRendererService] - Received channel: colorTemperature, command: 4
2019-10-20 14:25:39.329 [ERROR] [nal.common.AbstractInvocationHandler] - An error occurred while calling method ‘ThingHandler.handleCommand()’ on ‘org.openhab.binding.samsungtv.internal.handler.SamsungTvHandler@24982495’: Command ‘4’ not supported
java.lang.NumberFormatException: Command ‘4’ not supported
at org.openhab.binding.samsungtv.internal.service.MediaRendererService.setColorTemperature(MediaRendererService.java:325) ~[?:?]
at org.openhab.binding.samsungtv.internal.service.MediaRendererService.handleCommand(MediaRendererService.java:160) ~[?:?]
at org.openhab.binding.samsungtv.internal.handler.SamsungTvHandler.handleCommand(SamsungTvHandler.java:114) ~[?:?]

These ports are open on my TV:

modelName	"UN55MU6300"


Nmap scan report for 10.10.5.118
Host is up (0.0024s latency).
Not shown: 8281 closed ports
PORT      STATE    SERVICE
1908/tcp  filtered dawn
3740/tcp  filtered heartbeat
5339/tcp  filtered unknown
5456/tcp  filtered apc-5456
7676/tcp  open     imqbrokerd
8001/tcp  open     vcom-tunnel
8002/tcp  open     teradataordbms
8080/tcp  open     http-proxy
9119/tcp  open     mxit
9197/tcp  open     unknown
9999/tcp  open     abyss
32768/tcp open     filenet-tms
32769/tcp open     filenet-rpc
32770/tcp open     sometimes-rpc3
32771/tcp open     sometimes-rpc5
MAC Address: F8:3F:51:7C:92:94 (Samsung Electronics)

Here’s my config and it seems to be working “most” of the time.

Things:

// Samsung TVs - older models use port=55000

Thing samsungtv:tv:livingroom		        "Samsung Living Room"		[ hostName="192.168.0.169", port=55000, refreshInterval=15, macAddress="0c:89:10:1d:81:45" ]
Thing samsungtv:tv:son   			"Samsung Parker"	        [ hostName="192.168.0.142", port=55000, refreshInterval=15, macAddress="40:16:3b:22:af:96" ]
Thing samsungtv:tv:daughter 			"Samsung Ryan"			[ hostName="192.168.0.184", port=55000, refreshInterval=15, macAddress="40:16:3b:21:6d:53" ]
Thing samsungtv:tv:basement 		        "Samsung Basement WiFi"	        [ hostName="192.168.0.180", port=8002,  refreshInterval=15, macAddress="84:c0:ef:82:5a:e4" ]
Thing samsungtv:tv:basementwired	        "Samsung Basement Wired"	[ hostName="192.168.0.128", port=8002,  refreshInterval=15, macAddress="9c:8c:6e:69:b6:fe" ]
Thing samsungtv:tv:bedroom			"Samsung Master Bedroom"	[ hostName="192.168.0.183", port=55000, refreshInterval=15, macAddress="54:88:0e:2d:23:30" ]
Thing samsungtv:tv:gym				"Samsung Gym"			[ hostName="192.168.0.176", port=8002,  refreshInterval=15, macAddress="64:1c:ae:00:24:ee" ]

Logging:

2019-10-24 10:11:43.506 [INFO ] [rnal.service.RemoteControllerService] - Using None interface
2019-10-24 10:11:43.548 [INFO ] [rnal.service.RemoteControllerService] - Using None interface
2019-10-24 10:11:43.581 [INFO ] [rnal.service.RemoteControllerService] - Using WebSocket interface
2019-10-24 10:11:43.752 [INFO ] [rnal.service.RemoteControllerService] - Using None interface
2019-10-24 10:11:43.766 [INFO ] [rnal.service.RemoteControllerService] - Using SecureWebSocket interface
2019-10-24 10:11:43.902 [INFO ] [rnal.service.RemoteControllerService] - Using None interface
2019-10-24 10:11:49.052 [INFO ] [rnal.service.RemoteControllerService] - Using None interface
2019-10-24 10:11:49.066 [INFO ] [rnal.service.RemoteControllerService] - Using None interface
2019-10-24 10:11:49.099 [INFO ] [rnal.service.RemoteControllerService] - Using None interface
2019-10-24 10:11:49.113 [INFO ] [rnal.service.RemoteControllerService] - Using None interface
2019-10-24 10:11:49.132 [INFO ] [rnal.service.RemoteControllerService] - Using None interface
2019-10-24 10:11:49.153 [INFO ] [rnal.service.RemoteControllerService] - Using None interface
2019-10-24 10:11:49.172 [INFO ] [rnal.service.RemoteControllerService] - Using None interface
2019-10-24 12:59:16.120 [INFO ] [rnal.service.RemoteControllerService] - Using Legacy interface
2019-10-24 12:59:16.355 [INFO ] [rnal.service.RemoteControllerService] - Using Legacy interface

I’m only using the binding to show status of the TV on HabPanel.

Best, Jay

1 Like

@jwiseman,

What Samsung TV binding version do you use and which Java have you installed? It doesn’t work for me (author didn’t promise it to work with U and 6 generation). I do not know if samsungctl is used in this binding but that currently published version of the samsungctl is not working with Python 3.7 either.

Binding Version:

openhab> list -s | grep samsung
232 │ Active   │  80 │ 2.5.0.201908041228     │ org.openhab.binding.samsungtv

I’m using Java 8.

Let me know if I can help in any other way. I understand the frustration that happens when trying to get something to work that someone else has working.

Best, Jay

1 Like

What’s the link to the latest 2.5 jar file? Thanks!

1 Like