TelegramBot with ESP8266

1,169 views
Skip to first unread message

Domenico Carvetta

unread,
Oct 4, 2016, 11:13:41 AM10/4/16
to souliss
Is there anybody who is available to share some activity on the TelegramBot ?
Even if it's not totally related to the Souliss, but who knows!
Waiting for your reply soon.

Yuri Kutovoy

unread,
Oct 5, 2016, 2:41:50 AM10/5/16
to souliss
Dear Domenico,
I've played with Telegram Bot for my work (windows administration)
But it seems not very difficult, just web requests.
here is parts of my powershell script, i suggest it is possible to do on any programming language 

Import-Module activedirectory

$StartDate=(GET-DATE)
$botkey = "239344565:BBFMrU3BhBC0HeHfAhl09ThqngQD_i_aevA"

$str_help = @"
available commands:
/Users (Starts script to import users from 1C csv file)
/CreateUser (Creats new user. Mandatory parameter "Famil Name Midname")
/finduser (Lists users accounts, possible sirch in "en" and "ru")
/AddMailToUser (Add exchange mail account to username)
/cisco (Restarts port on router, example "/cisco 10.1.10.7 fa0/23")
/CopyUserGroups (copy group memberoff from first to second account vasileva_vv vasilev_vv)
/Help (Displays this help)
"@

$offset = 0

while($true) {
$json = Invoke-WebRequest -Uri $getUpdatesLink -Body @{offset=$offset} | ConvertFrom-Json
$l = $json.result.length
$i = 0
while ($i -lt $l) {
$offset = $json.result[$i].update_id + 1
        $date = get-date "1/1/1970"
        $EndDate = $date.AddSeconds($json.result[$i].message.date).ToLocalTime()
        if((NEW-TIMESPAN –Start $EndDate –End $StartDate).TotalSeconds -le 2){
            switch($json.result[$i].message.text.split(' ')[0]){
            '/users' {
                start-process powershell.exe N:\scripts\Create_ADUsers_CSV_File.ps1
            }
            '/CreateUser' {
                start-process powershell.exe $str_param
            }
            '/AddMailToUser' {
                start-process powershell.exe "N:\scripts\add_mail_to_user_command_line.ps1 -user_id $str_UserId"
            }
            '/CopyUserGroups' {
                start-process powershell.exe $str_param
            }
            '/finduser' {
                 start-process powershell.exe $str_param

            }
            '/Help' {
                 start-process powershell.exe $str_param

            }
            '/?' {
                 start-process powershell.exe $str_param

            }
            '/cisco' {
                start-process powershell.exe "n:\scripts\reboot_cisco_port.ps1 -cisco_ip $bot_ip -cisco_port $bot_port"

            }
        }
        }
$i++
}
Start-Sleep -s 2
}


Domenico Carvetta

unread,
Oct 5, 2016, 3:07:10 AM10/5/16
to souliss
Dear Yuri,

first of all thanks for your reply; it seems not to many people co-working with TelegramBot right now.
I think that TelegramBot can represent a big and important opportunity for the outcoming IoT.

Btw, I ask you to share some codes to be able to do few things like to get temp, humidity, turnOn light, turnOff light ect ect etc...
I have in my hands an code example and it works fine but I have many doubts due to programming issues you may know.


I saw your powershell script, but I can't do nothing because is not easy to understand for me.

Flavio P.

unread,
Oct 5, 2016, 3:28:57 AM10/5/16
to sou...@googlegroups.com
You can play Telegram, with OH in a few minutes.
It's really real-time-notification!
Otherwise you can use TelegramBot inside your mcu, avr/esp, with a dedicated library on library manger of Arduino IDE, but i've never tried.

Flavio

