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

Can't Wake Up TV #47

Open
advokatb opened this issue Jan 22, 2019 · 7 comments
Open

Can't Wake Up TV #47

advokatb opened this issue Jan 22, 2019 · 7 comments

Comments

@advokatb
Copy link

advokatb commented Jan 22, 2019

Hi.
Trying to turn on my TV, but this command doesn't help
samsungctl --host 192.168.1.110 --port 55000 --method legacy --key KEY_POWERON

I've got

PS D:\User\.homeassistant\new\samsungctl> samsungctl --host 192.168.1.110 --port 55000 --method legacy --name remoteCmd  --key KEY_POWERON
Available keys
====================================================

Note: Key support depends on TV model.

    Power Keys
    ------------------------------------------------
        KEY_POWERON:                        Power On

How can I wake it up?
Using Windows 10.

TV Model - UE-32EH53001
TV firmware version - 002007

@kdschlosser
Copy link
Owner

some TV's support WOL (Wake On Lan) some do not.

@mikelitka
Copy link

@advokatb you can test this using the wake_on_lan.py:

python wake_on_lan.py
Enter IP address:10.99.1.139
Found MAC: 28:39:5e:4a:a5:14
Send WOL packet (Y/N)?y

My TV powers on when the magic WOL packet is sent using this module.

I have a UN50MU6300

@kdschlosser
Copy link
Owner

ty @mikelitka for mentioning that. I forgot to.

That is correct. if you run the wake_on_lan script file directly it will test the WOL functionality. to make sure there is not an issue somewhere else that is causing it to not work.

be sure to have the TV on when you start the script. when the question comes up to send the packet. then manually turn off the TV wait a minute. then say Y to send the packet.

There are some mechanics in place to obtain the MAC address of the TV that require the TV to be on initially.. this is how the library will work.

and with explaining that I believe I may have located the bug in the program code. But I need you to let me know if your TV does power on using the script directly.

@kdschlosser
Copy link
Owner

I found a problem with the WOL portion of the library. give it a try and see if it works now.

@raydog153
Copy link

@kdschlosser Would it be better to modify the WOL to allow one to input the MAC address? You cannot use the file wake_on_lan.py to test out WOL if the TV has been off for a while. If I already have the MAC address it would be nice to just input that to trigger WOL.

@kdschlosser
Copy link
Owner

I was thinking about that. I am going to modify the pairing portion of the script. because the TV needs to be on in order to pair. I will obtain the MAC address and store it in the config file. this way it never has to be entered anywhere,

I also want to take a look at the api/v2 returned JSON again. I know there is a mac address stored in there for the WiFi card ini the TV. I do not know if there is one stored in there for the Ethernet card. I have to check.

@kdschlosser
Copy link
Owner

OK the script has been updated. the MAC address is stored in the config file now. and can also be entered manually into the config when the config is initialized samsungctl.Config(mac=''). while I was at it I said to myself. let me add a little more work for me to do LOL, so I added detection of the method as well as the connection port. this process will only work if the TV is powered on when you initialize the Config class. so now the only needed thing to be passed is going to be the host (IP address) of the TV. This is going to be the best mechanism to use if you are going to save the config data. the call to loading the config data will bypass the detection process. the detection process will cause the library to take a few seconds longer to startup.

I am trying to come up with a better load process for the config class. one that is not going to require 2 different chunks of code to be written to start samsungctl.

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

4 participants