Library

We have an extensive library of various bOS configuration examples. Select your heating pump, AC, TV or almost any other device and import it to your smart building configuration. We also encourage all system integrators and DIYs to add their own examples to ComfortClick library.

Telegram messenger icon

Telegram messenger

Sending messages via Telegram

Author: Artem Kuteynikov

DOWNLOAD

Telegram API enables bOS server to send messages and transfer string or numerical values of variables to Telegram users who subscribed on a chat-bot created. A control of devices and setpoint adjustment is also possible.

To access API functionality a few steps should be made (refer to Telegram API) :

getUpdate command will also generate chat ID. Simply replace " with your token number and the commands should work and all basic information will be available.

To receive messages from users one of two methods may be used: getUptades or Webhooks. getUpdates method utilized in this example. For multiple users messaging group-chat ID should be used instead of single chat ID. Bot should be an administrator of this group.

sendMessage method serves to send messages to chat. Any trigger to activate command that fits project requirements can be used (temperatures, consumption, movement, alarm..).

Sender and Receiver devices let parse data from incoming messages thus enabling device control.

To avoid typing frequently used tasks a set of commands can be created. A user then can choose a command from a list making server to perform required action (sensor polling in example).

Comments

Please login to post a comment.

This website uses cookies

We use cookies to personalize content, use live chat, provide social media features and to analyze our traffic. We also share information about your use of our site with analytics partners who may combine it with other information that you’ve provided to them or that they’ve collected from your use of their services.