This project is a Flask-based API that sends alarm notifications to Telegram chat groups or individual recipients. It also performs IP address validation using an external API and ensures proper logging depending on the environment (development or production).
- Telegram Notifications: Sends alarm messages to configured chat groups or recipients using Telegram Bot API.
- IP Address Validation: Verifies the request by hitting an external IP address API before sending notifications.
- Environment-based Logging:
- In development mode: Debugging enabled with detailed logging.
- In production mode: Only essential logs are recorded.
- Alarm Information: Sends details such as device name, status, voltage value, and timestamp.
🚨*Alarm Detected*
Name : Voltage Monitor
Line : A-B
Value : 220 Volt
Status : Critical 🔴
Date : 15 October 2024 14:30:01
Location : Main Site - N/A