--
You received this message because you are subscribed to the Google Groups "souliss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to souliss+unsubscribe@googlegroups.com.
To post to this group, send email to sou...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/souliss/77581331-9972-42d5-a489-1cc2d7426475%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
P ********* Consideriamo l'ambiente prima di stampare questa e-mail *** Think about environment before printing *********
Il contenuto di questo messaggio e-mail è privato e riservato al solo destinatario. L'utilizzo non autorizzato può costituire reato. Se ricevuto erroneamente siete pregati di cancellarlo e comunicarci via e-mail l'errata ricezione.

domenico carvetta

unread,
Oct 5, 2016, 3:33:07 AM10/5/16
to souliss
Right Flavio!
I want to use the second option you know; the TelegramBot inside the mcu, avr/esp, with a dedicated library.
Is there anybody willing to co-work with me ?

Flavio P.

unread,
Oct 5, 2016, 3:37:44 AM10/5/16
to sou...@googlegroups.com
It's intresting, what's your problem with this library?

Flavio

--
You received this message because you are subscribed to the Google Groups "souliss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to souliss+unsubscribe@googlegroups.com.
To post to this group, send email to sou...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

domenico carvetta

unread,
Oct 5, 2016, 3:40:32 AM10/5/16
to souliss
Dear Flavio, none problem with the library; it works fine.
I want to extend the simple examples reported into the library you know.
We can integrate with further functions than those already reported.
That's all!

Flavio P.

unread,
Oct 5, 2016, 3:49:40 AM10/5/16
to sou...@googlegroups.com
I don't understand very well....
You say:
to be able to do few things like to get temp, humidity, turnOn light, turnOff light ect ect etc...

This library can do this at now!
Can you explain me better? Show me some example please....

Flavio

--
You received this message because you are subscribed to the Google Groups "souliss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to souliss+unsubscribe@googlegroups.com.
To post to this group, send email to sou...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

domenico carvetta

unread,
Oct 5, 2016, 4:00:30 AM10/5/16
to souliss
For example:
Pls see attached part of the code for the Echo messages reported into the library.

===================
/********************************************
 * EchoMessages - function to Echo messages *
 ********************************************/

void Bot_ExecMessages() {
  for (int i = 1; i < bot.message[0][0].toInt() + 1; i++)      {
    bot.message[i][5]=bot.message[i][5].substring(1,bot.message[i][5].length());
    if (bot.message[i][5] == "\/ledon") {
      digitalWrite(13, HIGH);   // turn the LED on (HIGH is the voltage level)
      bot.sendMessage(bot.message[i][4], "Led is ON", "");
    }
    if (bot.message[i][5] == "\/ledoff") {
      digitalWrite(13, LOW);    // turn the LED off (LOW is the voltage level)
      bot.sendMessage(bot.message[i][4], "Led is OFF", "");
    }
    if (bot.message[i][5] == "\/start") {
      String wellcome = "Wellcome from FlashLedBot, your personal Bot on ESP8266 board";
      String wellcome1 = "/ledon : to switch the Led ON";
      String wellcome2 = "/ledoff : to switch the Led OFF";
      bot.sendMessage(bot.message[i][4], wellcome, "");
      bot.sendMessage(bot.message[i][4], wellcome1, "");
      bot.sendMessage(bot.message[i][4], wellcome2, "");
      Start = true;
    }
  }
  bot.message[0][0] = "";   // All messages have been replied - reset new messages
}

=================

1- what is the meaning of 4 into this syntax <bot.sendMessage(bot.message[i][4]> ?
2- what does mean <bot.message[i][5]=bot.message[i][5].substring(1,bot.message[i][5].length());> ?
3- waht is the meaning of 5 into this syntax <bot.message[i][5]> ?



Flavio P.

unread,
Oct 5, 2016, 4:36:36 AM10/5/16
to sou...@googlegroups.com
This is the pointer for the message.
You can see deeply in library for understand this.

I think have a better user-code side :)

Flavio

--
You received this message because you are subscribed to the Google Groups "souliss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to souliss+unsubscribe@googlegroups.com.
To post to this group, send email to sou...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

