Wol: Wake up your devices with a single command or click
github.com
github.com
* The target device might have to be on Ethernet, not WiFi.
* You might have to enable this feature on the target device, such as in the motherboard firmware setup for onboard network interfaces, and/or in the host OS. (I had a machine that required doing both, for an onboard Ethernet device.) For Linux host OS, such as on Debian Stable, if the device doesn't default to wake-on-LAN enabled, you'll probably use `ethtool`, testing it with something like the following, and then have to put the last line as an init/systemd script, so that enabling persists across boots.
ip a
sudo ethtool MYDEVICE
sudo ethtool -s MYDEVICE wol g
* You need to get the magic packet onto the right LAN. Maybe this means plugged into the same network switch or routed LAN, but it can get more complicated, even with small home WiFi routers, various ways. (Including if you're on WiFi but the target is not, or you're on a different VLAN, or it's isolating LAN devices from each other in the WiFi device or router, or any of multiple kinds of 'firewall' filtering is between you.)* There are many ways to send the magic packet. Lately, I `apt install etherwake` on a host that's on the same LAN, or even the equivalent on a router once.
* From there, if the sending device has multiple network interfaces or VLANs, you might have to tell the program which to send the packet on.
* I sometimes make pairs of one-line scripts named `start-`<hostname> (which does Wake-on-LAN, possibly by SSH into a jump box of some kind) and `stop-`<hostname> (which does something like SSH to invoke `shutdown`). Kludgey, but they pretty much always work.
This doesn't feel very optimal though. Having a whole other device constantly running just to wake up my main device feels like a waste.
One thing I just thought to try is using an app on my phone to send the WOL packet.
Edit - the other thing that came to mind was to look into HDMI cec and see if there's a setup where turning on your tv will turn on the PC automatically.
Edit 2 - if you go with an app, you could use something like tasker and then you can have different triggers like your phone tapping an nfc sticker (then you don't have to unlock and find an app).
Indeed, my first thought is the best place to run this is on an OpenWRT router. Perhaps as a package, or a builtin feature?
Alternatively, maybe there are adapters for HDMI that could add/emulate it/something similar?
That would be the ideal way if it worked though
For example:
> The PulseEight USB-CEC adapter works by passively extending all the pins of the HDMI connector on from the "PC side" connector to the "TV side" connector, save for the CEC pin, which is intercepted. The data going through that pin is instead exposed over a USB serial interface to let a PC control and monitor CEC traffic
Edit: Ah, but that adapter wouldn't work for powering on the PC I suppose, I don't think USB has something like WoL.
1. radio remote with usb dongle that emulates a keyboard, so usual wake-on-keypress wakes up the machine
2. systemd unit that when sleep ends sends "power on" to TV via IR blaster
works lovelyYou might have to explicitly enable "allow this device to wake computer" in device manager.
As far as I'm aware, there's no special sauce here. Your motherboard should support leaving USB ports on and allowing wake from USB HID devices. I don't know of any consumer board from the modern era that doesn't support it.
Beyond that, you could just throw a relay across the power switch pins. Plenty of ways to skin this cat
I use a cheap smart plug and PC auto start on power setting and it works beautifully.
Downside: unencrypted magic packets sent over the network could be captured and maliciously repeated for your annoyance.