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

SamsungTV Encrypted Adventures #9

Open
sermayoral opened this issue Mar 21, 2020 · 25 comments
Open

SamsungTV Encrypted Adventures #9

sermayoral opened this issue Mar 21, 2020 · 25 comments

Comments

@sermayoral
Copy link
Owner

Please use this thread to share your experiences with this custom component, tests, etc. The goal of this thread is to avoid saturating threads of specific issues. This thread will remain open

@rpcaeiro
Copy link

Hi,
First, I did my tests on a HU8500. My goal was to find a way to automatically call Netflix app on my TV.
I couldn't find a way to call Netflix directly, however there is a way to enter into the app's menu with a KEY:
entity_id: media_player.samsung_tv_remote
media_content_id: "KEY_CONTENTS"
media_content_type: "send_key"
After you have accessed to the menu, you only need to send the ENTER key, because the first app that appears in the menu is the Netflix. However, the Netflix is there because was the last chosen. If, for instance the last accessed app on your TV was YouTube, then will fail to call Netflix, of course and will run YT instead..
So, in short, if you only use Netflix, then sending the KEY_CONTENTS followed by KEY_ENTER will do the trick for you.

I also found other alternative way to do it. In my case, I have a SetupBox from Vodafone (my TV provider) and from the TV I can control the setupbox. In that box, the Netflix is always in the same position, so I only need to call the app menu (sending the KEY_CYAN), then KEY_RIGHT and KEY_ENTER. Done, and Netflix is running.

So, on both ways I can build an automation to call Netflix using the Alexa voice command. Cool!

@sermayoral
Copy link
Owner Author

Oh, great!! I am in the first scenario, and i use Netflix and Youtube, so i can't suppose what app is the last chosen.

But it is a first step... :-)

@rosiaantje
Copy link

I can confirm the custom component working for the UE55HU7100(s). Only thing was to get the get_token.py to run.. but that was my incapability with python 😂

sermayoral added a commit that referenced this issue Mar 26, 2020
sermayoral added a commit that referenced this issue Mar 26, 2020
@sermayoral
Copy link
Owner Author

@rosiaantje thanks for your feedback. I have updated working models including yours.

I have on the to-do list improve the get_token.py, but at the moment it is something with less priority. I'm still thinking how to do it :-)

@rosiaantje
Copy link

rosiaantje commented Mar 26, 2020

@rosiaantje thanks for your feedback. I have updated working models including yours.

I have on the to-do list improve the get_token.py, but at the moment it is something with less priority. I'm still thinking how to do it :-)

@sermayoral Wow that would be nice! If you need any help. From the field of dummy testing / dummy proofing. I would be glad to help and test! I’m a field engineer by trade so used to technics and some degree of programming.. only not jet that farmiliar with python although I would love to learn more. Any way enough about that!

Keep up the good work! Love what you are doing!

@Boboman1
Copy link

I can confirm the custom component working for the UE55HU7100(s). Only thing was to get the get_token.py to run.. but that was my incapability with python 😂

Hi @rosiaantje! Can please describe the steps how you managed to get get_token.py to run? I'm trying on a Windows 10 pc with no success so far :|

@rosiaantje
Copy link

@Boboman1 . I run on Mac.. but should not matter. I installed python 3 (clean install) due to some residue of a previous install I had problems with updating pip. So had to manually uninstall pip and then manually run new version install.. after that I installed pycryptrodome and an other depending packet and was able to run it! Ps check closed issue #5 that is where I found the hurdles I had to overcome on dependicys

@memphisdj
Copy link

I own a J5500, i successfuly managed to get the token and the session id. However, i can use the vol up/down and mute buttons, they work fine, but the slider is throwing 'NoneType' object is not subscriptable, also i cannot turn the tv off with the button. The state is properly detected.

@sermayoral
Copy link
Owner Author

@aleksandrov1995 we are working on this problem in #10

@andrei4002
Copy link

not sure if it's documented somewhere, but one thing I noticed on my JU7000 is that if the TV loses power, all the sessions / tokens are invalidated (and i also think they expire eventually after a while - days, weeks, don't know exactly - even if the tv stays in standby)

@sermayoral
Copy link
Owner Author

