Setup Guide
π» Option A: Software Companion Agent
Install our lightweight background agent directly on your PC. Reports diagnostics, handles lock, log out, sleep, restart, and graceful shutdown.
Requirements:
- Windows 10/11 or Linux
- Active internet connection
β‘ Option B: ESP32/ESP8266 Hardware
Connect a micro-controller directly to the power switch pins. Allows physical power-on (WoL) and hardware-level reset even if the operating system freezes.
Requirements:
- ESP32 or ESP8266 board
- Motherboard header wires
π» Option A: Desktop Agent Setup
Create an account & device
Register at app.onoffmypc.com/register, then create a new device in the dashboard and name it.
Download the Companion Installer
Download the latest release for your operating system from the releases page. Run the installer and launch the agent. It will run in your system tray.
Authorize the Agent
In the desktop companion window, paste the Device ID and Token generated for your device in the OnOffMyPC dashboard. Once connected, the agent's tray status will update to green, and you can now lock, log out, sleep, restart, or shutdown your PC from the dashboard, as well as view real-time CPU, RAM, and GPU usage metrics.
β‘ Option B: ESP32 Hardware Integration
Create an account
Register at app.onoffmypc.com/register with your email address and a password.
Add your device in the dashboard
Go to app.onoffmypc.com, add a new device and give it a name.
Copy the short pairing code shown (e.g. 7QK2-9F3D) β that's all you'll
enter on the device in step 5. It's single-use and expires in 15 minutes; you can generate a fresh one
any time from the device's Pairing code button.
Find your PC's MAC address
Wake-on-LAN requires your PC's wired network adapter MAC address.
On Windows run ipconfig /all and look for the
"Physical Address" of your Ethernet adapter.
On Linux / macOS run ip link or ifconfig.
It looks like AA:BB:CC:DD:EE:FF.
Flash the firmware
Connect the ESP32 to your computer via USB. In Chrome or Edge on desktop, click below to flash it directly from your browser β choose the serial port for your board when prompted.
Prefer to flash manually? Download the latest .bin from the
firmware releases page
and use the esptool CLI:
esptool.py --chip esp32 write_flash 0x0 onoffmypc-firmware-<version>.bin
Once flashed, the device will boot and β if no configuration is stored yet β create a Wi-Fi network named OnOffMyPC-XXXXXX (last 3 bytes of its MAC).
Connect and configure
On your phone or laptop, join the OnOffMyPC-XXXXXX network. Its
Wi-Fi password and a 6-digit setup PIN are shown on the serial console when the device boots into setup
(visible in the flasher's console from step 4, or the live logs below).
A setup page should open automatically (captive portal). If it doesn't, open a browser and go to
http://192.168.4.1.
The setup page scans for nearby Wi-Fi networks β pick yours and enter its password, then paste your pairing code from step 2, your PC's MAC address from step 3, and the setup PIN. Tap Save & Connect β the device fetches its own credentials, restarts, and joins your network. (Prefer the manual route? Expand βAdvancedβ on the setup page to enter a Device ID and Token instead of a pairing code.)
Click Open live logs and pick your ESP32's serial port, then press the board's RESET button β the boot output appears here, including the setup Wi-Fi password and 6-digit PIN. Chrome or Edge on desktop only. If the port is already in use by the flasher above, close that dialog first.
Wire to your PC
Connect the ESP32 to your motherboard's front-panel header. The firmware uses these pins:
| ESP32 pin | Connects to | What it does |
|---|---|---|
GPIO 26 | Motherboard PWR_BTN header | Powers the PC on/off (pulses the power switch; a 6 s hold forces off) |
GPIO 27 | Motherboard RESET header | Resets the PC (pulses the reset switch) |
GPIO 34 | Power-LED header (+) | Senses whether the PC is on (input-only pin) |
GPIO 4 | DHT22 data pin | Reads room temperature & humidity (optional) |
GPIO 2 | Onboard LED | Status indicator (built in β no wiring needed) |
GND | Header ground / sensor GND | Shared ground β required for every connection |
Power & reset: the ESP32 briefly "presses" these like the case buttons. Drive each header
through a small transistor or opto-isolator (GPIO β transistor β header) rather than wiring the
GPIO straight to the header.
Power sense: the LED header can be ~3.3β5 V, so feed GPIO 34 through a
resistor voltage divider to keep it at or below 3.3 V.
Ground: the ESP32 and the motherboard must share a common ground.
Finally, enable Wake-on-LAN in your BIOS/UEFI and in your network adapter's power-management settings so the PC can be powered on remotely, and keep the ESP32 powered even while the PC is off (a USB charger or the board's standby 5 V).
You're done
Open the dashboard and check that your device shows as online. Try sending a power command β
telemetry (power state, temperature, humidity) will appear within seconds.
To reconfigure or change networks, send r over the serial monitor to factory-reset
and re-enter setup mode.