2.5 KiB
2.5 KiB
👀 esp32_home-assistant_telegram-bot Overview
Home Assistant controlled by telegram bot
🚀 Features
The design aims to provide real-time control and monitoring by leveraging a Telegram bot to verify collected data. This core functionality is extended to enable immediate awareness through voice notifications delivered directly via both the user's mobile device and the home system.
🔎 Preparation
Find your wifi's name and password
2. Open the Telegram for the Bot Token and follow these steps:
- Open Telegram and search for
@BotFather. - Start a chat with BotFather by typing
/start. - Create a new bot with the
/newbotcommand. - Follow the prompts to name your bot and choose a username.
- Copy the API token provided by BotFather.
3. Get your Telegram Chat ID:
- Open Telegram and search for
@userinfobotor@get_id_bot. - Start a chat with the bot by typing
/start. - The bot will reply with your numeric user ID.
- For group chat ID:
- Add your bot to the group.
- Send a message in the group mentioning the bot.
- Use the API call:
https://api.telegram.org/bot<YOUR_BOT_TOKEN>/getUpdates- Look for
"chat":{"id": ...}in the JSON response. - The
chat.idis your group chat ID (usually negative for groups, e.g.,-1001234567890).
- Look for
📦 Setup
Refer to the circuit diagramInstall the Arduino IDE and open 'esp32_home-assistan_telegram.inoPaste your wifi, bot token and chat id inf.File>Preferences>Additional Boards Manager URLs:(Click the double window button)
Paste this code
https://dl.espressif.com/dl/package_esp32_index.json
Click 'OK'Tools>Board>Boards Manager...Search 'esp32' by Espressif Systems, and install it
⚠️ Warning: Make sure you have installed the correct USB driver (CH340, CH341, FT232R / FTDI Driver, CP2102) before connecting the ESP32CAM to your computer.
Plug the ESP32CAM into your computerTools>Port>'Select the esp's port'Tools>Manage Libraries...Click the 'upload ➡️' button
✅ To make sure it has been uploaded successfully, you should see the message 'Done uploading'
🎉 Run
Disconnect the IO0-GND connection(disable programming mode)Press the reset button on the esp32cam