Help ! Samsung TV Bindings with >2016 Samsung TV

samsungtv
Tags: #<Tag:0x00007f1e5f63ede8>
(Jean Jacques LARIVIERE) #1

Hello, I just discovered OH2 who is really very good
I succeeded for the domotisation of my lamps and heating.
But I have a big problem to operate the addon SamsungTV: some functions are OK but it is especially the sending of keyCode that poses me problem!
I tried self discovery with PaperUI and manual declaration and I have the same problems:
I have the volume control that works without worries as well as the mute function which is also OK
the problem mainly comes from keycode and the annexes channel, channelName, sourceName, programTitle, sourceId

I have in my sitemaps:

sitemap default label=“exemple sitemap”
{
Text label=“Samsung TV” icon=“video” {
Frame label=“Samsung TV Control” {
Slider item=SamsungTV_Volume
Switch item=SamsungTV_Mute
Switch item=SamsungTV_Key_Code1 label=“Chaine +/-” icon=“text” mappings=[KEY_CHUP="+", KEY_CHDOWN="-"]
Switch item=SamsungTV_Key_Code2 label=“Volume +/-” icon=“text” mappings=[KEY_VOLUP="+", KEY_VOLDOWN="-"]
Switch item=SamsungTV_Key_Code3 label=“Mute ON/OFF” icon=“text” mappings=[KEY_MUTE=“ON”, KEY_MUTE=“OFF”]
Switch item=SamsungTV_Power label=“Power”
Text item=SamsungTV_Channel
}
}
}
In my Items
Dimmer SamsungTV_Volume "Volume " {channel=“samsungtv:tv:4dd73ea1:volume”}

Switch SamsungTV_Mute “Mute” {channel=“samsungtv:tv:4dd73ea1:mute”}

String SamsungTV_Source_Name “Nom Source” {channel=“samsungtv:tv:4dd73ea1:sourceName”}

Number SamsungTV_Channel “Numéro de Chaine” {channel=“samsungtv:tv:4dd73ea1:channel”}

String SamsungTV_Program_Name “Nom de la Chaine” {channel=“samsungtv:tv:4dd73ea1:channelName”}

String SamsungTV_Program_Title “Titre du Programme” {channel=“samsungtv:tv:4dd73ea1:programTitle”}

String SamsungTV_Key_Code “Fonction envoi Key Code” {channel=“samsungtv:tv:4dd73ea1:keyCode”}

Switch SamsungTV_Power “Power” {channel=“samsungtv:tv:4dd73ea1:power”}

My things manually (I of course erased the paperUI auto discovery)
samsungtv:tv:4dd73ea1 [ hostName=“192.168.0.45”, port=8002, refreshInterval=1000 ]

If someone has succeeded, can you give me your configuration and guide me in my quest?
thank you in advance

Sitemap

PaperUI

0 Likes

(Vincent Regaud) #2

What is your TV model?

0 Likes

(Jean Jacques LARIVIERE) #3

