Telegram messenger notifications

When an object changes its state to one of the selected ones, the system can notify users via Telegram messenger.

image

Setup of Telegram notifications with macOS app

To setup Telegram notifications a bot for sending notifications must be created:

  1. Find the contact BotFather in Telegram contacts list.

  2. Send to it the message /newbot.

  3. Enter a name of the bot (the name can be changed later).

  4. Enter a username of the bot (the username cannot be changed later).

  5. Copy the bot token. For example, 210979209:AAFfT2mt3oW4EK1gYqE_d3OjAJSIRLSrALo.

  6. Send the message /setprivacy to BotFather.

  7. Select the created bot by its username.

  8. Select the option Disable.

If it is necessary to use existing bot or restore its token:

  1. Find the contact BotFather in Telegram contacts list.

  2. Send to it the message /mybots.

  3. Select the bot.

  4. Select the option API Token.

  5. Copy the bot token. For example, 210979209:AAFfT2mt3oW4EK1gYqE_d3OjAJSIRLSrALo.

Setting up channel, chat or group

  1. Create a new channel in the Telegram app.

  2. Open channel settings and add the bot to the list Administrators.

  3. Send a message to the channel.

  4. Follow the link https://api.telegram.org/bot<bot_token>/getUpdates in any web browser, inserting the bot token without spaces and <> symbols.

  5. Find the part with the words ID and chat, for example, …​"channel_post":{"message_id":4,"chat":{"id":-1001156346945,"title":"SAYMON","type":"channel"},"date…​.

    • Here -1001156346945 is the channel ID.

Chat

  1. Send any message to the bot.

  2. Follow the link https://api.telegram.org/bot<bot_token>/getUpdates in any web browser, inserting your bot token without spaces and <> symbols.

  3. Find the part with the words ID and chat, for example, …​":"K"},"chat":{"id":121399918,"first_ …​.

    • Here `121399918 `is the chat ID.

Group

  1. Add the bot to the group.

  2. Send any message to the bot in the group, starting it with the symbol @.

  3. Follow the link https://api.telegram.org/bot<bot_token>/getUpdates in any web browser, inserting your bot token without spaces and <> symbols.

  4. Find the part with the words ID and chat, for example, …​ ":"K"},"chat":{"id":-209194473,"first_ …​.

    • Here -209194473 is the group ID.

In Telegram notification settings enter the bot token and channel/chat/group ID in the corresponding fields.

To learn more about bots, refer to the Telegram website.