This project provides a simple web-based Wake-on-LAN (WOL) controller to remotely wake up your computer. It is implemented using the ESPAsyncWebServer library on an ESP32 or ESP8266 microcontroller.
- Web interface for triggering Wake-on-LAN.
- Basic authentication to secure the controller access.
- Reconnects to WiFi if the connection is lost.
Before you begin, ensure you have the following:
- Arduino IDE installed.
- ESPAsyncWebServer library installed.
- WiFi and Wake-on-LAN credentials (SSID, password, and MAC address).
- Clone or download the project.
- Open the Arduino IDE.
- Install the required libraries (
IPAddress,ESPAsyncWebServer,WiFi,WiFiUdp,WakeOnLan). - Replace placeholders in the code with your WiFi and Wake-on-LAN credentials.
const char* ssid = "Your-SSID";
const char* password = "Your-WiFi-Password";
const char* MACAddress = "Your-Computer-MAC-Address";
const char* http_username = "Your-Username";
const char* http_password = "Your-Password";- Set the static IP address for your ESP device if needed:
IPAddress staticIP(192, 168, 1, 155);
IPAddress gateway(192, 168, 1, 1);
IPAddress subnet(255, 255, 255, 0);
WiFi.config(staticIP, gateway, subnet);- Upload the code to your ESP device.
- Power up your ESP device.
- Connect to the WiFi network.
- Open a web browser and navigate to the IP address displayed in the Serial Monitor.
- Log in using the specified username and password.
- Click the "Wake On LAN" button to remotely wake up your computer.
- Check the status or go back to the home page.
- You can customize the HTML and CSS in the code to match your preferences.
- Adjust the check interval in the
loopfunction for WiFi reconnection.
const unsigned long checkInterval = 300000; // Check every 5 minutesThis project is licensed under the MIT License - see the LICENSE file for details.
Feel free to contribute, report issues, or suggest improvements!