Skip to main content
Version: 5.6

Telegram trigger

The trigger allows you to add new commands to the plug-in. With the Telegram trigger, it is also possible to receive messages on the end device using a command, as shown in the example below. Furthermore, the trigger can output a written message.

After double-clicking on the trigger, set the following properties:

PropertyDescription
ConnectionSelect a connection from the drop-down menu.
CommandEnter a command /<befehl>
Help text

Enter a help text here, which will then be displayed together with the command.

Note: The help text is required, otherwise the commands cannot be transferred to the bot.

Message typeSelect a message type from the drop-down menu, e.g., text message, voice message, etc. With the message type "Any file," all file types can be sent (text, images, videos, etc.).
Authentication requiredSelect the checkbox if you only want to allow authorized users to receive messages.
Authorized UsersSelect authorized users from the drop-down menu.
User FilterHere you also have the option of entering a filter to select specific authorized users.

You can receive any type of file with the Telegram trigger. To send a file from OPC Router to Telegram, you need the Telegram transfer object. To send a file, e.g., an image, to OPC Router, you must specify the trigger command as the description. However, the file name of the image is not sent, and you must rename the file if you want to save it.

Example Telegram connection

In our small example, the boiler temperature is queried. The data is collected by the OPC Router and can be queried via Telegram.

To display the boiler temperature on a remote web-enabled device, proceed as follows:

  1. Go to the link of your bot, which you received together with the AccessToken from BotFather.
  2. Enter the command /start.
  3. If you click on /help, BotFather will show you all possible commands.
  4. Select the command /boiler temperature.
  5. The boiler temperature and help text will then be displayed on your device.