A Zigbee-based device that lets any Zigbee-compatible smart home system control and monitor a PC's power state. Designed and tested with Samsung SmartThings, but compatible with any hub that supports Zigbee end devices.
Power control: When triggered (e.g. via an automation or a virtual switch in the smart home app), the device emulates a short physical press of the PC power button by briefly closing the optocoupler across the motherboard power button header.
State sensing: The device monitors the PC power button LED line. It reads whether the LED is on or off and exposes that as the current power state. The smart home system sees the device as a switch whose state reflects whether the PC is on.
- Controller: ESP32-C6 SuperMini
- Power Interface: Connected to the PC motherboard power button headers through a
PC817optocoupler switching stage. - Power Source: Powered via the PC motherboard's internal USB header, connected to the ESP32-C6 Super Mini's onboard USB-C port. The USB header is configured in BIOS to supply constant 5 V standby power even when the PC is off.
- Signal Levels: The ESP32 uses 3.3V GPIO and is not 5V tolerant. If the motherboard-side signal path is above 3.3V, add proper level shifting or another protection stage instead of wiring it directly to the ESP32.
- GPIO Assignments: See
docs/connections.mdfor current project wiring and GPIO assignments. In the current assembled schematic, GP14 drives the PC power button via a 1 kΩ resistor and PC817 optocoupler, and GP18 readsPWR_LED_SENSE. - Schematic: See
docs/schematic.pngfor the circuit diagram. - Pinout: See
docs/esp32-c6-super-mini-pinout.mdfor the default ESP32-C6 Super Mini GPIO reference (factory pinout only).
- Platform: Integrated with Samsung SmartThings / Home Assistant.
- Functionality: Allows powering on the PC via Home Assistant buttons or automated triggers.
See docs/firmware-setup.md for wiring, board setup, and firmware upload instructions.
firmware/: ESP32 source code.docs/: Hardware diagrams and additional documentation.
MIT — see LICENSE.