Runs a web server on a NodeMCU or similar to remote control a PC's power button. The microcontroller triggers the power button using a transistor, measures the power state by connecting to the PWR LED and provides an endpoint for the controlled device to signal SSH availability. You can configure credentials to limit access to the web page and the SSH notification endpoint.
The schematic used to wire up the NodeMCU to the motherboard can be found here. Note that some motherboards might work differently regarding internal pull-up/downs and voltages, so do some tests and measurements before using this circuit or designing your own version!
- Create the notification service file with something like nano:
sudo nano /etc/systemd/system/sshnotify.service - Copy the contents of sshnotify.service to it
- If you configured credentials for the notification service (
SSH_USERandSSH_PASS), use the line withcurl --user username:passwordand replaceusernameandpasswordwith those credentials - Replace the example IP with the local IP or hostname of your microcontroller running the web server
- Enable the service with
sudo systemctl enable sshnotify
