Shutdown windows remotely

Hi, i’ve found that my login name was just my first name. Your home folder should have the same name as your system account (C:\users).

well, my microsoft account first name and my microsoft email username differs completely from the c:\users folder name. and any combination did not resolve anything

frustrating…

aaaand, I got it working. solution:

  1. username is indeed the name of the folder within your c:\users folder
  2. Win10 Firewall needs to allow Remote Assistance and Remote Service Management

I can get this to work if I add a password for my user account on the windows computer, however, I do not want that.

I have tried

“credentials”: “user%

but this only gives “wrong user or password”

I have also tried:

“credentials”: “user

But the log then shows the prompt to enter the password for user

Does anyone know the syntax for no password ?

1 Like

I also am having issues with the user password incorrect error in log and also do not have a password.

I have the following wake on LAN configuration. It is only working if I comment out the #host parameter. If the #host is in the config, it does not wake up my computer. If not there it wakes up, but I do not see the status nor can I turn off the computer since the switch is always off (turn off part is not yet configured, planning to do it in a few days). Does anyone else have the same problem? Any idea what should I try? Thanks in advance!

Not working:

  • platform: wake_on_lan
    mac_address: !secret tankmac
    name: Tank
    broadcast_address: !secret tankip
    host: !secret tankip

Working but no status, switch always OFF:

  • platform: wake_on_lan
    mac_address: !secret tankmac
    name: Tank
    broadcast_address: !secret tankip
    #host: !secret tankip

wow, I’ve been wrestling with this for about 5 hours, gone through all the above but nothing helped,

So by chance I thought I’d try the below, seems very simple, as the above examples didn’t seem to cover shutdown, only wake up, so to get mine working I added a turn off to the switch example, now all works :slight_smile:

      - platform: wake_on_lan    
        mac_address: "AA-AA-AA-AA-AA-AA"
        name: "Laptop"
        host: 192.168.1.x
        turn_on:
          service: hassio.addon_stdin
          data:
            addon: core_rpc_shutdown
            input: laptop
        turn_off:
          service: hassio.addon_stdin
          data:
            addon: core_rpc_shutdown
            input: laptop

Hi, did you manage to do it without password? I’m at the same point as this post.

Hi,
I just set up a separate user on the pc with a password. I do not use that account for anything else and I had honestly forgotten about it until now :slight_smile: So it works flawlessly;)

Thank you, working!!

Just for all that still have problems. You will be able to wake your computer or server in shutdown mode if you follow the instruktions step by step. Most likely your problem is that you have old network drivers or the wrong once that dont have the settings needed. Or your having a firewall problem. or you have not set the register settings. But in most cases id say its your network card / drivers that dont support wol.

I’m having quite some problem to get this to work, I have installed the latest driver for my onboard ethernet port (intel 82579V) and followed the guides to enable WoL. I can in my hassio overview see when the PC is on or off but I cant turn it on or off, if I press it to turn on the slide go to on for 1 sec then back to off again. Have i missed anything?

Facing some difficulties with shutting down.
I keep getting the following error

[Info] Read alias: rolfcomputer
[Info] Shutdown rolfcomputer 192.168.1.27
Shutdown of remote machine failed
result was: WERR_CALL_NOT_IMPLEMENTED
[Error] Shutdown fails

Steps i took:

  • Registry key is created
  • Services are running
  • Firewall rules are correct (even with Firewall off it doesn’t work)
  • Correct credentials and IP are configured in the addon. (username is taken from the c:/users folder) Password has a special char in it, don’t know if that makes a difference?)
  • Restarted Windows machine and addon several times.

Running version 3.2.2 of the addon and Windows 10 on the computer.

What are you using to to make the shutdown call?

Do you have network discovery setup on your windows 10 computer? I seem to recall that I ran into an issue with that in the past.

Right now i was trying it from the service menu in Home Assistant UI. With the payload following the example found in the documentation.

@silvrr Network discovery is turned on.

where do i have to write these configurations?
is it written in automations.yaml or configuration.yaml ?

i just want to shutdown my pc remotely .

@RolfKoenders Did you get it to work? I’ve got the same problem you have. also I took the same steps you did.

Dont really know how i got this to work but i followed this thread with the registry and everything.
Also made seperate account on windows just for this.

And also did this

Disable Simple File Sharing . UNCHECK “Use simple file sharing” under My Computer > Tools > Folder Options > View.

Really dont know what that is but it worked :stuck_out_tongue: maybe just a coincidence

This is my switch and i can turn the computer on and off with it.

  - platform: wake_on_lan
    mac_address: "xx:xx:xx:xx:xx:xx"
    name: "Dator"
    host: 192.168.1.205
    turn_off:
      service: hassio.addon_stdin
      data:
        addon: core_rpc_shutdown
        input: Dator

Hi
Just to report my windows 10 firewall settings. After some experimentation, the only rule I need to allow is this one…
Remote Service Management (NP-In)


That along with the registry change is all I needed to do to allow remote shutdown.
Hope this helps
Thanks
Rob

1 Like

I finally got it to work after a couple of evenings!

Just in case someone has the same problem:
Open Regedit, and go to this path:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System
You should add this key: LocalAccountTokenFilterPolicy
But in my case there was an extra space behind the key, like this:
"LocalAccountTokenFilterPolicy "

Fixing this fixed my problem.