An embedded Telegram bot for generic ESP32 boards to send a Wake on LAN magic packets.
This is a sketch for generic ESP32 boards. A telegram bot is hosted on the board and listens for messages. When the /wol
command is received, a Wake-on-Lan magic packet is broadcasted on the local network to turn on a target device.
- Install the following libraries from the Library Manager of the Arduino IDE:
- WakeOnLan: for sending the magic packet
- UniversalTelegramBot: for using the Telegram API
- Create a new Telegram bot and configure your
BOT_TOKEN
andALLOWED_ID
You can use @Botfather to create a new bot and @userinfobot to get your ID - Fill your WiFi configuration and the MAC address of the PC you want to power on
- Compile and flash to your ESP32 board
- Use
/start
to get a list of the available commands - Use the
/wol
command to turn on your PC - Use the
/ping
command to check if the bot is online
This project is based off the Wake on Lan 🤖 ESP32 Telegram Bot for M5Atom by Daniele Salvagni. The main difference is that this version targets generic ESP32 boards instead of the M5Atom.