domenico carvetta

unread,
Oct 5, 2016, 5:20:42 AM10/5/16
to souliss
Hi Flavio, yes I know.
But you didn't tell me because "5" e not "6" for example; I think there should be a relevant meaning. Am I wrong?

I checked that library, but it reported what is already contained into those beginning examples.
I found as follows, even in italian language:

Flavio P.

unread,
Oct 5, 2016, 5:49:25 AM10/5/16
to sou...@googlegroups.com
Domenico i wrote:
This is the pointer for the message.
You can see deeply in library for understand this.

I think you haven't check library deeply :)
You can see here for example ;)

Flavio




--
You received this message because you are subscribed to the Google Groups "souliss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to souliss+unsubscribe@googlegroups.com.
To post to this group, send email to sou...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

domenico carvetta

unread,
Oct 5, 2016, 5:51:38 AM10/5/16
to souliss
Dear Flavio,
I apologize; I forgot to see there, thanks a lot for explanation.
Now it looks like more clear than before :-)


--
You received this message because you are subscribed to a topic in the Google Groups "souliss" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/souliss/SB6chOsj2sE/unsubscribe.
To unsubscribe from this group and all its topics, send an email to souliss+unsubscribe@googlegroups.com.

To post to this group, send email to sou...@googlegroups.com.

domenico carvetta

unread,
Oct 5, 2016, 5:53:41 AM10/5/16
to souliss
It's my pleasure to learn by you :-)


2016-10-05 11:51 GMT+02:00 domenico carvetta <carvetta...@gmail.com>:
Dear Flavio,
I apologize; I forgot to see there, thanks a lot for explanation.
Now it looks like more clear than before :-)

Zoomx Pirollo

unread,
Oct 10, 2016, 4:15:58 AM10/10/16
to souliss
My experience was only a bot test using an ESP8266. I used the witnessmenow library because the original one written by Giambacchio had some issue and I got my ESP8266 rebooting. It seemd that there was a part of code where there was a long wait so I had a watchdog reset. But since then, Giambacchio updated his library.


Domenico Carvetta

unread,
Oct 10, 2016, 6:10:30 AM10/10/16
to souliss
Ciao Roberto,
my test experience seems to the same than yours. I don't know the "witnessmenow library", pls share it with me, thanks.

I got ESP8266 always rebooting, when I use ESP12F, viceversa I got none problem if I use the ESP-201 and ESP-01 (few ESP-201 have sometimes even rebooting).
You said that a part of code should have bug, but has been fixed right now. Am I wrong ?



Zoomx Pirollo

unread,
Oct 10, 2016, 9:32:29 AM10/10/16
to souliss
Ciao Domenico,

Flavio posted this link before
https://github.com/witnessmenow/Universal-Arduino-Telegram-Bot
I used this example
https://github.com/witnessmenow/Universal-Arduino-Telegram-Bot/blob/master/examples/ESP8266/EchoBot/EchoBot.ino

I don't know if it was a flaw in my code (I doubt, I used the example as it was but maybe I made an error) or in the library.
I used the other library and I had success using a nodeMCU.
Since my first test Gianbacchio updated his library but I never tested it.

Unfortunately most people use Whatsapp so I have Telegram in only one device so, from my point of view, it is like to have the Souliss app. But it is interesting.
I have not tested to catch the chat ID so the bot will answer only to me and ignore the others.

Domenico Carvetta

unread,
Oct 10, 2016, 9:47:33 AM10/10/16
to souliss
Ciao Roberto,
thanks for your update this post.
First, I am going to try those examples into the <witnessmenow>; I will say you soon, maybe this evening.
Second, you said that you had none problem using nodeMCU and Gianbacchio library. Right ?

Zoomx Pirollo

