The revolution of 2022 in the universe of Telegram messenger bots was the emergence of Web Apps. Instead of the spartan interface of a standard chatbot, developers can use the unlimited possibilities of today’s web applications. Let’s see what a Telegram bot with a web interface for managing IoT devices is, which the 2Smart Cloud platform offers its users.
What does a classic messenger bot look like? This is a regular chat where the user must enter a text command to get the desired result. For example, send the “/new” command to create an email using Gmail Bot. The list of commands is usually given in the bot’s help or available in its menu.
Some commands are executed when tapping on the bot widget. For example, in the same Gmail Bot, standard widgets allow you to manage the received message: reply to it, send it to the archive, delete it, etc.
Interaction with a computer program using text commands and nondescript widgets is something from the dinosaur world. Telegram developers are trying to improve this experience – for example, the most popular commands can be pinned under the message input field. And near this field, a menu with all the bot commands appeared one day. The user just needs to tap the command to send it to the bot. But that’s not what we expect today anyway.
The release of Telegram Web Apps has finally allowed bots to reach the level that corresponds to today. In fact, bots can now offer the same user experience as mobile apps or modern websites.
For example, this is how managing 2Smart Cloud IoT devices using a Telegram bot looks like in this case:
The bot is doing its job successfully. The user can not only turn on and off their smart device but also switch its operation mode, receive information about the current state of the sensors, etc.
If the user has added the most often used widgets to favorites, they can launch their list with one command. However, if the user wants to control a widget, not in the favorites list, they need to find the right line in the long list of all their devices’ widgets.
The main inconvenience of the classic bot is that controlling with text commands and receiving data in text message format is perceived as something from black-and-white cinema days.
And here is what the 2Smart Cloud bot with a web interface looks like:
This bot actually duplicates the 2Smart Cloud mobile application. The same widgets for managing IoT devices (such as a home security robot) are available to the user as in the application itself. Device management is intuitive and familiar to today’s consumers.
The only noticeable difference is that the user cannot add widgets to favorites using the bot. To do this, they need to launch a mobile application.
For comparison, this is how the same screens of the mobile application look like:
Some features that are easily available in a bot with a web interface are not possible in a classic bot at all. For example, a text bot is not able to display a graph with historical data of sensor readings. But for a web bot, it’s not a problem.
This is how the control of a smart lamp looks like in a classic and web bot.
Choosing the color of the glow of the lamp:
Lamp brightness setting:
Entering text to display on the lamp matrix:
Widgets in the web bot are divided into tabs, just like in the mobile app. The user can quickly find the right one because this interface is more logical and intuitive.
Thus, the web bot replaces the mobile application if necessary. You can also use it on devices for which there is no 2Smart Cloud application, but the Telegram app is available – for example, on Windows computers.
You can build a simple device yourself to try the bot in action – for example, create a Wi-Fi switch to control via the Telegram bot. You can also learn about our experience of using ChatGPT for IoT when we tried to write the ESPHome configuration for the same switch.
Also, pay attention to integrations with other popular messengers available in 2Smart – for example, the ability to receive devices notifications using the WhatsApp bot.