Select Page

HOW TO SEND MULTIPLE TYPE OF TELEGRAM MESSAGES WITH ILEVIA

INTRODUCTION

In this part of the guide it is explain how to set up multiple kind of messages that can be sent to the recipient. The messages can be sent as multiple selection messages (require a selection from the recipient), as image with description (send a message with an image attached) or as video message (send a video),

Multiple selection messages

The multiple selection messages allows the use to receive a messages that suggest multiple action such as: turn off certain light because no one is detected in a specific room for energy management or suggest to recharge the battery if the energy produced from the sun panel exced on the one consumed.

In this example it is explained how to set up the Telegram messages in order to suggest 3 possible energy management ways to manage the exceded energy produced by the sun panels.

Components configuration

Step 1:

In this example the sun panel will be replaced with a simple copy value logic that will copy a fake value into a info component that will simulate the energy production. Add the following components:

All the needed components in order to set up the telegram multiselection message function within the Ilevia's configuration software EVE Manager.
Step 2:

Set the copy value to the Changeable Value component in order to copy its value to the Info component.

Adding the copy value function to setup the fake energy meter logic for the test of the Telegram mutiselection message within the Ilevia's configuration software EVE Manager.
Step 3:

Set up the telegram component with your own Telegram ID. Refer to the How to get the Telegram ID part of this guide for further information about getting your telegram ID.

Setting up the Telegram component within the Ilevia's configuration software EVE Manager.
Step 4:

The script to insert within the Javascript component is the following:

function Exceded energy (res)

{
var consumed= getValueAsBoolean(17);
if(consumed>=4000){
log(res);
return “ok, i will ” +res;
}
}

sendTelegramRequest(“Your_telegram_id”,”You are making a lot of energy, do you want to use it for:”,”Boiler|Charge battery|Make the swimming pool warmer”,”Exceded energy”);

Basically the script will send a message to the specified Telegram ID once the value reaches the set threshold displaying the 3 possibilities set within the parameter sendTelegramRequest.

This is the script that will send the telegram message to the recipient configured within the Ilevia's configuration software EVE Manager.
Step 5:

Add the Changeable value component and the Info component into the user interface.

Adding the components into the Interface of the Ilevia's App EVE Remote Plus.

VISUAL RESULT

This is the visual result within the Telegram app once the threshold is reached by the Energy meter. As you can see from the picture below, the message will display 3 possible choices that once pressed can trigger other logic setup inside the Ilevia server.

EVE Remote Plus

Here is displayed the copy value logic in order to trigger the Telegram message by reaching the threshold

Telegram App

This is how the multi-function telegram message is displayed within the telegram App.

Click the link below to download the demo project and try it your self.

Download the demo project here!

Message with image attached

This part of the guide will explain how to set up the telegram message to send an image attached once a component is triggered.

Components configuration

Step 1:

In this example we will simulate a doorbell rang that will trigger the Telegram message. Add the following components into the project:

List of needed components in order to setup the Telegram Image message within the Ilevia configuration software EVE Manager
Step 2:

Now add the script that will link the triggering of the Doorbell with the sending of the image to the Recipient.

function doorbellAlert(){

var doorBell= getValueAsBoolean(19);

if(doorBell==true){

sendTelegramImage(“Your_telegram_id”,”Someone rang the doorbell”,”Http URL or Http string of the ip camera image”);
}
}

setTrigger(19, “doorbellAlert”);

Needed script in order to send the telegram message with the image attached set up within the Ilevia's configuration software EVE Manager.
Step 3:

Add the switch component into the user interface and upload the project to the server.

Uploading the project into the server to test the Telegram Image message within the Ilevia's App EVE Remote Plus.

VISUAL RESULT

On the left you can see the test of the Telegram message by triggering the Switch component to simulate the Doorbell.

EVE Remote Plus

Telegram App

How the final result of the telegram message configuration within the Ilevia's configuration softawre EVE Manager looks like within the Telegram App.

Click the link below to download the demo project and try it your self.

Download the demo project here!

Still Need Help? Our Customer Service Is Here For You.