Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pairing works but cant send any keys #7

Closed
cgarz opened this issue Nov 12, 2019 · 2 comments
Closed

Pairing works but cant send any keys #7

cgarz opened this issue Nov 12, 2019 · 2 comments

Comments

@cgarz
Copy link

cgarz commented Nov 12, 2019

TV is a K series (UE49K5500AKXXU).

samtvcli version is v1.0.1.

Debug reads as follows:

INFO[0000] Using config file: /home/cgar/.config/samtvcli/samtvcli.yaml 
DEBU[0000] Fetch URL: http://192.168.1.101:8000/socket.io/1/?t=1573533303580 
DEBU[0000] Reading WS message...                        
DEBU[0000] Read message (type 1): `1::`                 
DEBU[0000] Got greetings from TV                        
DEBU[0000] Sending SmartView handshake...               
DEBU[0000] Sending WS message: `1::/com.samsung.companion` ... 
DEBU[0000] Reading WS message...                        
DEBU[0000] Read message (type 1): `1::/com.samsung.companion` 
DEBU[0000] SmartView handshake completed                
DEBU[0000] Reading WS message...                        
DEBU[0000] sendMessage('KEY_MUTE')                      
DEBU[0000] Sending WS message: `5::/com.samsung.companion:{"name":"callCommon","args":[{"Session_Id":1,"body":"[51, 227, 27, 153, 230, 186, 142, 253, 138, 35, 155, 147, 91, 112, 35, 205, 40, 164, 155, 63, 52, 39, 247, 108, 194, 145, 45, 190, 244, 206, 75, 234, 37, 81, 126, 23, 88, 63, 115, 156, 22, 245, 192, 215, 38, 105, 85, 160, 25, 10, 218, 165, 181, 174, 165, 84, 58, 135, 76, 235, 240, 20, 13, 83, 52, 3, 153, 202, 146, 167, 127, 21, 25, 163, 56, 182, 243, 5, 74, 104, 187, 250, 19, 36, 139, 227, 225, 171, 112, 222, 48, 236, 114, 116, 83, 198, 3, 185, 2, 16, 76, 209, 18, 241, 154, 188, 95, 159, 152, 97, 221, 189, 162, 64, 202, 28, 41, 143, 76, 82, 192, 210, 34, 7, 165, 169, 88, 83, 161, 139, 171, 20, 2, 157, 120, 127, 62, 40, 252, 155, 212, 41, 82, 224, 63, 191, 10, 124, 9, 6, 108, 34, 165, 11, 224, 18, 72, 73, 118, 51, 250, 112, 197, 218, 212, 175, 24, 121, 211, 31, 31, 213, 15, 135, 152, 121]"}]}` ... 
DEBU[0000] Read message (type 1): `5::/com.samsung.companion:{"name":"receiveCommon","args":"{\"type\":\"Buffer\",\"data\":[161,68,134,81,213,12,158,20,48,53,211,65,200,103,198,84,32,52,60,225,226,101,21,17,251,200,223,155,116,167,231,208,103,241,105,190,132,91,253,169,237,95,30,37,84,44,109,159,204,71,240,95,81,7,250,162,20,136,74,252,213,67,60,114]}"}` 
DEBU[0000] SmartView message received                   
ERRO[0000] Could not parse message: cannot parse encrypted response: json: cannot unmarshal object into Go value of type []uint8 
DEBU[0000] Reading WS message...                        
ERRO[0005] Cannot send key 'KEY_MUTE': no reply from TV
@McKael
Copy link
Owner

McKael commented Feb 16, 2020

I don't think your TV uses the same protocol, it is nor a H nor a J model.

@cgarz
Copy link
Author

cgarz commented Feb 16, 2020

Ah that's a pity. I missed that it was H/J specific. Would have been nice to have that lovely interface.
I managed to slap something together with inspiration from:
https://github.com/krzynio/python-samsung-smarttv-2016/blob/master/sstv2016.py

So now I can switch to Wii/HDMI and turn on/off by sending keys or sending a WoL packet.
I'll close this. Thanks anyway 😃

@cgarz cgarz closed this as completed Feb 16, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants