#how to turn off computer with home assistant

1 messages · Page 1 of 1 (latest)

rose glen
#

i saw youtbe video how to send lan packets to turn on computer or turn it off? but is it safe? i am using home assistant locally just want to turn of pc using home assistant.

olive marsh
#

Depends what exactly you're asking.... safe as in others external to your network can't shutdown your PC, yes probably if you're using Home Assistant locally only as you say.

Safe as in others in your home can't turn off your computer, maybe not. All depends on how you have things configured. You'd need to give more details on what exactly you're asking about.

#

You didn't specify Windows or Linux as the target OS, but if Windows, typically there's an embedded user account password that lands in a config file, as well, which would be visible to any user w/ HA access.

#

and if Linux, likely similar but (hopefully) a private key

prisma vine
#

Wake-On-LAN to turn on a PC should be perfectly fine (provided your devce supports it). Alternatively you can attach a suitable power plug and then set the BIOS to always turn on when power is restored.

Shutting down is a bit different as you shouldn't really just turn off the power. Instead you should run a script on the machine to perform the shutdown. For Linux / Mac should be easy to do with a CommandLine / Shell script using SSH. Windows would be a bit harder although this should help https://community.home-assistant.io/t/turning-off-a-windows-pc-with-home-assistant/27970

A key thing to consider when allowing shutdown, is what the system would be doing - are there any users on the machine? Any open windows with unsaved work? etc.

rose glen