Thank’s for your reply, my model is
{“device”:{“FrameTVSupport”:“false”,“GamePadSupport”:“true”,“ImeSyncedSupport”:“true”,“OS”:“Tizen”,“TokenAuthSupport”:“true”,“VoiceSupport”:“true”,“countryCode”:“FR”,“description”:“Samsung DTV RCR”,“developerIP”:“192.168.0.19”,“developerMode”:“1”,“duid”:“uuid:6c84eebc-61f1-4930-be04-fa89f37a8980”,“firmwareVersion”:“Unknown”,“id”:“uuid:6c84eebc-61f1-4930-be04-fa89f37a8980”,“ip”:“192.168.0.45”,“model”:“17_KANTM_UHD_BASIC”,“modelName”:"UE75MU6105",“name”:"[TV] Samsung 6 Series (75)",“networkType”:“wired”,“resolution”:“3840x2160”,“smartHubAgreement”:“true”,“type”:“Samsung SmartTV”,“udn”:“uuid:6c84eebc-61f1-4930-be04-fa89f37a8980”,“wifiMac”:“9c:8c:6e:89:af:cf”},“id”:“uuid:6c84eebc-61f1-4930-be04-fa89f37a8980”,“isSupport”:"{“DMP_DRM_PLAYREADY”:“false”,“DMP_DRM_WIDEVINE”:“false”,“DMP_available”:“true”,“EDEN_available”:“true”,“FrameTVSupport”:“false”,“ImeSyncedSupport”:“true”,“TokenAuthSupport”:“true”,“remote_available”:“true”,“remote_fourDirections”:“true”,“remote_touchPad”:“true”,“remote_voiceControl”:“true”}\n",“name”:"[TV] Samsung 6 Series (75)",“remote”:“1.0”,“type”:“Samsung SmartTV”,“uri”:“http://192.168.0.45:8001/api/v2/",“version”:"2.0.25”}
errors are
07:13:45.890 [WARN ] [.rest.core.internal.item.ItemResource] - Received HTTP POST request at ‘items/TV_Key_Code1’ with an invalid status value ‘KEY_CHUP’.
07:13:47.807 [WARN ] [.rest.core.internal.item.ItemResource] - Received HTTP POST request at ‘items/TV_Key_Code1’ with an invalid status value ‘KEY_CHDOWN’.
07:13:48.784 [WARN ] [.rest.core.internal.item.ItemResource] - Received HTTP POST request at ‘items/TV_Key_Code2’ with an invalid status value ‘KEY_VOLUP’.
07:13:49.840 [WARN ] [.rest.core.internal.item.ItemResource] - Received HTTP POST request at ‘items/TV_Key_Code2’ with an invalid status value ‘KEY_VOLDOWN’.
07:13:51.190 [WARN ] [.rest.core.internal.item.ItemResource] - Received HTTP POST request at ‘items/TV_Key_Code3’ with an invalid status value ‘KEY_MUTE’.
07:13:52.609 [WARN ] [.rest.core.internal.item.ItemResource] - Received HTTP POST request at ‘items/TV_Key_Code3’ with an invalid status value 'KEY_MUTE’.

0 Likes

(Vincent Regaud) #4

The binding only supports C, D, E and F models. Your is an M model. as in UE75MU6105
Samsung encoded the inputs from the G model. It doesn’t seem to have been cracked yet. Sorry buddy.
Bonne chance

0 Likes

(Jean Jacques LARIVIERE) #5

I don’t understands why Volume and Mute are OK !!

0 Likes

(Vincent Regaud) #6

Me neither, but as you can see at the top of the binding documentation, not all channels work for all TVs.

0 Likes

(Pali) #7

Samsung TV binding can/will use UPnP features of the TV if they are available. Different TV models support different amount of UPnP services. One service provides volume related functionality. Binding also support remote control emulation protocol feature. Remote control emulation protocol is changed on newer models to use web socket (and encryption), which is not supported by the binding. This is the reason why volume and mute is working on your TV as binding use UPnP service for volume and mute rather than remote control emulation. There is a PR already available for web socket communication, but it’s not yet merged to master. Test version might be found some where on the forum (use search).

2 Likes

(Vincent Regaud) #8

Nice, I didn’t know this had been cracked

0 Likes

(Jean Jacques LARIVIERE) #9

82/5000

Everything works with SamsungCtl through Exe Binding I run lines like:
executeCommandLine("/usr/local/bin/samsungctl --host 192.168.0.45 --port 8002 --method websocket KEY_CHUP")
The problem with this solution is the high latency

You say <<There is a PR already available for web socket communication, but it’s not yet merged to master. Test version might be found some where on the forum (use search).>>
can you explain ““PR””
Thank’s

0 Likes

(Pali) #10

PR=Pull Request (Request to merge changes to main branch)

1 Like

(Jean Jacques LARIVIERE) #11

Thank’s
I am a new here and with the initials we do not always have the meaning

0 Likes

(Nicke) #12

To understand better.
The added websockets will hopefully fix so that a lot more models will be working.
And the PR needs to be signed off by 2 members before coming into nightly snapshots?

I found a testing file, but I don’t know if it’s the latest:
(Below is written by @arjanmels here https://github.com/openhab/openhab2-addons/pull/4169)


I uploaded the jar file here: org.openhab.binding.samsungtv-2.4.0-SNAPSHOT.jar on Google Drive.


0 Likes

(Jean Jacques LARIVIERE) #13

Thank’s i go test this …

0 Likes

(Arjan Mels) #14

The updates to support websocket still need work/cleanup before they will get merged. I haven’t gotten round to it lately, but still plan to in the coming weeks/months.

1 Like

(Nicke) #15

Just for fun, i tried the downloadable JAr and tried.
My TV recognizes it and asks for permission.
But then no websockets are created so I can only use MUTE and volume.
Looking forward to another beta when you’re up to it.

0 Likes

(Kamil Matuszczak) #16

yeah, me to;)
I downloaded new version of binding,but only mute and volume is working.
My TV UE55MU6102

0 Likes

(Kamil Matuszczak) #17

are there any news about this?

when I try to turn off TV I get:
[WARN ] [l.protocol.RemoteControllerWebSocket] - WebSocketRemote sending command while socket not connected: {"method":"ms.remote.control","params":{"DataOfCmd":"KEY_POWER","Option":"false","Cmd":"Click","TypeOfRemote":"SendRemoteKey"}}

0 Likes

(Nicke) #18

If you look at the github https://github.com/openhab/openhab2-addons/pull/4169 you see that they actually are working hard on this! Last comment from 2 days ago :slight_smile:
Cheers!

0 Likes

(Arjan Mels) #19

Pull request is merged!
I put a compiled version at: https://drive.google.com/open?id=1BAg5Xs1UtuZi61p5FpXjVJGWV31-HLK8

(You may need to install gson 2.8.5 if you are running OH2.4: use the following command in the karaf console: bundle:install http://central.maven.org/maven2/com/google/code/gson/gson/2.8.5/gson-2.8.5.jar)

Testing is welcome.

0 Likes

(Meshx86) #20

TV binding is installed, so is gson 2.8.5 as said above, i don’t get a prompt on my TV to allow openhab to control, i can read the status of volume, mute and power though.

Any ideas?

0 Likes