WOL: Windows 10 Not Working

Hey All,

I can’t for the life of me figure out why my wake on lan is not longer working. Figured it’s time to ask the experts as I have exhausted everything I can think of.

I originally had this working without issue. Only thing that has been updated is HASS to the latest version as i was a few revisions off. I have checked my network adapter settings and those are all checked for the wake on lan settings (see below).

wol1wol2

Below is my code for The switch and shell command:

Switch:

    - platform: wake_on_lan
      name: Computer
      mac_address: "xx-xx-xx-xx-xx-xx"
      host: 192.168.x.xxx
      turn_off:
       service: shell_command.pcoff

Shell Command:

pcoff: "net rpc shutdown -I 192.168.x.xxx -U redacted%redacted"

Frontend:

wol3

I have confirmed the following:

  • User matches what is seen in C:\Users
  • IP Address is correct
  • BIOS settings are set to allow wake on lan
  • Frontend switch toggles correctly when computer is on and off
  • Alexa voice does not work turning on computer
  • Frontend toggle does not work turning on computer

Any help would be appreciated,

Thanks Guys

Anything in the logs?

Have you tried the WOL function from another computer? Their are utilities available to test from both Windows and Linux machines. WOL is a finicky beast in my experience best to confirm WOL works from another machine before you chase your tail for to long in HA.

UPDATE:
Finally had a chance to figure this out. I had updated my BIOS as well as NIC, Audio etc. When I did this all my settings were set back to default. All my NIC Power on options were disabled and had to re-enable them.

I have an ASUS (UEFI) BIOS so anyone that is possibly looking for a solution, here is what I did:

BIOS:

  1. Go to Advanced > APM Configuration > Power On By PCI-E > Enabled (also could read ACPI instead of APM)
  2. Advanced > Network Stack Conf. > Network Stack > Enabled
  3. Advanced > Network Stack Conf. > Network Stack > Ipv4/IPv6 > Enabled

Windows:

  1. In Control Panel, open the Power Options item.
  2. Click the Choose what the power buttons do link.
  3. Clear the Turn on fast startup (recommended) check box (you might need to click “Change settings that are currently unavailable”) first to enable it
  4. Click Save Settings.
  5. Lastly, go to your NIC settings and select the Power Management tab, select all boxes that have to do with WOL. Also, on the Advanced tab, check the Wake On Magic Packet if you have it. Mine did not but I did check the Wait for Link option.

Good Luck

1 Like

I’m trying to do the same but I can’t tour off the pc, do you run a command shell from raspberry to windows?

Also where you write redacted%redacted is username%password?
I am on Ubuntu 18.04 whit hass.io, I can use your code to make it work?
Thanks

If your using hassio this addon works great. Hassio doesn’t work with the shell command.

See below for how to integrate into your WOL switch.
https://github.com/SilvrrGIT/HomeAssistant/blob/master/switches.yaml#L253

Thanks very much. But how do i implement this part? Do i have to put it in the configuration.yaml or some other part? I’m new to hassio i’m still learning how to do stuff.

Go to the hassio menu on the left of your frontend screen. Click add-on store, find rpcshutdown, add your configuration after it installs and start the add-on.

Thanks, you are very kind and helpfull :slight_smile:

Config WOL
#Wake on LAN
switch:
  - platform: wake_on_lan
    mac_address: "9A:1B:W4:6F:A8:0I"
    name: Pc Fisso
    host: "192.168.1.37"
    turn_off:
     service: hassio.addon_stdin
     data:
      addon: core_rpc_shutdown
      input: fisso
ADD ON
{
  "computers": [
    {
      "alias": "fisso",
      "address": "192.168.1.37",
      "credentials": "user%pass"
    }
  ]
}

i’ve added to my conf.yaml and the add on but the shutdown still doesn’t work, the switch on the home go up for 2 second tourn on my pc end then go down, is like if it can’t see if the pc is on or off
thanks for the help

Do you have network discovery enabled? I seem to recall after a network change I defaulted to a public network on a machine and lost the ability to see if it was on. Changing it to a home network and allowing network discovery resolved the issue.

See the note at the bottom of the rpc shutdown page. Do some google searching on how to allow remote shutdown, by default, it won’t work.

yes, i aldready had enable that but still dosen’t see it

switch:
  - platform: wake_on_lan
    mac_address: "AA-BB-CC-DD-EE-FF"
    name: Pc Fisso
    host: 192.168.x.x
    turn_off:
       service: hassio.addon_stdin
       data:
           addon: core_rpc_shutdown
           input: fisso

resolved, now it all work. The network discovery work aswell