This project utilizes an ESP8266 microcontroller to create a motion detector system integrated with Telegram messaging service. When motion is detected by the Passive Infrared (PIR) sensor, the system triggers an alert message to a specified Telegram chat ID.
- Motion Detection: The system detects motion using a PIR sensor connected to the ESP8266.
- Alert System: Upon detecting motion, the system triggers an alert message to a Telegram chat ID.
- Customizable Configuration: The Telegram bot token and chat ID can be configured using WiFiManager for easy setup.
- ESP8266 microcontroller
- Passive Infrared (PIR) sensor
- LED indicator
- Buzzer
- Connect the components as per the specified pin configuration.
- Upload the code to your ESP8266 device.
- Power on the device and connect it to a WiFi network.
- Access the WiFiManager portal to configure the Telegram bot token and chat ID.
- Once configured, the system is ready to detect motion and send alerts via Telegram.
To integrate your ESP8266 device with Telegram, you'll need to create a Telegram bot using BotFather and obtain the chat ID using IDBot. Follow these steps:
-
Create a Telegram Bot:
- Open the Telegram app and search for "BotFather".
- Start a chat with BotFather and follow the instructions to create a new bot.
- Once the bot is created, BotFather will provide you with a token. Copy this token; you'll need it later.
-
Obtain Chat ID:
- Search for "IDBot" in the Telegram app and start a chat with it.
- Send the command
/start
to IDBot to initiate the conversation. - IDBot will reply with your unique chat ID. Copy this chat ID; you'll need it to receive messages from your ESP8266 device.
-
Configure ESP8266 Telegram Bot:
- Access the WiFiManager portal on your ESP8266 device.
- Enter the Telegram bot token (obtained from BotFather) and chat ID (obtained from IDBot) when prompted.
- Save the configuration, and your ESP8266 device is now ready to send and receive messages via Telegram.
Contributions are welcome! If you find any issues or have ideas for improvements, feel free to open an issue or submit a pull request.
For any questions or inquiries, feel free to contact me at:
- Email: mohamedsayedmohamed88@outlook.com
- LinkedIn: My Profile
coding vibes 🧑💻