This project is a fork of daniele-salvagni's Wake-on-LAN Telegram Bot for ESP32. The purpose of this fork is to port the original ESP32-based project to work with the ESP8266 module, enabling you to wake up a PC via a magic packet (Wake-on-LAN) sent through a Telegram bot.
- Wake up any device that supports Wake-on-LAN (WoL) using a Telegram bot command.
- Simple interface with basic commands:
/wol
β Sends a WoL magic packet to wake up the target machine./ping
β Check the bot status./start
β Displays a welcome message and available commands.
- Secure communication using Telegram Bot API and SSL/TLS over Wi-Fi.
The original project was created by Daniele Salvagni and was designed to run on ESP32. You can find the original repository here.
This fork adapts the project to run on the ESP8266 platform while maintaining the core functionality of sending Wake-on-LAN magic packets through a Telegram bot.
- ESP8266 module (such as NodeMCU or Wemos D1 Mini)
- A device with Wake-on-LAN (WoL) capabilities (usually a PC with a compatible network card).
- Wi-Fi network with access to the target device.
- Telegram Bot API token (instructions below).
-
Install the ESP8266 Board Package in Arduino IDE:
- Open Arduino IDE and go to File > Preferences.
- Add this URL in Additional Boards Manager URLs:
https://arduino.esp8266.com/stable/package_esp8266com_index.json
- Go to Tools > Board > Boards Manager and install the ESP8266 package.
-
Install the required Arduino libraries:
- WakeOnLan: Install via Library Manager.
- UniversalTelegramBot: Install via Library Manager.
- ArduinoJson: Install via Library Manager.
- Clone or download this repository.
- Open the
wol-bot-esp8266.ino
file in the Arduino IDE. - Configure the Wi-Fi credentials in the code:
#define WIFI_SSID "your_wifi_ssid" #define WIFI_PASS "your_wifi_password"
- Set your Telegram Bot Token:
#define BOT_TOKEN "your_telegram_bot_token"
- Set the MAC Address of the target PC that you want to wake up:
#define MAC_ADDR "FF:FF:FF:FF:FF:FF"
- Upload the code to your ESP8266.
- Create a bot using BotFather on Telegram.
- Copy the token provided by BotFather and add it to the code.
Once the ESP8266 is connected to your Wi-Fi and the bot is running, you can use your Telegram app to send the following commands to the bot:
/wol
β Wake up your PC./ping
β Test if the bot is online./start
β Display a welcome message and list of commands.
This project is released under the MIT License.