0

How to configure and use plugin Telegram

Michael AGNANO 5 days ago in bOS Configurator updated by Jürgen Jürgenson 2 days ago 3

Hi,

First of all, I wish you Happy New Year !!!

I would like to send Notification with plugin Telegram. I have created a user and a bot from Telegram. All is right.

So, in bOS I don t know where to fill in User, password for Telecam and so on ... Some one can explain to me how to fill in and use plugin Telegram in bOS please ?

Regards,

Michael

Did you read this From bos library

Configuration

Download the example from our website and import it into your configuration. Step by step instructions on how to import are available in our instructional video.

To acquire Chat ID start a new chat and start chat with another bot. Use the bot called @getmyid_bot and start conversation with /start. The bot will respond with your Chat ID. Paste this chat ID under chat ID value in bOS. This ID value is used in every API command for the communication.

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).

Thank you Jurgen for your help.

Now, all is right. I receive push from Telegram.

I have another question. I try to test to send message to my bot for light ON/OFF in the plugin example but my bot don't react. May I open port 16500 and 16501 on my router ?

Regards,

Michael

Hey

Good that it works now and does something... What do you see on the receivers side when sending the light_on command? You also need to link your light with the boolean value or modify the program so it knows what to switch.
As I havent tested it myself I dont know that. Maybe the Author: Artem Kuteynikov Can chime in and give some pointers.