Up until recently Wake on Lan (the switch) worked perfectly, powering on my computer every single time.
After upgrading to the latest HA version (0.42.2) it’s gotten wonky. The switch DOES work after restarting HA, but after a while it no longer does what it’s supposed to, despite showing the Turn On toast.
My computers mac address hasn’t changed, nor my configuration. In fact, when I’m using any other tool, like wake on lan from my phone, it works perfectly, while the WOL switch in HA fails.
The error log doesn’t show anything related to the problem, but only that it’s taking over 10 seconds to load certain components.
Restarting HA fixes the problem, but only briefly.
Is there anything I can do to remedy this, besides downgrading?
Thanks,
Zendio
Edit: HA does recognize that my computer has turned on and is pingable. Same for when it goes offline.
oh good I thought that I was crazy. My WoL stopped working as well and can’t find any errors or logs regarding why. WoL still works on my third party phone app ok and the OFF portion of the WoL works perfect… it’s just not sending the magic packet I guess.
I also have the same issue since upgrading to 0.42.2, hopefully it’ll get fixed soon. Having to physically find the POWER ON switch to my home server rather than just asking the Google Home has displeased the wife!!!
Thanks for this post, this looks like a great work around, however I am struggling to make the bash script executable for the homeassistant user. I have chmod -x the wol_server_on.sh however when run from homeassistant_venv it requests a password for sudo.
EDIT: I fixed it by amending your config slightly, thanks a lot for this
Hi guys, any luck? I just installed 0.43 but it’s still broken for me. It actually doesn’t found the component at all. here’s the log:
17-04-24 12:36:59 ERROR (MainThread) [homeassistant.components.switch] Error while setting up platform wake_on_lan
Traceback (most recent call last):
File "/usr/local/lib/python3.6/site-packages/homeassistant/helpers/entity_component.py", line 155, in _async_setup_platform
entity_platform.schedule_add_entities, discovery_info
File "/usr/local/Cellar/python3/3.6.1/Frameworks/Python.framework/Versions/3.6/lib/python3.6/concurrent/futures/thread.py", line 55, in run
result = self.fn(*self.args, **self.kwargs)
File "/usr/local/lib/python3.6/site-packages/homeassistant/components/switch/wake_on_lan.py", line 47, in setup_platform
off_action, broadcast_address)])
File "/usr/local/lib/python3.6/site-packages/homeassistant/components/switch/wake_on_lan.py", line 56, in __init__
from wakeonlan import wol
ModuleNotFoundError: No module named 'wakeonlan'
17-04-24 12:36:59 WARNING (MainThread) [homeassistant.setup] Setup of switch is taking over 10 seconds.