https://github.com/kotyara12/retgsend
Library for sending notifications to Telegram from a device to ESP32. There is a built-in queue of outgoing messages for delayed sending (for example, when there is no Internet)
https://github.com/kotyara12/retgsend
esp-arduino esp-idf esp-idf-framework esp32 telegram telegram-bot
Last synced: about 1 year ago
JSON representation
Library for sending notifications to Telegram from a device to ESP32. There is a built-in queue of outgoing messages for delayed sending (for example, when there is no Internet)
- Host: GitHub
- URL: https://github.com/kotyara12/retgsend
- Owner: kotyara12
- Created: 2021-04-09T13:44:25.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2024-11-22T19:30:06.000Z (over 1 year ago)
- Last Synced: 2025-03-25T12:12:02.045Z (about 1 year ago)
- Topics: esp-arduino, esp-idf, esp-idf-framework, esp32, telegram, telegram-bot
- Language: C++
- Homepage:
- Size: 23.4 KB
- Stars: 7
- Watchers: 1
- Forks: 2
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# reTgSend for ESP32 and ESP-IDF
Library for sending notifications to Telegram from a device to ESP32. There is a built-in queue of outgoing messages for delayed sending (for example, when there is no Internet)
## Dependencies:
- https://github.com/kotyara12/rLog
- https://github.com/kotyara12/rStrings
- https://github.com/kotyara12/reLed
- https://github.com/kotyara12/reWifi
### Notes:
- libraries starting with the re prefix are only suitable for ESP32 and ESP-IDF
- libraries starting with the ra prefix are only suitable for ARDUINO compatible code
- libraries starting with the r prefix can be used in both cases (in ESP-IDF and in ARDUINO)
## Parameters of the module
The module is configured using macros located in the general project configuration file "project_config.h":
// Allow Telegram notifications (general flag)
#define CONFIG_TELEGRAM_ENABLE 1
#if CONFIG_TELEGRAM_ENABLE
// TLS certificate for Telegram API
#define CONFIG_TELEGRAM_TLS_PEM_START "_binary_api_telegram_org_pem_start"
#define CONFIG_TELEGRAM_TLS_PEM_END "_binary_api_telegram_org_pem_end"
// Telegram API bot token
#define CONFIG_TELEGRAM_TOKEN "99999999:AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
// Chat or group ID
#define CONFIG_TELEGRAM_CHAT_ID "-100123456789"
// Device name (published at the beginning of each message)
#define CONFIG_TELEGRAM_DEVICE "🌦 THS-DEMO"
// Time format at the end of the notification
#define CONFIG_TELEGRAM_TIME_FORMAT "%d.%m.%Y %H:%M:%S"
// Use static memory allocation for the task and queue. CONFIG_FREERTOS_SUPPORT_STATIC_ALLOCATION must be enabled!
#define CONFIG_TELEGRAM_STATIC_ALLOCATION 1
// Stack size for the task of sending notifications to Telegram
#define CONFIG_TELEGRAM_STACK_SIZE 3072
// Queue size for the task of sending notifications to Telegram
#define CONFIG_TELEGRAM_QUEUE_SIZE 16
// Priority of the task of sending notifications to Telegram
#define CONFIG_TELEGRAM_PRIORITY 3
// The processor core for the task of sending notifications to Telegram
#define CONFIG_TELEGRAM_CORE 1
// Number of attempts to send notifications to Telegram
#define CONFIG_TELEGRAM_MAX_ATTEMPTS 3
// The interval between attempts to send notifications to Telegram
#define CONFIG_TELEGRAM_ATTEMPTS_INTERVAL 3000
#endif // CONFIG_TELEGRAM_ENABLE