@andrei4002 I have not had this problem, but it is possible. Well, we should indicate this in README. Thanks

sermayoral added a commit that referenced this issue Apr 2, 2020
Specify the possibility of TOKEN expiring in some TV models (#9)
@tonyp740613
Copy link

I have a UA40H5500 TV and your component is working great! I am wondering if there is a way to force refresh of the TV information or set a refresh interval?
For example when I switch on my TV only AV and TV are in the sources list. When I switch on my Android TV box on HDMI1 and my XBOX on HDMI3 then it doesn't appear in the available sources until some time later. On the TV those sources are only available if it detects that the device is active on that source input.

@tonyp740613
Copy link

Is there any way to add an apps list similar to the sources list? Allow the selection of Netflix, Youtube and other apps loaded on the TV.

Repository owner deleted a comment from tonyp740613 Apr 6, 2020
@sermayoral
Copy link
Owner Author

Is there any way to add an apps list similar to the sources list? Allow the selection of Netflix, Youtube and other apps loaded on the TV.

No, these models don't let to select app :-(

@tonyp740613
Copy link

I know you can use a URL to launch the app, is it possible to add this in some way?
http://YOUR_IP:8001/api/v2/applications/11101200001
http: // IP ADDRESS: 8080 / ws / app / Netflix

I have test the api URL and it works on the H5500

@sermayoral
Copy link
Owner Author

@tonyp740613 I'm a little busy these days, but when i have free time i will search for this :-)

BTW, PRs are welcome :-)

@omribenami
Copy link

Hu8500 works great. Extracted the token.
As for now cant call services dont know why... trying to figure it out... thank you 🙏🙏🙏

@andrei4002
Copy link

any hints on how a token/session id can be validated if they work? (trying to do some automation to at least notify me when my token expired)

also, an interesting issue i'm seeing is some request automatically being done to the TV every few seconds, and they act as if the tv is being sent the "back" command - meaning if you're in a tv menu using your remote, you get pushed back one level every few seconds

@sermayoral
Copy link
Owner Author

any hints on how a token/session id can be validated if they work? (trying to do some automation to at least notify me when my token expired)

@andrei4002 maybe you can capture a log message in order to know the token is invalid. Fortunately for me my token does not expire, so I cannot test this :-(

also, an interesting issue i'm seeing is some request automatically being done to the TV every few seconds, and they act as if the tv is being sent the "back" command - meaning if you're in a tv menu using your remote, you get pushed back one level every few seconds

Same as #4

@rschoell
Copy link

rschoell commented May 7, 2020

@sermayoral Got your plugin installed and grabbed the token from my PC. I can confirm, that I'm now able to control a UE55JU6850 partially. I'll need to modify my settings a little still. this was the first test after installation. Whats working is currently the volume up/down, mute, timeshift/pause. Not working as of first test is: there's no Source selection and the power off is not working. Shall I open another troubleshooting thread on this model? Great work!

@sermayoral
Copy link
Owner Author

@rschoell for powering off try adding the key_power_off variable with value "KEY_POWER". More info in https://github.com/sermayoral/ha-samsungtv-encrypted#custom-variables

For source selection you have to put the component logs in debug and we have to see what is your problem. Please for this use #10, all the info about it is there

@polleke69
Copy link

Ola Memphis,
I own a J6300 but cant get the stuff to work.

Would u mind sharing your configs?

@dark81
Copy link

dark81 commented Dec 7, 2021

Works well on H4500. But does not play play TTS audio. Prints error:

2021-12-07 02:29:16 ERROR (MainThread) [custom_components.samsungtv_encrypted.media_player] Unsupported media type

@epenet
Copy link

epenet commented Mar 10, 2022

Since Samsung is being discovered inside HomeAssistant core, we are getting a lot of issues with TVs not working until a custom component is installed. I have just done a huge cleanup for the "websocket" TVs, and now I think it would be good to add support for the "encrypted" TVs (at least basic support - I am leaving upnp out for now)

Are there users out there that would be willing to work with me to test it?
For now I have created a fake PR on my home-assistant-core fork : epenet/home-assistant-core#71

@sermayoral
Copy link
Owner Author

@epenet these are great news.

Of course, i can help you

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