unread,
Oct 10, 2016, 9:52:53 AM10/10/16
to souliss
I had problem with nodeMCU board and Giambacchio library and example. I usually start with nodeMCU board and then, when all thing works go to ESP01 or others.
The only differences between al ESP8266 modules are the GPIO exposed (there are tricks for ESP01), the antenna model and the flash amount.
nodeMCU has the simplest way to upload code, it is exactly like a UNO.

Domenico Carvetta

unread,
Oct 10, 2016, 9:57:59 AM10/10/16
to souliss
Ok, now sounds more clear than before.

Unfortunately, as I said before, I have re-booting problem with Gianbacchio library and ESP-201.
Now, in order to double confirm if there should be a code issue or hardware issue, I will use the other library you know.

Zoomx Pirollo

unread,
Oct 11, 2016, 9:34:14 AM10/11/16
to souliss
I found my notes about the experiment with Giambacchio library.

I made it on 17 of March.

I got this crash message

WiFi connected
IP address:
192.168.137.29
GET Update Messages
.... connected to server

Exception (29):
epc1=0x4000dfa9 epc2=0x00000000 epc3=0x00000000 excvaddr=0x00000000 depc=0x00000000

ctx: cont
sp: 3fff15d0 end: 3fff1950 offset: 01a0

>>>stack>>>
3fff1770:  3fff0918 00000000 00000000 3fff1700 
3fff1780:  3fff0918 00000c8b 00000c8b 4010020c 
3fff1790:  00000002 00000017 00000004 402281b4 
3fff17a0:  3fff3b2c 0000001d 0000440c 00000000 
3fff17b0:  3fff3b2c 3ffe91ec 00000002 4022927f 
3fff17c0:  00000002 00000000 3fff3b2c 402281a6 
3fff17d0:  00000050 3fff8ddc 3fff07a0 3fff18b0 
3fff17e0:  3ffe9924 00000000 3fff07a0 40203980 
3fff17f0:  00000049 00000001 3fff1840 40204505 
3fff1800:  3ffe91ec 3fff07a0 3fff07a0 40203980 
3fff1810:  3ffe9924 3fff07a0 3fff07a0 40205530 
3fff1820:  3ffe9924 3fff07a0 3fff1840 40205575 
3fff1830:  0000005c 3fff07a0 3fff18d4 40202b12 
3fff1840:  3fff8ddc 0000004f 00000049 3fff3a44 
3fff1850:  0000000f 00000000 3fff2684 0000000f 
3fff1860:  00000000 3fff1adc 0000000f 00000002 
3fff1870:  3ffe91e8 c6a79a95 3fff18b0 40205f1e 
3fff1880:  3fff1990 3fff01dc 3fff18b0 40206020 
3fff1890:  3fff1990 3fff01dc 00000000 3fff1920 
3fff18a0:  3fff1990 3fff01dc 00000000 40202c17 
3fff18b0:  3fff376c 0000004f 00000044 401006d8 
3fff18c0:  00000000 0000000b 3fff1920 40205e96 
3fff18d0:  3fff27bc 3fff37cc 0000000f 00000000 
3fff18e0:  3fff2624 0000004f 00000044 40205f1e 
3fff18f0:  3fffdad0 00000000 3fff1920 40206020 
3fff1900:  1d89a8c0 00ffffff 3fff01d8 3fff0924 
3fff1910:  3fffdad0 00000000 3fff01d8 40202562 
3fff1920:  3fff1abc 0000000f 00000001 feefeffe 
3fff1930:  feefeffe 00000000 3fff091c 4020413c 
3fff1940:  feefeffe feefeffe 3fff0930 40100958 
<<<stack<<<

 ets Jan  8 2013,rst cause:1, boot mode:(1,7)

Then I searched here
 https://github.com/esp8266/Arduino/blob/master/doc/exception_causes.md
and found this
Exception (29): StoreProhibitedCause  A store referenced a page mapped with an attribute that does not permit stores  Region Protection or MMU EXC-VADDR Loaded Yes



Domenico Carvetta

