Closed KixMan28 closed 4 years ago
I have the same problem:
C:\b\sam>python get_token.py --ip 192.168.0.14 --port 8080
Traceback (most recent call last):
File "get_token.py", line 3, in <module>
from PySmartCrypto.pysmartcrypto import PySmartCrypto
File "C:\b\sam\PySmartCrypto\pysmartcrypto.py", line 2, in <module>
from . import crypto
File "C:\b\sam\PySmartCrypto\crypto.py", line 2, in <module>
from Crypto.Cipher import AES
ModuleNotFoundError: No module named 'Crypto'
I have tried on my raspberry pi and on my Pc (windows10), get the same error.
Hi, I'm facing the same problem as jfg31113 python3 get_token.py --ip 192.168.10.90 --port 8080
I'm running the command from the HA shell. Thanks
I have solved my problem. I did this on my Windows 10, with Python 3.8.2. I downloaded the integration ZIP file from here and I unzipped it In Windows command line (Run - cmd) I changed directory to samsungtv-encrypted and I ran the following commands:
pip install pycryptodome
To test if everything went OK (you need to wait couple of minutes before it completes):
python -m Crypto.SelfTest
pip install requests
pip install websocket_client
get_token.py
--ip XXX.XXX.XXX.XXX --port 8080
`
where I replaced XXX.XXX.XXX.XXX with my TV's IP address.
I hope I could help others.
You have to install the pycrypto module.
I have in mind executing the get_token.py in Home Assistant first time you use the custom, but I must think the best way to do it :-)
Thank you KixMan28. Get_token works with your steps.
You have to install the pycrypto module.
I have in mind executing the get_token.py in Home Assistant first time you use the custom, but I must think the best way to do it :-)
That will be great, thanks Until then I think you should update your instructions to add how to use the get_token with python for windows. For me worked fine with HU8500. It seems I only can change source, control volume and turn it off. How can I send channel up or down?
Upsss of course, now I can send any key like “KEY_CHUP”. Nice. I waited long time for this. Thank you so much sermayoral.
Upsss of course, now I can send any key like “KEY_CHUP”. Nice. I waited long time for this. Thank you so much sermayoral.
How you do that? I was looking for the same thing, but I could not find a solution. Also How can I switch on the TV?
Hi KixMan28, Just follow the instructions of the SamsungTV Custom integration. :)
OK, I will try that.
Another question: my media_player.samsung_tv_remote entity has the following attributes:
source_list:
What does this mean: "supported_features: 20285"?
OK, I will try that.
Another question: my media_player.samsung_tv_remote entity has the following attributes:
source_list:
- TV
- HDMI1
- HDMI2
- HDMI3
- SCART
- AV volume_level: 0.15 is_volume_muted: false source: HDMI1 friendly_name: Samsung TV Remote supported_features: 20285 device_class: tv
What does this mean: "supported_features: 20285"?
https://community.home-assistant.io/t/how-to-read-interpret-supported-features/114152
Hi KixMan28, Today I will explore more keys calling this Media player service. { "entity_id": "media_player.samsungtv", "media_content_type": "send_key", "media_content_id": "KEY_CODE", } But I’m particularly interested in calling the Netflix app. I think my tv don’t support calling it remotely. Anyway, I will try. All the keys are here: https://github.com/roberodin/ha-samsungtv-custom/blob/master/README.md
Hi @rpcaeiro ! Thank you for the link. I succeeded to filter out the features which are supported by my Samsung TV, which is by the way an UE40H6400AK.
I still don't get the part with the key calling. Maybe you can share with me another link where I can read more about it.
@rpcaeiro you are right, I should add the send_key functionality in the documentation. I will do it as soon as possible.
I think there is not a media_player.channel_up/down service available, Isn't it? So, the only way to change channels is invoking this service.
@KixMan28 you have to invoke the media_player.play_media with this parameters:
Hi Sergio, thank you Hi Kixman28, what Sergio posted is exactly what I’m doing to change channel or to send any remote key command supported by my TV. Should work.
@rpcaeiro please share your tests sending commands 😊. It would be very nice open Netflix or Youtube with a command, but I think its not possible... Or maybe yes...
By the way, If the custom work for you, stars in the repo are welcome... 😊
Hi Sergio, thank you Hi Kixman28, what Sergio posted is exactly what I’m doing to change channel or to send any remote key command supported by my TV. Should work.
OK, it is clear now. I will start testing my TV with these key codes. I will let you know the result.
@rpcaeiro @KixMan28 great :-)
Please guys, can you share your conclusions in https://github.com/sermayoral/ha-samsungtv-encrypted/issues/9? To let this issue for get_token.py problems...
Thanks!!
Finally got it working, but it says samsung_tv_remote
Hi jfg, Yes, that’s the default, but you can change it to whatever you want in HA.
@sermayoral, this error is still an issue https://github.com/sermayoral/ha-samsungtv-encrypted/issues/5#issuecomment-601482275 Comment #5 does not fix it for HASS OS users on Raspberry Pi. We have no way to run pip. The manifest needs to include all requirements.
You have to install the pycrypto module.
I have in mind executing the get_token.py in Home Assistant first time you use the custom, but I must think the best way to do it :-)
Hi, Please do that. I'm so noob that I cannot understand anything about Python or anything else.
I have solved my problem. I did this on my Windows 10, with Python 3.8.2. I downloaded the integration ZIP file from here and I unzipped it In Windows command line (Run - cmd) I changed directory to samsungtv-encrypted and I ran the following commands:
pip install pycryptodome
To test if everything went OK (you need to wait couple of minutes before it completes):
python -m Crypto.SelfTest
pip install requests
pip install websocket_client
get_token.py
--ip XXX.XXX.XXX.XXX --port 8080 ` where I replaced XXX.XXX.XXX.XXX with my TV's IP address.I hope I could help others.
python get_token.py --ip XXX.XXX.XXX.XXX --port 8080
I have solved my problem. I did this on my Windows 10, with Python 3.8.2. I downloaded the integration ZIP file from here and I unzipped it In Windows command line (Run - cmd) I changed directory to samsungtv-encrypted and I ran the following commands:
pip install pycryptodome
To test if everything went OK (you need to wait couple of minutes before it completes):python -m Crypto.SelfTest
pip install requests
pip install websocket_client
get_token.py
--ip XXX.XXX.XXX.XXX --port 8080 ` where I replaced XXX.XXX.XXX.XXX with my TV's IP address. I hope I could help others.python get_token.py --ip XXX.XXX.XXX.XXX --port 8080
Thanks this exactly what i needed for my UE55HU7500LXXN
someone please help me! I'm going round in circles..
I have python 2.7 in C:\Python27
I've also installed the latest version 3.9 which seems to have installed in an appdata folder called C:\Users\
Hi! I try to use your integration, but when I run the get_token.py I get the following error:
Traceback (most recent call last): File "get_token.py", line 3, in <module> from PySmartCrypto.pysmartcrypto import PySmartCrypto File "C:\samsungtv_encrypted\PySmartCrypto\pysmartcrypto.py", line 2, in <module> from . import crypto File "C:\samsungtv_encrypted\PySmartCrypto\crypto.py", line 2, in <module> from Crypto.Cipher import AES ImportError: No module named Crypto.Cipher
What I am doing wrong?