Web - Telegram

Telegram

With Telegram you can build a chatbot, which helps you to read your senseBox from everywhere via text message.

Telegram is a free messenger, which offers the possibility to create chatbots in the easiest way. To use it you need a Telegram account. When you create your chatbord a token will be displayed which you can use in Blockly to authenticate yourself. More about creating a chatbot can be found in the project Telegram chatbot for the senseBox with Blockly.

With the ‘Initialize Telegram Bot’ block in Setup() the senseBox is prepared to send data to the chatbot on request. In the text field “Token” you have to enter the token that is displayed when creating your chatbot.

/images/2020-04-08-blockly-web/blockly-Web-Telegram-1-en.svg - Logo

Afterwards, the block ‘Telegram do’ can be used to program in the endless loop() what exactly the chatbot should do.

/images/2020-04-08-blockly-web/blockly-Web-Telegram-2-en.svg - Logo

The On Message and Send Message blocks can be placed in the free block section of the ‘Make Legam’ block to specify what the senseBox should do when it receives a particular message.

/images/2020-04-08-blockly-web/blockly-Web-Telegram-3-en.svg - Logo
                 
/images/2020-04-08-blockly-web/blockly-Web-Telegram-4-en.svg - Logo

With the On Message block you can define an action that the senseBox should perform when a certain message arrives via telegram. For example switching a LED on or off.

With the Send Message block a message can be sent via telegram to the user of the bot.

×

Subscribe

The latest tutorials sent straight to your inbox.