Skip to content

hogu-dev/diy-wol-panel-esp32

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

DIY ESP32 Wake-on-LAN Panel

A small standalone Wake-on-LAN touchscreen panel for waking computers on a local network.

This project runs on an Elecrow 5-inch ESP32-S3 HMI/CrowPanel and sends Wake-on-LAN magic packets directly from the ESP32. It does not need Home Assistant, MQTT, a backend server, a cloud service, or another always-on controller for basic wake behavior.

The current UI is a hand-coded LVGL screen with three wake buttons, Wi-Fi/IP status, ICMP reachability dots, a manual check button, and an optional dim full-screen clock mode after the idle timeout.

Hardware

Tested target:

  • Elecrow 5-inch ESP32 HMI/CrowPanel
  • ESP32-S3-WROOM-1-N4R8
  • 800x480 RGB display
  • GT911 touch controller

Other ESP32 display boards will need a different board definition and display/touch driver. The Elecrow-specific display and touch setup lives in lib/panel_driver/.

Software

Install:

  • VS Code
  • PlatformIO
  • USB serial driver for your board if your OS needs one

This project uses:

  • Arduino framework for ESP32
  • LVGL
  • LovyanGFX
  • TAMC_GT911

PlatformIO installs the listed libraries from platformio.ini.

Setup

Clone the repository:

git clone https://github.com/hogu-dev/diy-wol-panel-esp32.git
cd diy-wol-panel-esp32

Create your local Wi-Fi secrets file:

cp include/secrets.example.h include/secrets.h

Edit include/secrets.h:

#define WIFI_SSID "your-wifi-name"
#define WIFI_PASSWORD "your-wifi-password"

Optional: set your local timezone for the clock using a POSIX timezone string:

#define TIME_ZONE "PST8PDT,M3.2.0,M11.1.0"

Create your local device list:

cp include/devices.example.h include/devices.h

Edit include/devices.h with the machines you want to wake:

static DeviceConfig devices[] = {
    {"desktop", "192.168.1.20", {0x02, 0x00, 0x00, 0x00, 0x00, 0x20}, 7},
    {"server", "192.168.1.30", {0x02, 0x00, 0x00, 0x00, 0x00, 0x30}, 7},
    {"nas", "192.168.1.40", {0x02, 0x00, 0x00, 0x00, 0x00, 0x40}, 7},
};

static constexpr uint8_t deviceCount = sizeof(devices) / sizeof(devices[0]);
static constexpr const char *broadcastIp = "192.168.1.255";

Use the wired Ethernet MAC address of the target machine when possible. Wake-on-LAN support also has to be enabled in the target computer BIOS/UEFI and operating system.

Build And Upload

Build:

pio run

Upload:

pio run --target upload

Open the serial monitor:

pio device monitor

If upload stops at Connecting..., put the board into bootloader mode manually: hold BOOT, tap and release RESET, then release BOOT.

If PlatformIO cannot find the upload port automatically, list ports:

pio device list

Then upload with an explicit port:

pio run --target upload --upload-port /dev/ttyUSB0

Use the matching serial port for your OS.

Using The Panel

On boot, the panel starts the touchscreen UI and attempts to connect to Wi-Fi.

  • Tap a device button to send its Wake-on-LAN packet three times.
  • Tap CHECK to refresh Wi-Fi/status information.
  • The colored dot on each device button shows the latest ping result: green for reachable, red for offline or no reply.
  • After 15 minutes of no touch input, the panel enters sleep mode.
  • Turn on TIME ALWAYS ON to show a dim full-screen clock during sleep.
  • With TIME ALWAYS ON off, sleep mode turns the backlight off.

The first tap while sleeping wakes the panel and is consumed by the sleep overlay, so it should not accidentally press a wake button underneath.

Serial Commands

The firmware also exposes a small serial command interface:

ping              serial round-trip test
wifi              connect to Wi-Fi
status            print Wi-Fi status
tcp <host> <port> test a TCP connection
help              show commands

Customizing

Common files to edit:

  • include/secrets.h - local Wi-Fi credentials, ignored by git
  • include/devices.h - local machine names, IPs, MAC addresses, and WoL port, ignored by git
  • src/ui.cpp - layout, labels, colors, idle timeout, clock behavior, and backlight levels
  • lib/panel_driver/ - Elecrow display, touch, and backlight driver
  • boards/elecrow_crowpanel_5_n4r8.json - custom PlatformIO board definition

The UI currently assumes three devices because the screen places three large buttons explicitly. If you add or remove devices, adjust buildScreen() in src/ui.cpp.

Notes

  • include/secrets.h and include/devices.h are intentionally ignored so personal Wi-Fi credentials and local MAC addresses do not get committed.
  • Wake-on-LAN usually works best when the target computer is wired to Ethernet.
  • Some networks block directed broadcast traffic. This firmware sends packets to broadcastIp from include/devices.h.
  • The dim clock backlight level is currently set in src/ui.cpp as dimClockBacklight.

License

MIT License. See LICENSE.

About

Standalone Wake-on-LAN touchscreen panel for the Elecrow 5-inch ESP32-S3 CrowPanel.

Topics

Resources

License

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors