Add this line last in the file: hass ALL=NOPASSWD:/usr/sbin/pm-suspend, where you replace hass with the name of your user on the target, if different, and /usr/sbin/pm-suspend with the command of your choice, if different. A simple program that can send magic packets to wake up sleeping computers supporting Wake on LAN (called Wake for Ethernet network. Slightly off topic but Ive found getting wake on LAN working for a lot of PCs can be tricky. On the target, using an account with sudo access (typically your main account), sudo visudo.It is a way to turn on the computer that is at the office or at home. On my system, this is /usr/sbin/pm-suspend. Wake on Lan is one of the ways to power up the computer remotely using magic packets. First, get the full path: which pm-suspend. It generates the standard AMD Magic Packet format, optionally with a password included. ether-wake is a program that generates and transmits a Wake-On-LAN (WOL) 'Magic Packet', used for restarting machines that have been soft-powered-down (ACPI D3-warm state). Here is it pm-suspend, use poweroff to turn off the computer. This manual page documents the usage of the ether-wake command. Please note the computer you are trying to power on does not have an ip. Under the 'Recovery options' section, click the Restart now. To wake up a computer using wake on lan it must first be enabled in the BIOS settings. Click the Recovery page on the right side. On the target, we need to let the hass user execute the program needed to suspend/shut down the target computer. To enable Wake on LAN on the UEFI firmware, use these steps: Open Settings.On the server, verify that you can reach your target machine without password by ssh TARGET.Enter the password you created in step 3. On the server, transfer your public SSH key by ssh-copy-id where TARGET is your target machine’s name or IP address.If you do, you can leave out in the SSH commands below. It’s recommended using the same user name as on the server. Just press enter on all questions except password. On the target, create a new account that Home Assistant can ssh into: sudo adduser hass.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |