MS SQL Server Telegram Bot

Telegram Bot Programming

Since smartphones have been available, completely new possibilities have opened up for remote access to industrial processes. The interactions that are possible with the smartphone can be designed in a variety of convenient ways and go beyond simple text notifications.
With the Telegram Bot connection, the OPC Router enables the “Telegram” messenger to be linked to the industrial process (see Video). Authenticated users of the bot can receive messages, i.e. alarms, production messages, operating states, (push notifications), but can also actively trigger actions via the Telegram Bot. Application-specific queries and activities can be configured in the OPC Router, which are then called up from the smartphone via authenticated remote access.
You can easily create a convenient remote access to your production system and give the users the possibility for quick reactions in exceptional situations and easy access to production data.

Run a free test now

Example for sending messages to a Telegram Client

Transmission of data from a MQTT message to a Telegram client. Here process data.
Message representation in the Telegram Client. Process data and status messages.

That’s how easy it is.

Connecting Systems

What’s Transfer, Trigger and Browsing?

Transfer-Objects

The transfer object of the Telegram Messenger plug-in establishes the connection to the Telegram Bot. When a transfer is triggered, messages can be sent to selected recipients. Different formats are available for the messages.

Message formats

Text for classic text messages.
Image for sending images.
Audio for sound recording.
Video for video sequences.
Document for sending files.
Location to send location information displayed on the smartphone in the map app.
Contact for sending VCards.

Trigger

The Telegram Messenger plug-in has its own trigger. In connections this trigger can be used and gets a name. The name of the trigger becomes a command in the Telegram Bot. At the Telegram Client (Smartphone/Web/PC) this command can be called directly by the user. The call then causes the connection containing the trigger to be executed and the data transfers contained in it to take place.

The created triggers are listed to the user after calling the “/help” command:

Triggers of the OPC Router connections are displayed as commands in the Telegram Client and can be called directly from here.

Browsing

The Telegram Messenger Plug-in does not have its own browsing.

Telegram Bot Plug-in application examples

Alarm system with Telegram

Together with the SQL Server plug-in of the OPC router (MS SQLMySQLOrcaleAccessODBC), effective alarm systems with smartphone connection can be easily configured. For this purpose, alarm messages, which are managed, generated and stored in the SQL database, are sent via the bot to the registered Telegram clients. The OPC Router can also offer the clients commands so that fault acknowledgements and comment functions can be designed. With the access of the Telegram plug-in to the SQL data, the Telegram client can also be offered queries, for example for access to detailed data on alarm messages.

Telegram Bot
Microsoft SQL Server
Smart Factory

Create Telegram Bot without programming

Creating a Telegram Bot is done with just a few clicks. Filling the bot with life is possible by programming in C#, Python and other languages, but it’s a lot of work. With the OPC Router Telegram Bot Plug-in it is possible without complex programming and is realized by simple graphic configuration. Messages from other plug-ins (SAPOPCMQTT, etc.) can simply be sent to the bot and are then sent to the registered clients. Commands can be created by simply creating triggers in the OPC Router project. Create your telegram bot for your system in a few minutes.

Video: Creating Telegram Bots

Here you will find further information
about OPC Router and Plug-ins.

Plug-ins
Run a free test now