This is a sketch for the ESP8266 board. The telegram bot is hosted on the board and listens for messages, after receiving the command /wol magic Wake-on-Lan packet is broadcast on the local network to turn on your PC.
Passwords and sensitive data are stored in the secrets.h file. Save the file in a folder according to the template:
#define SECRET_SSID "your_ssid"
#define SECRET_PASS "your_password"
#define BOT_TOKEN "0000000000:xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
#define MY_ID "your_telegram_id"
#define MAC_ADDR "FF:FF:FF:FF:FF:FF"
#define PC_IP IPAddress(192, 168, 0, 1)- Use
/startto get a list of the available commands - Use the
/wolcommand to turn on your PC - Use the
/pingcommand to check if the bot is online - Use the
/statuscommand to check if your PC is on or off - Use the
/ledoncommand to switch the Led ON - Use the
/ledoffcommand to switch the Led OFF