Closed AngelofromTurin closed 4 years ago
I was just wondering the same thing.
Are you on Windows? I'm on Hassio too.
Try this :
Copy the "samsungtv_encrypted" folder on the Desktop of your Windows computer.
run cmd on Windows
change directory to "samsungtv_encrypted" (for me : cd C:\Users\Marc\Desktop\samsungtv_encrypted )
then : get_token.py --ip XXX.XXX.XXX.XXX --port 8080 (change to your TV's IP. For me : get_token.py --ip 192.168.1.22 --port 8080)
Wait few seconds, and normally your TV will prompt a code. Enter this code in the cmd terminal.
You need to pick up "ctx" situated in the end (it's the token)
For the "session_id", pick up "id" or enter this address in your favourite browser : http://192.168.1.22:8001/api/v2/ (=> change for your TV's IP address) ...and pick up "id" or "duid" (same)
Good luck guys
As @Quintus-s said, it is better to copy the samsungtv_encrypted folder to a Windows Operative System.
Same as https://github.com/sermayoral/ha-samsungtv-encrypted/issues/19
For Windows, 1) install https://www.python.org/downloads/release/python-391/ (Me = C:\Users\nicol\OneDrive\Bureau\ha-samsungtv-encrypted-master\custom_components\samsungtv_encrypted>C:\Users\nicol\AppData\Local\Programs\Python\Python39\Scripts) 2) (folder install python)\pip.exe install pycryptodome 3) (folder install python)\pip.exe install requests 4) (folder install python)\pip.exe install websocket_client
5) get_token.py --ip XXX.XXX.XXX.XXX --port 8080
Use get_token.py to get your Samsung TV token (use --port 8080). Store TOKEN (CTX) and SESSION_ID output. Your TV must be turned on and connected to Internet with the specific IP. Terminal where you have executed get_token.py will ask for a PIN, that will be showed in your TV screen.
sorry, im on hassio, how can use get_token.py? thankyou