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
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’.
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
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).
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
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?
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.
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.
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"}}
(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)
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.