unread,
Oct 11, 2016, 9:42:31 AM10/11/16
to souliss
Dear Roberto,
this is my log; it seems works fine but sometimes re-boot it.


================
......
WiFi connected
IP address: 
192.168.1.7
GET Update Messages 
Sent Update request messages up to : 0
{"update_id":68910563,
"message":{"message_id":1667,"from":{"id":25017209,"first_name":"Domenico","last_name":"Carvetta"},"chat":{"id":25017209,"first_name":"Domenico","last_name":"Carvetta","type":"private"},"date":1475931006,"text":"off"}},

off
GET Update Messages 
Sent Update request messages up to : 689105635
{"update_id":68910563,
"message":{"message_id":1668,"from":{"id":25017209,"first_name":"Domenico","last_name":"Carvetta"},"chat":{"id":25017209,"first_name":"Domenico","last_name":"Carvetta","type":"private"},"date":1475931028,"text":"On"}},

On
GET Update Messages 
Sent Update request messages up to : 689105636
{"update_id":68910563,
"message":{"message_id":1669,"from":{"id":25017209,"first_name":"Domenico","last_name":"Carvetta"},"chat":{"id":25017209,"first_name":"Domenico","last_name":"Carvetta","type":"private"},"date":1475931160,"text":"On"}}]}

On
GET Update Messages 
Sent Update request messages up to : 68910563
no new messages

GET Update Messages 
Sent Update request messages up to : 68910563
no new messages

GET Update Messages 
Sent Update request messages up to : 68910563
no new messages

GET Update Messages 
Sent Update request messages up to : 68910563
no new messages

GET Update Messages 
Sent Update request messages up to : 68910563
no new messages

GET Update Messages 
Sent Update request messages up to : 68910563
no new messages
Screenshot_2016-10-04-16-51-12.png

Zoomx Pirollo

unread,
Oct 11, 2016, 10:36:00 AM10/11/16
to souliss
Wich library did you use?

Anyway my test with witnessmenow librart lasted only few messages.

Domenico Carvetta

unread,
Oct 11, 2016, 12:22:11 PM10/11/16
to souliss
Dear Roberto,
I used the Gianbacchio's library I got from his github.
I want to double check if the "witnessmenow" library provides same results than Gianbacchio's one.
I will keep you posted soon.
ps. I spent today some times to co-work with Dario2 about a DeepSleep()function of esp8266.

Lorenzo Giordano

unread,
Nov 6, 2016, 4:26:55 AM11/6/16
to souliss
Hi Roberto,
I had the same issue with both library when integrating in the souliss sketch since I also had in the same sketch a webserver
Removing the webserver I solve the problem.
I suppose there is a conflict between http of the webserver and https which it is necessary for Telegram bot ... probably that's the exception error.

Ciao
Lorenzo

domenico carvetta

unread,
Nov 6, 2016, 4:52:17 AM11/6/16
to souliss

Hi Lorenzo

I didn't try yet to integrate it into souliss sketch.

Could you please send me your test sketch to be able to duplicate this experience, thanks ?

Domenico

Zoomx Pirollo

unread,
Nov 6, 2016, 1:33:05 PM11/6/16
to souliss
Lorenzo,
I never used Soluiss and Telegram Bot together.

Ciao
Roberto

Lorenzo Giordano

unread,
Nov 7, 2016, 4:05:01 PM11/7/16
to souliss
Domenico,
this is the very first example of Souliss integration

It is composed of  two T52 and one T11

The T52 are populated by 2 different nodes with the PullData function (just for test I connected them to my already installed T52)
The T11 is just software and you can switch on/off by SoulissApp

There are 2 different telegram message types:
1- Replay to user input 
2- Send warning message to a group chat

1a- type /temp to ask for Temperature of the 2 T52
1b- type /ledon to switch on the T11
1c- type /ledoff to switch off the T11
1d- type /status to get the T11 status
1e- type /start to get command description

2- When the T11 swiched on Souliss send warning message to the chat


