Winremote is a simple windows service to remotely sleep/hibernate/restart/shutdown your Windows PC via HTTP GET request.
I have made this to make my Home Assistant able to hibernate my computer.
- Copy the executable to a safe place. E.g.:
C:\Program Files\Winremote\winremote.exe. The service will search for the exe in that path every time. .\winremote.exe install: install the service- Create a new firefall rule if enabled:
New-NetFirewallRule -DisplayName "Winremote" -Direction Inbound -Protocol TCP -LocalPort 8899 -RemoteAddress LocalSubnet -Action Allow - Start the service manually (or it will start on the next boot)
- token auth
- webserver config
https://www.home-assistant.io/integrations/wake_on_lan/#examples
switch:
- platform: wake_on_lan
name: PC
...
turn_off:
service: shell_command.hibernate_PC
shell_command:
hibernate_PC: 'curl http://192.168.0.2:8899/sleep'