I have been fighting like mad to try to get WoL to work with Home Assistant and I think I figured it out. My home assistant is configured with DuckDNS which seems to be preventing local access, thus preventing the WoL from working. I am able to WoL my computer with my TV running moonlight, but my switch on home assistant does not work.
Can someone help me configure my pc/router/HA to be able to work? Unfortunately I have to use the DuckDNS so that I can use my Alexa to control my home assistant.
I doubt that. Go to https://ha_ip_address:8123 you will have to add a security exception in your browser as the ssl cert is for the duckdns domain, not the ip address. But you should still be able to connect.
Try pinging the device you want to wake from the console in HA, if that works WoL should too.
That broadcast address is wrong.
Typically it would be 192.168.1.255 for a 192168.1.0 network with a mask of /24.
No idea what broadcast_port is, since a broadcast should go on out on all ports.
And the destination device of the magic packet must support the technology and have the feature enabled in its firmware/BIOS.
Remember that the magic packet often only can be received on a wired connect on the destination device.
Okay so I can get it to work directly after shutting the PC off (using my current config) but the NIC doesn’t stay powered long after shutdown so after that I can no longer use WoL. I check my router’s device list and the PC disappears after a while after shutdown. I have enabled wake by pci-e device in my bios and turned off every energy saving setting in windows but nothing seems to keep it powered on. I guess its a windows/bios thing and not a HA thing anymore.