#### Add support for notifications using telegram bot.
“`
$Notification/T1=bot_token
$Notification/T2=chat_id
$Notification/Type=TG
$Notification/Send=Hello, World!
#### Memory usage:
| Memory type | Before changes | After changes | Difference |
| ----------- | -------------- | ------------- | ---------- |
| RAM | 69796 | 69796 | 0 |
| Flash | 1845089 | 1845613 | ⚠️+524 |
#### Setup:
##### Obtain bot token:
* Register bot with @BotFather, and get bot token, e.g. 9999999999:ABCdefGHi-JKLmNOpQR-stuvw-xyz012345.
##### Obtain chat id:
* Choose where you want to get notifications: in personal chat or in group chat.
Personal chat*: if you want to get notifications to your personal chat, text /start to the bot/nameOfYour_bot hello
Group chat*: if you want to get notifications to group chat, invite bot to group, text to group chat https://api.telegram.org/bot{bot-token}/getUpdates
* Open in browser and get …”chat”:{“id”:-1234567890 here. The number is chat id. Group chats have negative id, personal chats have positive id.
##### Setup FluidNC with commands:
* $Notification/T1=bot_token, ex, $Notification/T1=9999999999:ABCdefGHi-JKLmNOpQR-stuvw-xyz012345$Notification/T2=chat_id
* , ex, $Notification/T2=-1234567890$Notification/Type=TG
*
##### Test notification:
* Test notification with command $Notification/Send=Hello, World!
##### Inject notifications into G-Code:
* For example, add $Notification/Send=Finished` to your End G-Code in LightBurn
#1 – MitchBradley 于 2025-01-27
Based on the rarity of questions about notifications, I suspect that you could count the number of people who use them on one hand. If they are as rarely used as I suspect, I wonder if it makes sense to add yet another variant that is likely to be used by a single person? Perhaps it would be possible to collapse the entire notifications service into a data-driven class that could send arbitrary messages to arbitrary endpoints?