With me travelling a lot for work and installations, I sometimes need to access my office pc for info. Up to now I relied on my wife to start my PC whenever I needed it. Not being able to keep to office hours it happened a few times that I needed access to my PC late at night or very early in the mornings while she was sleeping, needless to say, the work had to wait.
Digging deeper and deeper into HA, I discovered a standard “wake_on_lan” switch today. Added 3 lines to my configuration.yaml file, “Enabled” my WOL setting in the BIOS and “voilà”…
# Wake Up Jaco_PC
- platform: wake_on_lan
name: "your_pc_name"
mac: "your_pc's_mac_address"
Now I can switch on my PC from anywhere anytime and thought, maybe someone else can use this as well.
I use it to turn on a PC here at home which runs my Plex server (which is set to sleep at night to save precious battery). Home Assistant automatically wakes it up again in the morning so that Plex is available if the family wants to watch something.
Little freeware program called Airytec Switchoff. It has a little webserver which you can call from Home Assistant to shut down, sleep etc. I use shell commands in Home Assistant and then the curl command in Linux:
You can then trigger it from an automation like follows:
automation:
- alias: Let ASUS sleep immediately from IOS notification
trigger:
platform: event
event_type: ios.notification_action_fired
event_data:
actionName: LET_PC_SLEEP
action:
- service: shell_command.pc_sleep
EDIT: It works really well with Jaco’s WOL recommendation – if you don’t have Solar or an inverter and you wish to shutdown a Windows PC before loadshedding, and turn it on again afterwards, you can use this