TeleWOL is an ESP32 Wake-on-LAN controller operated through Telegram. It can wake configured Windows or Linux PCs, check their status, reconnect to Wi-Fi, run an optional startup wake, and receive firmware updates through ArduinoOTA.
- Wake Windows and Linux PCs from Telegram
- Persistent inline-button dashboard
- On-demand online/offline checks
- Optional auto-wake after power recovery
- Automatic Wi-Fi reconnect
- Password-protected ArduinoOTA updates
- Telegram Chat ID access control
- ESP32 development board
- 2.4 GHz Wi-Fi network with Internet access
- Ethernet-connected PC with Wake-on-LAN enabled
- PlatformIO Core or PlatformIO extension for VS Code
PlatformIO installs these libraries from platformio.ini:
UniversalTelegramBotArduinoJson
Wi-Fi, UDP, ICMP, and ArduinoOTA support comes from ESP32 Arduino framework and project source.
-
Create a Telegram bot with
@BotFatherand copy its token. -
Get your Telegram Chat ID from
@userinfobot. -
Copy example configuration:
Copy-Item .env.example .env -
Edit
.envwith your Wi-Fi, Telegram, target PC, OTA, and auto-wake settings. -
Connect ESP32 by USB.
-
Select correct serial port in PlatformIO.
-
Build and upload through USB. PlatformIO auto-detects the serial port or uses the port selected in its UI. It validates
.envand generates the privateinclude/secrets.hautomatically before compiling:pio run -e esp32dev -t upload
-
Open Serial Monitor at
115200baud and send/startto your bot.
Enable Wake-on-LAN in target PC BIOS/UEFI and Ethernet adapter settings. Use Ethernet adapter MAC address, not Wi-Fi MAC address.
| Variable | Purpose |
|---|---|
WIFI_SSID |
Wi-Fi SSID |
WIFI_PASSWORD |
Wi-Fi password |
ESP_STATIC_IP |
Optional fixed ESP32 IPv4 address; blank uses DHCP |
ESP_GATEWAY / ESP_SUBNET |
Gateway and subnet for static addressing |
ESP_DNS_PRIMARY / ESP_DNS_SECONDARY |
DNS servers for static addressing |
TELEGRAM_BOT_TOKEN |
BotFather token |
TELEGRAM_CHAT_ID |
Authorized Telegram chat |
WINDOWS_MAC / WINDOWS_IP |
Windows Ethernet MAC and local IPv4 address |
LINUX_MAC / LINUX_IP |
Linux Ethernet MAC and local IPv4 address |
OTA_HOSTNAME |
OTA device name |
OTA_PASSWORD |
OTA upload password |
OTA_PORT |
ArduinoOTA UDP port; normally 3232 |
AUTO_WAKE_WINDOWS |
Auto-wake Windows after power-on |
AUTO_WAKE_LINUX |
Auto-wake Linux after power-on |
AUTO_WAKE_DELAY_SECONDS |
Delay before auto-wake, from 0 to 300 seconds |
Only one target is required. Leave both MAC and IP empty for any unused target. Every build regenerates include/secrets.h from .env.
Use /start to open the button dashboard.
| Action | Button / Command |
|---|---|
| Wake Windows | Wake Windows / /wake_win |
| Wake Linux | Wake Linux / /wake_linux |
| Windows status | Status Windows / /status_win |
| Linux status | Status Linux / /status_linux |
| All status | Status All / /status_all |
| ESP32 status | ESP32 Status / /status |
| Auto Wake status | Auto Wake / /auto_wake |
Unavailable targets do not appear in dashboard. Status uses ICMP ping, so firewall rules can make an online PC appear offline.
The default Upload button uses the selected USB serial port. Wi-Fi OTA reads target, port, and password from .env:
pio run -e esp32dev-ota -t uploadWhen ESP_STATIC_IP is blank, OTA uses OTA_HOSTNAME.local. Reserve a configured static IP outside the router DHCP pool. If OTA fails, allow Python/PlatformIO through the firewall and allow UDP OTA_PORT; ESP32 also connects back to a temporary TCP port on the computer.
| Problem | Check |
|---|---|
| Build fails | Check the .env validation error printed before compilation |
| Bot not responding | Wi-Fi, Internet, bot token, Chat ID, Serial Monitor |
| PC does not wake | Ethernet MAC, BIOS WOL, adapter WOL, standby power, VLAN/broadcast |
| Status check fails | Target IP, firewall, ICMP reachability |
| OTA target missing | Wi-Fi, mDNS, firewall, VLAN |
| ESP32 stuck | Press RESET once; use USB recovery if OTA remains unavailable |