It is just a very first test .... 
Ciao
Lorenzo 
N12_Telegram_ESP_b01_es.ino

Di Maio, Dario

unread,
Nov 8, 2016, 2:39:24 PM11/8/16
to sou...@googlegroups.com

Bel lavoro Lorenzo!

From Mobile.

--
You received this message because you are subscribed to the Google Groups "souliss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to souliss+unsubscribe@googlegroups.com.
To post to this group, send email to sou...@googlegroups.com.

Lorenzo Giordano

unread,
Nov 9, 2016, 3:40:29 PM11/9/16
to souliss
Grazie Dario ma è solo l'inizio devo ancora migliorare un po'.
Ciao
Lorenzo

domenico carvetta

unread,
Nov 9, 2016, 3:42:34 PM11/9/16
to souliss

Mi associo anche io!

Zoomx Pirollo

unread,
Nov 11, 2016, 5:08:37 AM11/11/16
to souliss
Complimenti anche da me.

Suggerimento/Suggestion
Dopo queste due righe
    String chat_id = String(bot.messages[i].chat_id);
    String text = bot.messages[i].text;

[it]io farei un controllo sulla chat_id altrimenti credo succeda che chiunque ti accende il Led con un semplice messaggio.
In questo modo solo alcuni client possono effettuare cambiamenti.
[en] check the chat_id to avoid that everyone can turn on/off with a simple message.

Domenico Carvetta

unread,
Nov 11, 2016, 6:35:48 AM11/11/16
to souliss
Yes, I agree to have chat_id control and check.
How do you suggest to modify those lines?
Maybe as follows ok ?


add
..
..

#define chat_id "xxxxxxxxxxx"

Lorenzo Giordano

unread,
Nov 11, 2016, 7:32:09 AM11/11/16
to souliss
Hi
First of all you can reduce the members who can message with the Bot by setting the private mode in Telegram and send invitation just to the required member.

Futhermore you can decide to let some commands just to you by simple modify for those command "chat_id" with "my_chat_id" of course defining "my_chat_id" at the beginning

Or you can simply do not disclose all the commands to the members and find strange name to your commands which of course you will not send via group_chat by just in the direct chat with the BOT.

Include all chat members-id in the sketch is to me not flexible at all....

As soon as I can I will prepare a tutorial also for Telegram BOT setting ... but I don't know when.

My english is poor therefore If you did not understood let me know and I will try in Italian ;-)

Ciao
Lorenzo

domenico carvetta

unread,
Nov 11, 2016, 7:36:07 AM11/11/16
to souliss
Hi Lorenzo, thanks a lot!

Question: what about as follows into yr sketch?

String chat_group="xxxxxxxxxxxxx";

Is this a kind of BOTusername like for example "Hdomoticabot", a string with _bot at the end ????


Zoomx Pirollo

unread,
Nov 11, 2016, 3:28:54 PM11/11/16
to souliss
After the first message you know the chat_id, it is printed by the bot. The chat_id is chosen by telegram and it is the one that identify you and another telegram client.

Then a simple if then to check that the chat_id is the one you expect and you're done, I believe.

Lorenzo Giordano

unread,
Nov 11, 2016, 3:29:58 PM11/11/16
to souliss
Domenico,
this is a group chat.
If you want Souliss send messages (i.e. warnings) to all members (i.e. your family) you need to create a group chat in telegram and invite all your family members and the bot.
Chat-Group is the chat id of that group.
In this way Souliss can send warning message to the group and all can read.

I will explain better in the tutorial .... but if you like we can discuss detail in Italian ...in italian group ;-)
Ciao
Lorenzo

Lorenzo Giordano

unread,
Nov 11, 2016, 3:40:00 PM11/11/16
to souliss
Hi Roberto it is true...but if you need to add a member later you need to change the code in all nodes.... while you can manage in the same way just add people in the group chat in Telegram without touching the code

