This is a piece of software I wrote for the ESP8266 microcontroller. It provides a web interface to a device configured in a specific way to monitor the status of an attached PC and to simulate pressing the power button on the attached machine for a short press or a long press. The long press is to be used only to shut down a system that has become unresponsive. The web functionality is intended to be used primarily for setup and monitoring purposes, with actual control to be carried out through an MQTT broker.
I wrote this software some time ago and wrote an article on The Tech Report. The source code was deleted from the site at some point, so I am posting it here.
I have not used this software in some time because the functionality can be achieved using Theo Arends' excellent Tasmota software for the ESP8266.