Page 1 of 1
WhatsApp or Telegram?
Posted: Sunday 26 June 2016 13:32
by Ritmeester
WhatsApp or Telegram?
For my new Raspberry Pi install I want a message system such as WhatsApp or Telegram.
I use om my smartphone WhatsApp but I can also use Telegram if necessary.
So, what is on this moment the best to install and use? WhatsApp or Telegram?
Re: WhatsApp or Telegram?
Posted: Sunday 26 June 2016 13:41
by sincze
Hi, good question.
I started with Telegram as it is widely documented and relatively easy to use with Domoticz.
As my girlfriend does not have Telegram I uses WhatsApp as well.
Keep in mind WhatsApp does not really like this (no official API) and the number you use to send out the messages can be blocked.
To go for safe use Telegram. To have some fun try WhatsApp.

Re: WhatsApp or Telegram?
Posted: Sunday 26 June 2016 14:54
by Ritmeester
Thanks.
I’m now trying WhatsApp but it seems that Telegram is more stable and has its own API .
I’m looking to Wiki pages but for me it is not exactly clear what I have to install for just receiving messages from my Domoticz system.
Can you help me with the correct link?
Re: WhatsApp or Telegram?
Posted: Sunday 26 June 2016 16:16
by Egregius
Create a telegram bot and then just call the api using curl or whatever, quite simple. Don't need anything installed.
Code: Select all
https://api.telegram.org/bot111592135:AAEZ-xCShO-RBfUrICiJs8q9A_3YIr9irxI/sendMessage?chat_id=123456&text=this is a test
Re: WhatsApp or Telegram?
Posted: Sunday 26 June 2016 16:43
by jvdz
As stated, just create the Bot as described here:
https://www.domoticz.com/wiki/Telegram_Bot
Jos
Re: WhatsApp or Telegram?
Posted: Sunday 26 June 2016 17:19
by sincze
Try the bot first indeed without any installation at all.
It is official so future proof I would say.
My system is still using the 'old' style telegram-cli
https://www.domoticz.com/wiki/Installin ... ion_System
Also rock solid. However does take some time to setup. But when it's up... it's up.
Re: WhatsApp or Telegram?
Posted: Sunday 26 June 2016 17:46
by Varazir
Another option is to use
http://joaoapps.com/join/
Add it to the Custom HTTP/action
#FIELD1= the key you get from the webpage
https://joinjoaomgcd.appspot.com/_ah/ap ... Id=#FIELD4
But this works only on android/Chrome(browser plugin)/win10(nativ app)
It has support for Tasker if you use that that.
Re: WhatsApp or Telegram?
Posted: Sunday 26 June 2016 17:54
by Egregius
The great advantage of Telegram is that you don't need to install anything on/in your domoticz AND that it has apps for all platforms.
I use Telegram for all kinds of notifications from several systems, couldn't think that I need to view my phone for each message.
Another great option is silent delivery, great for some logging messages.
Re: WhatsApp or Telegram?
Posted: Sunday 26 June 2016 19:05
by Derik
i mis both options here,,,:

- ScreenShot054.jpg (30.58 KiB) Viewed 3877 times
Can i send to different persons with Telegram?
Re: WhatsApp or Telegram?
Posted: Sunday 26 June 2016 19:19
by jvdz
Just use the HTTP option which you define in "Custom HTTP/Action:" for sending messages via the Telegram bot.
To send it to multiple devices you can use a chat_id of a GroupChat containing all person you want to send the text to.
Jos
Re: WhatsApp or Telegram?
Posted: Sunday 26 June 2016 19:51
by Ritmeester
I have stopped with WhatsApp integration because of the install problems
in this topic
I did try Telegram and managed to make a bot according to
this Wiki page and enter the Telegram data into Domoticz.
I’m really impressed !!
It is working fine and I receive messages on my Android phone from a PIR sensor in my test setup. It is really fast, when I put my finger by the sensor the message is already on my phone.
Now I must figure out how to get an image from one of my camera’s into Telegram message.
Thanks for helping me to put me on the right way.
(My test setup on the table. The new Pi will be the new system. The hardware I made by myself.)
Re: WhatsApp or Telegram?
Posted: Sunday 26 June 2016 19:56
by jvdz
This is the bash script I use from the DTGBOT setup. It gets the Image from the camera and sends it via telegram:
Code: Select all
#!/bin/sh
SendMsgTo=$1
#################################################################
SnapFile="/var/tmp/camsnapshot.jpg"
wget -O $SnapFile "192.168.0.30:8080/camsnapshot.jpg?idx=1"
#sleep 1
curl -s -X POST "https://api.telegram.org/bot"$TelegramBotToken"/sendPhoto" -F chat_id=$SendMsgTo -F photo="@$SnapFile"
/bin/rm $SnapFile
Should get you started.
Jos
Re: WhatsApp or Telegram?
Posted: Sunday 26 June 2016 20:21
by Derik
jvdz wrote:This is the bash script I use from the DTGBOT setup. It gets the Image from the camera and sends it via telegram:
Code: Select all
#!/bin/sh
SendMsgTo=$1
#################################################################
SnapFile="/var/tmp/camsnapshot.jpg"
wget -O $SnapFile "192.168.0.30:8080/camsnapshot.jpg?idx=1"
#sleep 1
curl -s -X POST "https://api.telegram.org/bot"$TelegramBotToken"/sendPhoto" -F chat_id=$SendMsgTo -F photo="@$SnapFile"
/bin/rm $SnapFile
Should get you started.
Jos
Can i send with this option the image to different persons/contacts?
Re: WhatsApp or Telegram?
Posted: Sunday 26 June 2016 20:24
by Derik
jvdz wrote:Just use the HTTP option which you define in "Custom HTTP/Action:" for sending messages via the Telegram bot.
To send it to multiple devices you can use a chat_id of a GroupChat containing all person you want to send the text to.
Jos
Sorry i am a dombo with this coolstuff...
Please explane some more things with a picture...
Re: WhatsApp or Telegram?
Posted: Monday 27 June 2016 13:38
by Ritmeester
I take a look to the above script. Do I have to install the DTGBOT libraries to get this script to work?
Re: WhatsApp or Telegram?
Posted: Monday 27 June 2016 15:11
by jvdz
Ritmeester wrote:Do I have to install the DTGBOT libraries to get this script to work?
No need for that. Just referenced the source of te script. '
DTGBOT install is only needed when you want to be able to Domoticz actions from your Telegram client.
Jos
Re: WhatsApp or Telegram?
Posted: Monday 27 June 2016 18:56
by Ritmeester
jvdz wrote:
No need for that. Just referenced the source of te script. '
DTGBOT install is only needed when you want to be able to Domoticz actions from your Telegram client.
Jos
Thanks Jos,
It’s getting clear to me now how thing are working with Telegram. I will try this script tomorrow.
Re: WhatsApp or Telegram?
Posted: Monday 27 June 2016 20:16
by Egregius
You don't need the script if you only want notifications.
You only need the script if you want to switch stuff on/off from within Telegram.