Telegram Bot for WLED Backlight Control
This Telegram bot allows you to control the backlight of your WLED lighting system using Telegram. You can change the brightness, presets, and other settings directly from the Telegram app.
- Clone or download this repository.
git clone https://github.com/Tarbian/wled-telegram-bot
- Install telebot
pip install pyTelegramBotAPI
- Set up your WLED device and put the IP address in
config.py
(can be changed latter)
wled_ip = "YOUR IP HERE" # 192.168.1.111
- Get the API token in @BotFather and put in
config.py
bot_token = "YOUR TOKEN HERE" # XXXXXXXXX:XXXXXXXXXXXXXXXXXXXXXXX
- Add your ID and the ID of the people allowed to use the bot to
config.py
(can get be obtained from THIS bot)
white_list = [111111111, 222222222, ] # list of id`s who can control the bot
- Enter the id of the all-white preset and the total number of presets (can be changed latter) in
config.py
white_id = "1" # id of full white preset
presets = "10" # number of presets
- Run the bot:
python bot.py
When the bot is running you can interact with it using the keyboard to see this information send /help
to the bot.
/start - Starts bot & keyboard
/correct_ip - To correct ip of WLED
/status - Get some info from WLED
/correct_presets - Set the number of presets
/help - Show this message
◀ - Set previous preset
⚪ - Set white preset
▶ - Set next preset
◐ - Toggle switch on/off
🌓 - Enter in brightness change mode
🔅 - Reduce brightness by 30
🔆 - Increase brightness by 30
✍ - Enter brightness manually
☀ - Set maximum brightness
← - Back to main control pannel
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
- Improve code readability
- Add the ability to change the color
- Segments control
This project is licensed under the MIT License