McKael / samtv

samtvcli -- Network CLI remote for Samsung TVs (models 2014-2015)
https://lilotux.net/~mikael/pub/samtv/
MIT License
40 stars 4 forks source link

Could not parse message: cannot parse encrypted response #14

Open simonwanghub opened 1 year ago

simonwanghub commented 1 year ago

First of all, thank you for your library which helped me, my TV model is UA78KU6900JXXZ, after successful pairing I tried to send the keys but it reported an error, what is the reason for this? Is it because of the failure of decryption?

(venv) samtv/samtvcli   master ±  ./samtvcli --debug --config /Users/simonwang/.config/samtvcli.yaml key send KEY_MENU INFO[0000] Using config file: /Users/simonwang/.config/samtvcli.yaml DEBU[0000] Fetch URL: http://192.168.35.116:8000/socket.io/1/?t=1687853451622 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('send')
DEBU[0000] Sending WS message: 5::/com.samsung.companion:{"name":"callCommon","args":[{"Session_Id":2,"body":"[135, 131, 149, 59, 124, 48, 134, 236, 18, 166, 239, 191, 38, 142, 236, 164, 116, 157, 146, 108, 185, 146, 120, 217, 190, 50, 25, 117, 201, 55, 215, 68, 139, 223, 35, 96, 65, 126, 134, 96, 194, 42, 192, 101, 230, 120, 176, 244, 38, 246, 73, 239, 116, 31, 87, 92, 179, 116, 106, 97, 209, 235, 164, 55, 208, 142, 184, 167, 80, 96, 83, 215, 16, 193, 114, 122, 50, 30, 54, 84, 146, 73, 24, 115, 107, 5, 116, 145, 97, 124, 152, 48, 216, 113, 241, 66, 160, 61, 94, 153, 145, 23, 20, 249, 72, 71, 65, 135, 158, 165, 186, 121, 6, 49, 237, 223, 174, 235, 10, 207, 251, 71, 188, 100, 237, 20, 164, 21, 163, 145, 129, 52, 172, 152, 173, 195, 32, 34, 186, 240, 101, 198, 95, 48, 241, 101, 119, 154, 168, 12, 13, 114, 209, 126, 185, 125, 30, 8, 77, 50, 209, 20, 198, 149, 141, 74, 241, 207, 39, 20, 180, 110, 53, 11, 73, 61]"}]} ... DEBU[0000] Read message (type 1): 5::/com.samsung.companion:{"name":"receiveCommon","args":"{\"type\":\"Buffer\",\"data\":[138,236,222,172,138,17,113,65,75,30,153,51,130,19,35,241,175,31,16,185,28,105,209,7,96,36,49,144,63,29,186,167,18,149,190,209,125,182,159,1,49,53,79,171,153,239,248,77,38,185,38,14,169,7,17,251,210,154,81,6,123,224,39,54]}"} 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 'send': no reply from TV