Modify Create/Clear Alarm & Send Email Adding the required nodes
The following section shows you how to modify this rule chain from scratch. Create/Clear Alarms & send notifications to Telegram:.The following screenshots show how the above Rule Chains should look like: We modified Rule Chain Create & Clear Alarms by adding nodes that was described above in the section Message flowĪnd renamed this rule chain to: Create/Clear Alarms & send notifications to Telegram. In this tutorial, we used Rule Chains from create & clear alarms tutorial. This is the so-called chat_id.Īfter that, you can start to configure Rule engine to use Rest API Call extension. "YOUR_BOT_TOKEN" has to be replaced by the authentication token of your bot, e.g.:įrom the outcoming data you can find field ‘id’. Next, open your web browser and enter the following URL: Where ThingsBoard_Bot is name of the Telegram bot. In the group where your Bot was added as a member. There are several ways to get the Chat ID:įirst of all, you need send some message to your Bot: The Chat ID is needed to send messages via the HTTP API. In the next step, we need to retrieve a Chat ID. The token is a string that looks like this - ‘110201543:AAHdqTcvCH1vGWJxfSeofSAs0K5PALDsaw’ that is required to authorize the bot. Once the creation of the bot is finished, you can generate an authorization token for your new bot. The BotFather is the main bot that will help you to create new bots and change their settings. This node will send Telegram message payload to the configured REST endpoint.This node will be used to creating a body of the Telegram message notification.In this section, we explain the purpose of each node in this tutorial: We assume you have completed the following guides and reviewed the articles listed below: Send a message notification to the user if the alarm was created.Īdd current alarm type and it originator to the message body using Script Transform node. In this tutorial we will configure ThingsBoard Rule Engine to: Let’s assume your device is using DHT22 sensor to collect and push temperature readings to ThingsBoard.ĭHT22 sensor is good for -40 to 80☌ temperature readings.We want to generate Alarms if temperature is out of good range and send notifications to Telegram App when the alarm was created. We will reuse the rule chains from above mentioned tutorial and will add few more rule nodes to integrate with Telegram This tutorial is based on the create & clear alarms tutorial and it’s use case. So, In this tutorial, we are going to demonstrate how you can create a Telegram BotĪnd configure your ThingsBoard rule engine to be able to send notifications to Telegram App using Rest API Call extension.
Telegram provides a possibility to create Telegram Bots, which are considered as third-party applications.