Ape / samsungctl

Remote control Samsung televisions via a TCP/IP connection
MIT License
713 stars 191 forks source link

samsung ue48h6650 not working #38

Closed micpub closed 6 years ago

micpub commented 7 years ago

tried to set-up my tv via homeassistant but got no luck, so i tried to use samsungctl directly from my pc to see whats wrong.

nmap output:

nmap -p 1-65535 192.168.99.20
Starting Nmap 7.40 ( https://nmap.org ) at 2017-05-11 11:41 CEST
Nmap scan report for 192.168.99.20
Host is up (0.0034s latency).
Not shown: 65529 closed ports
PORT      STATE SERVICE
7676/tcp  open  imqbrokerd
8000/tcp  open  http-alt
8001/tcp  open  vcom-tunnel
8080/tcp  open  http-proxy
8443/tcp  open  https-alt
15500/tcp open  unknown

looks like this tv is using 8001 (websockets) - telnet to this ip,port works. so i tried samsungctl: samsungctl --host 192.168.99.20 --method websocket KEY_MUTE (got no output on the console - so it shall be ok) but on the wireshark i see that it is not.


mypc -> tv
GET /api/v2/channels/samsung.remote.control?name=cmVtb3Rl HTTP/1.1
Upgrade: websocket
Connection: Upgrade
Host: 192.168.99.20:8001
Origin: http://192.168.99.20:8001
Sec-WebSocket-Key: u5Y00EnwvXkhM4CqnAGJVQ==
Sec-WebSocket-Version: 13

tv -> my pc
HTTP/1.1 101 Switching Protocols
Upgrade: websocket
Connection: Upgrade
Sec-WebSocket-Accept: xAXj7aiUcGOEkRzP+LaFtHVICqs=

tv->my pc(via websocket)
{"event":"ms.channel.connect","data":{"id":"43c8abe0-1ddc-11b2-8e9e-eb818775dcdb","clients":[{"id":"43c8abe0-1ddc-11b2-8e9e-eb818775dcdb","connectTime":4375967,"attributes":{"name":"cmVtb3Rl"},"isHost":false}]}}

mypc->tv (via websocket)
{"params": {"Cmd": "Click", "Option": "false", "TypeOfRemote": "SendRemoteKey", "DataOfCmd": "KEY_VOLUP"}, "method": "ms.remote.control"}

tv->mypc (via websocket)
{"event":"ms.error","data":{"message":"unrecognized method value : ms.remote.control"}}

mypc->tv (via websocket)
connection close (status code: normal closure(1000)

tv->mypc (via websocket)
connection close (status code: normal closure(1000)

got any idea what could be wrong? i have something disabled on my tv? or h series uses some different protocol? - i can test something more if needed

riemers commented 7 years ago

See also my post https://github.com/Ape/samsungctl/issues/22 , perhaps we can combine effort for @Ape to get this to work, so we can all benefit 👍

sunflowerABB commented 7 years ago

+1, i have the same problem with my UE55H7080

vsnine commented 7 years ago

UN40JU6000 is in the same boat, with the same error. I added some debug statements to remote_websocket.py. I'm having trouble finding documentation about this api.

Ape commented 6 years ago

See #22.