Pande's setup solves a very modern Windows PC dilemma: his workstation houses an RTX 3080 Ti running a llama-server instance for coding and productivity tasks, alongside remote gaming duty. Instead of letting the rig sip idle power all day, he wired a physical button to wake the machine over his local network on demand. It is a clever, low-cost weekend build—provided you navigate a few classic Windows power-management and ESP32 wiring traps that can quietly derail Wake-on-LAN.
Why a Standalone ESP32 Beats Leaving Your Rig Idling
Most smart-home enthusiasts who want remote PC wake-up reach straight for a Home Assistant server running ESPHome or a phone app. Pande deliberately skipped both, flashing his ESP32 directly through the Arduino IDE so the button would not depend on external home-automation services staying online. That choice is purely an architectural preference rather than a technical requirement, but for a single-purpose desk gadget, fewer moving parts means fewer things to break when your server rack decides to reboot.
It is worth noting what this project does and does not prove. While avoiding all-day idle operation is Pande's stated motivation, his write-up does not include kill-a-watt measurements, idle power logs, or calculated electricity savings. Nor does the ESP32 flip mains power or revive a completely unplugged PC—Wake-on-LAN still requires your motherboard and wired Ethernet port to stay connected to AC power in a low-power standby state.
Key takeaway: A standalone ESP32 WoL button eliminates extra smart-home software dependencies while giving you a tactile way to summon a sleeping or standby Windows workstation on demand.
How the ESP32 and KY-023 Hardware Hook Together
To keep the build simple, Pande paired an ESP32 development board with a ubiquitous five-pin KY-023 analog joystick module—the same thumbstick hardware you would find on a game controller, which includes an integrated push-button when you press straight down on the cap. His reported wiring connects the two boards as follows:
| ESP32 Pin | KY-023 Pin | Role in This Build |
|---|---|---|
GND | GND | Common ground reference |
3.3V | 5V (VCC) | Safe 3.3V supply rail |
D18 | VRx | X-axis analog pin (unused in current code) |
D5 | VRy | Y-axis analog pin (unused in current code) |
D4 | SW | Push-button switch input |
Two electrical details here deserve closer inspection before you grab your jumper wires:
- Powering a
5Vpin with3.3Vis actually the right move: Even though KY-023 silkscreens typically label the power header+5V, the module's internal 10 kΩ potentiometers work reliably at3.3V. More importantly, ESP32 GPIOs are strictly3.3V-tolerant. Driving the joystick at5Vand feeding its outputs into an ESP32 risks damaging the microcontroller. - A subtle pinout trap if you expand the build: Pande's current firmware only reads the press switch on
GPIO4(D4), which works fine as a digital input usingINPUT_PULLUPbecause the KY-023'sSWpin simply shorts to ground (LOW) when clicked. However, Pande suggests expanding the project by mapping three additional PC MAC addresses to the four directional tilts of the thumbstick. If you try that upgrade on a standard 30-pin ESP32 DevKit V1, do not keepVRxandVRyonD18andD5. On classic ESP32 boards,GPIO18andGPIO5are digital/VSPI pins rather than analog-to-digital converter (ADC) inputs—andGPIO5is also a boot strapping pin. Furthermore,GPIO4sits onADC2, which is unavailable while Wi-Fi is active. To read analog joystick directions alongside Wi-Fi, moveVRxandVRytoADC1pins such asGPIO32,GPIO33,GPIO34,GPIO35,GPIO36, orGPIO39.
Key takeaway: Powering the KY-023 from 3.3V protects your ESP32, and moving VRx/VRy to ADC1 pins is essential if you want to use stick directions to wake multiple PCs.
Inside the Magic Packet and Firmware Logic
Despite the mystical name, a Wake-on-LAN "magic packet" is remarkably simple. As documented in Microsoft's Windows driver references and networking standards, the payload is 102 bytes long: six synchronization bytes of 0xFF followed by 16 contiguous repetitions of the target network adapter's six-byte MAC address.
Pande's Arduino sketch structures the workflow around three pieces:
- Station-mode Wi-Fi connection:
connectWiFi()puts the ESP32 intoWIFI_STAmode, joins the local wireless network, and prints its assigned IP address. The mainloop()also checksWiFi.status()so the board reconnects automatically if the signal drops. - Hold and cooldown filtering: When
digitalRead(BUTTON_PIN)dropsLOW, the loop waits for a short hold threshold (HOLD_MS) to filter out accidental noise, then enforces a cooldown timer (COOLDOWN_MS) before firing again so holding the stick down will not spam the LAN with packets. - UDP broadcast transmission:
sendMagicPacket()assembles the 102-byte array in memory and dispatches it over UDP to the local subnet's broadcast address onWOL_PORT.
If you plan to build this yourself, keep three practical caveats in mind:
- Treat the published code as an architectural excerpt: The snippets shared in Pande's article omit the
WiFiandWiFiUdplibrary includes, theudpobject declaration, and numeric constants forWOL_PORT,HOLD_MS, andCOOLDOWN_MS. In standard WoL implementations,WOL_PORTis almost always UDP port9(the old Discard port, preferred over port7Echo to avoid backscatter traffic and simplify Wireshark debugging), though the receiving network card scans the raw frame for the MAC pattern rather than listening on a specific socket. - Replace all network identifiers: You must supply your own Wi-Fi SSID and passphrase, the exact MAC address of your PC's wired Ethernet adapter (wake over Wi-Fi is rarely supported or reliable on desktops), and your own router's subnet broadcast IP (such as
192.168.1.255or255.255.255.255). - Local-network scope: Standard UDP broadcasts do not cross routers or VLANs without special router-side directed broadcast forwarding or a WoL relay agent. This button is built to wake machines on the same home subnet, not from across the internet.
Key takeaway: The magic packet itself is just 102 bytes of 0xFF plus a repeated MAC address over UDP, typically on port 9, scoped to your local subnet.
The Windows and BIOS Gotchas That Break Wake-on-LAN
Building the ESP32 transmitter takes ten minutes; getting a modern Windows motherboard and network interface card (NIC) to actually listen for the signal is where most tinkerers lose an afternoon.
On the firmware side, Pande pressed Delete at boot, disabled ErP in his motherboard's Platform Power menu so the Ethernet jack stays energized when the system is off, and enabled WoL under IO Ports (noting that other boards tuck the toggle under Wake Up Event Setup or ACPI Configuration). Disabling ErP—the European energy-saving standby standard that cuts auxiliary power to ports—is a well-known prerequisite for wired WoL.
Inside Windows, however, Pande's walkthrough highlights a subtle distinction that trips up many Windows 10 and Windows 11 users. He checked Device Manager and verified that Wake on Pattern Match was enabled on his network adapter. According to Microsoft's NDIS driver documentation, Wake on Magic Packet (*WakeOnMagicPacket) and Wake on Pattern Match (*WakeOnPattern) are two separate wake methods. Pattern match responds to OS-defined network packet bitmaps, whereas a magic packet specifically requires the Wake on Magic Packet capability to be active.
Even trickier is what Microsoft officially supports across Windows power states. Per Microsoft Learn documentation on Windows power states, Wake-on-LAN is officially supported from Sleep (S3) and explicit Hibernate (S4), not from Classic Shutdown (S5) or Hybrid Shutdown—better known as Fast Startup. When you click Shut down in Windows 10 or Windows 11 with Fast Startup enabled, Windows puts the machine into a hybrid S4 state and explicitly leaves the network adapter unarmed so the PC cannot suffer unwanted wake-ups. While some motherboard firmware implementations can still arm a NIC independently during S5 without Windows' help, Microsoft notes that turning off Fast Startup in Control Panel—or simply putting the PC to Sleep or Hibernate—is frequently required for reliable WoL.
Pre-Flight Checklist for Windows 11 and Windows 10 Users
Before blaming your ESP32 code, verify this chain from bottom to top:
- BIOS / UEFI: Disable ErP Ready (or ErP Support) and enable Wake on LAN / Power On By PCI-E.
- Device Manager (Advanced tab): Open your wired Ethernet adapter's Properties > Advanced, and verify Wake on Magic Packet (not just Wake on Pattern Match) is Enabled.
- Device Manager (Power Management tab): Check Allow this device to wake the computer, and optionally Only allow a magic packet to wake the computer so stray network chatter doesn't wake your PC at 3:00 AM.
- Windows Power Settings: Test WoL from Sleep first. If you want to wake from a shut-down state and your motherboard supports it, open Control Panel > Power Options > Choose what the power buttons do and uncheck Turn on fast startup.
Key takeaway: Check for Wake on Magic Packet specifically in Device Manager, and remember that Windows Fast Startup intentionally blocks WoL from standard shutdown unless your firmware handles it independently.
Verdict: Smart Home Lab Convenience, With Realistic Boundaries
Pande's ESP32 Wake-on-LAN button is the kind of pragmatic DIY hardware hack that earns a permanent spot beside a keyboard or couch. Rather than leaving an RTX 3080 Ti workstation burning power between coding sessions or relying on bloated cloud ecosystems, a sub-$10 microcontroller and a thumbstick module give you instant, local-network control over when your heavy iron wakes up. Just make sure your Windows NIC is tuned for magic packets—not merely pattern matches—and keep those analog pins away from GPIO18 and GPIO5 if you decide to wire up the rest of your home lab.
References
- I built an ESP32 Wake-on-LAN button, and I stopped leaving my gaming PC on all day XDA · 2026-11-27T20:30:21+00:00
- Low Power for Wake on LAN - Windows drivers | Microsoft Learn learn.microsoft.com
- About Network Wake-Up Events - Windows drivers | Microsoft Learn learn.microsoft.com