In general since I am preparing some souliss system also to my brother who just install what I give him and he does not understand anything on it, I would like to keep him free to manage his group without asking me to change the code.

Regards
Lorenzo

Domenico Carvetta

unread,
Nov 12, 2016, 3:17:35 AM11/12/16
to souliss
Ok guys.
I switch to the italian Forum.



Di Maio, Dario

unread,
Nov 13, 2016, 6:03:28 AM11/13/16
to sou...@googlegroups.com
Have you tried to get Telegram getting updates, looking at the documentation you need to use long polling or websockets, does this works properly with ESP8266 TCP/IP libraries?

Dario.

Di Maio, Dario

unread,
Nov 13, 2016, 7:05:39 AM11/13/16
to sou...@googlegroups.com
Just having a try, looks like that all TelegramBot give free access to anyone. So I'm expecting that even if you are adding the bot to a chat, accessing the bot directly will give to anyone access to the commands.

Is it?

Dario.

Di Maio, Dario

unread,
Nov 13, 2016, 10:21:35 AM11/13/16
to sou...@googlegroups.com
Had a try, the answer is yet. Anyone can interact unless the chat_id is used to restrict it.

From my test, a chat_id of  a group doesn't change when you add or delete members, so that's a good way to restrict the interaction.

Dario.

domenico carvetta

unread,
Nov 13, 2016, 11:15:29 AM11/13/16
to souliss

Super! !

domenico carvetta

unread,
Nov 13, 2016, 11:18:51 AM11/13/16
to souliss

I tested it and looks like you said.

Di Maio, Dario

unread,
Nov 13, 2016, 2:14:23 PM11/13/16
to sou...@googlegroups.com
The attached example is an auxiliary Gateway, it collects data from another node in the Souliss network, in my case LYT8266, a post the result on a Telegram group.

It allow the group members to control the on/off of the bulb.

If someone would like to have a try, that sketch is now running on an ESP8266 in my network. Join the gitter chat https://gitter.im/souliss/souliss-telegram  and give me your Telegram username, I will add you to the group so that you can try the Telegram integration.

Dario.
Souliss_Telegram.ino

Lorenzo Giordano

unread,
Nov 13, 2016, 4:06:01 PM11/13/16
to souliss
Great Dario.
Concerning privacy you are right. I misunderstood the bot privacy mode which it is related to a group only and noto to a Bot chat itself.
Since che only way for the Bot to send message it is on a group chat I agree to USe always the group chat. Only draw back is that anybody can see yourcommand to the Bot which can be boring.
Ciao
Lorenzo

Di Maio, Dario

unread,
Nov 13, 2016, 4:08:38 PM11/13/16
to sou...@googlegroups.com

Not really, try with @PliniosHomeBot you will have access but you will not see any command. Because it answer only on the group that I've created.

You can use the Keyboard feature to avoid any typing.

Dario.

From Mobile.

--
You received this message because you are subscribed to the Google Groups "souliss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to souliss+unsubscribe@googlegroups.com.
To post to this group, send email to sou...@googlegroups.com.

Lorenzo Giordano

unread,
Nov 13, 2016, 5:01:08 PM11/13/16
to souliss
Dario, that's exactly what I said.
If I look to your sketch, The bot will answer only if your message is in a chat group.
This means that Every group member sending command to the bot will Also send message to alla group members. Andò the bot will replay Also to everybody.... too many messages will probably reduce the attention to the automatico warning message of the bot itself ..that's why I was thinking to USe the group mainly forma the warning message and directory chat for user command.
Alternative can be to nave 2 differenti group : one for user commands which fan be in silente mode andò zone just for bot warnings.
Ciao
Lorenzo


Lorenzo Giordano

unread,
Nov 13, 2016, 5:04:27 PM11/13/16
to souliss
I hate the android automatic correction . :(
Sorry I hope you can undestand
Ciao
Lorenzo
Reply all
Reply to author
Forward
0 new messages