Zoneminder&Telegram (event instant messaging to your phone!)

Forum for questions and support relating to the 1.27.x releases only.
PacoLM
Posts: 971
Joined: Wed Dec 02, 2009 9:55 pm
Location: Spain

Re: Zoneminder&Telegram (event instant messaging to your phone!)

Post by PacoLM »

Hi,

I'm not activating anything from ZM, the Telegram daemon is running in the same computer where ZM is installed. The Telegram daemon is running a LUA script that is looking for some special words to be received, so if one on them is received, the command associated to that word is executed.
I will try to document everything during next week, if I find some free time!

Regards,
Paco

After more than 15 years, no longer using ZM as surveillance system.
Now in the dark side, using a commercial system...
woody4165
Posts: 5
Joined: Fri Feb 03, 2017 3:02 pm

Re: Zoneminder&Telegram (event instant messaging to your phone!)

Post by woody4165 »

Thanks, looks very Interesting...
pperry76
Posts: 2
Joined: Fri Apr 28, 2017 3:14 pm

Re: Zoneminder&Telegram (event instant messaging to your phone!)

Post by pperry76 »

Hey PacoLM,
can you post instructions on getting this to work? I can get around Zoneminder but have no clue about the telegram client.

Thanks for all your work.
disiami
Posts: 1
Joined: Fri Apr 19, 2019 12:44 pm

Re: Zoneminder&Telegram (event instant messaging to your phone!)

Post by disiami »

Reed2
Posts: 2
Joined: Sat Feb 06, 2021 10:43 am

Re: Zoneminder&Telegram (event instant messaging to your phone!)

Post by Reed2 »

PacoLM wrote: Mon Mar 24, 2014 6:41 pm Hi,

I was thinking in using my ZM server to be able to send instant messages to my phone with the pictures or videos. I found some information about how to send instant messaging with WhatsApp, but the company has changed the auth process, so I moved to Telegram (http://www.telegram.org).
You need to install expect (apt-get install expect).

Right now, I have Telegram CLI working in my ZM server (easy, just followed some instructions detailed here https://github.com/vysheng/tg), and wrote a simple bash script that allows me to send a message and a picture of the event.
yowhatsapp
This is the script, adapted from many different sources on the web:

Code: Select all

#!/usr/bin/expect
set user [lindex $argv 0]
set text [lindex $argv 1]
set image [lindex $argv 2]
set video [lindex $argv 3]
# this is the path where telegram CLI is installed and the public key for the server
spawn /usr/src/telegram/tg-master/telegram -k /usr/src/telegram/tg-master/tg.pub
expect "User"
send "msg $user $text\r"
send "send_photo $user $image\r"
send "send_video $user $video\r"
expect "Sent:"
send "safe_quit\r"
expect eof
It seems reasonable to add a new option in the filter settings, to allow users to send also a instant message instead of sending an email, ftp to a server, etc. If I have time, I will try to add the option in the filter window and also add the code in the zmfilter.pl. I have experience programming in C#, Tcl and VB, but I'm not 'fluent' in Python, Perl or PHP, so, if anyone wants to take the credits and add this feature...just go ahead!

Regards,

PacoLM
I hope this script still work's because since I have found about WhatsApp new update I also migrated to Telegram.
PacoLM
Posts: 971
Joined: Wed Dec 02, 2009 9:55 pm
Location: Spain

Re: Zoneminder&Telegram (event instant messaging to your phone!)

Post by PacoLM »

Reed2 wrote: Mon Feb 22, 2021 10:24 am
PacoLM wrote: Mon Mar 24, 2014 6:41 pm Hi,

I was thinking in using my ZM server to be able to send instant messages to my phone with the pictures or videos. I found some information about how to send instant messaging with WhatsApp, but the company has changed the auth process, so I moved to Telegram (http://www.telegram.org).
You need to install expect (apt-get install expect).

Right now, I have Telegram CLI working in my ZM server (easy, just followed some instructions detailed here https://github.com/vysheng/tg), and wrote a simple bash script that allows me to send a message and a picture of the event.
yowhatsapp
This is the script, adapted from many different sources on the web:

Code: Select all

#!/usr/bin/expect
set user [lindex $argv 0]
set text [lindex $argv 1]
set image [lindex $argv 2]
set video [lindex $argv 3]
# this is the path where telegram CLI is installed and the public key for the server
spawn /usr/src/telegram/tg-master/telegram -k /usr/src/telegram/tg-master/tg.pub
expect "User"
send "msg $user $text\r"
send "send_photo $user $image\r"
send "send_video $user $video\r"
expect "Sent:"
send "safe_quit\r"
expect eof
It seems reasonable to add a new option in the filter settings, to allow users to send also a instant message instead of sending an email, ftp to a server, etc. If I have time, I will try to add the option in the filter window and also add the code in the zmfilter.pl. I have experience programming in C#, Tcl and VB, but I'm not 'fluent' in Python, Perl or PHP, so, if anyone wants to take the credits and add this feature...just go ahead!

Regards,

PacoLM
I hope this script still work's because since I have found about WhatsApp new update I also migrated to Telegram.
Hello,

I do not kwon if still works. After some time fighting with scripts, I decided to create a Telegram Bot, so everything was more interactive.

Regards,
PacoLM

After more than 15 years, no longer using ZM as surveillance system.
Now in the dark side, using a commercial system...
Muzammal567
Posts: 1
Joined: Tue Jun 15, 2021 3:12 am

Re: Zoneminder&Telegram (event instant messaging to your phone!)

Post by Muzammal567 »

PacoLM wrote: Fri Feb 03, 2017 7:06 pm Hi,

I'm not activating anything from ZM, the Telegram daemon is running in the same computer where ZM is installed. The Telegram daemon is running a LUA script that is looking for some special words to be received, so if one on them is received, the command associated to that word is executed.
I will try to document everything during next week, if I find some free time!

Regards,
Paco
Thanks for sharing it.
kirito
Posts: 2
Joined: Wed Jul 07, 2021 1:52 pm

Re: Zoneminder&Telegram (event instant messaging to your phone!)

Post by kirito »

PacoLM wrote: Fri Feb 03, 2017 7:06 pm Hi,

I'm not activating anything from ZM, the Telegram daemon is running in the same computer where ZM is installed. The Telegram daemon is running a LUA script that is looking for some special words to be received, so if one on them is received, the command associated to that word is executed.
I will try to document everything during next week, if I find some free time!

Regards,
Paco
thanks Paco.. this post and also your previous posts were great help. thanks again for sharing so much with us.
Ryan70
Posts: 1
Joined: Sun Dec 05, 2021 9:15 am

Re: Zoneminder&Telegram (event instant messaging to your phone!)

Post by Ryan70 »

Reed2 wrote: Mon Feb 22, 2021 10:24 am
PacoLM wrote: Mon Mar 24, 2014 6:41 pm Hi,

I was thinking in using my ZM server to be able to send instant messages to my phone with the pictures or videos. I found some information about how to send instant messaging with WhatsApp, but the company has changed the auth process, so I moved to Telegram (http://www.telegram.org).
You need to install expect (apt-get install expect).

Right now, I have Telegram CLI working in my ZM server (easy, just followed some instructions detailed here https://github.com/vysheng/tg), and wrote a simple bash script that allows me to send a message and a picture of the event.
yo whatsapp
This is the script, adapted from many different sources on the web:

Code: Select all

#!/usr/bin/expect
set user [lindex $argv 0]
set text [lindex $argv 1]
set image [lindex $argv 2]
set video [lindex $argv 3]
# this is the path where telegram CLI is installed and the public key for the server
spawn /usr/src/telegram/tg-master/telegram -k /usr/src/telegram/tg-master/tg.pub
expect "User"
send "msg $user $text\r"
send "send_photo $user $image\r"
send "send_video $user $video\r"
expect "Sent:"
send "safe_quit\r"
expect eof
It seems reasonable to add a new option in the filter settings, to allow users to send also a instant message instead of sending an email, ftp to a server, etc. If I have time, I will try to add the option in the filter window and also add the code in the zmfilter.pl. I have experience programming in C#, Tcl and VB, but I'm not 'fluent' in Python, Perl or PHP, so, if anyone wants to take the credits and add this feature...just go ahead!

Regards,

PacoLM
I hope this script still work's because since I have found about WhatsApp new update I also migrated to Telegram.
I have also switched to telegram but the problem is my friends and family use Whatsapp, not one of them is using telegram.
User avatar
Juliio
Posts: 1
Joined: Mon Dec 27, 2021 8:59 am
Location: Helsinki
Contact:

Re: Zoneminder&Telegram (event instant messaging to your phone!)

Post by Juliio »

Ryan70 wrote: Sun Dec 05, 2021 9:24 am I have also switched to telegram but the problem is my friends and family use nulls clash, not one of them is using telegram.
Yeah...telegram has lots of functionalities than other social apps and it's interface is also a little complex than other apps. That's one of the reason many people don't it.
"I choose a lazy person to do a hard job. beacause he will find an easy way to do it" - Bill Gates
kirito
Posts: 2
Joined: Wed Jul 07, 2021 1:52 pm

Re: Zoneminder&Telegram (event instant messaging to your phone!)

Post by kirito »

Juliio wrote: Mon Dec 27, 2021 9:04 am gbwhatsappYeah...telegram has lots of functionalities than other social apps and it's interface is also a little complex than other apps. That's one of the reason many people don't it.
Agreed. :( That's why I don't use it. Only sometimes.
kimonlope
Posts: 3
Joined: Sat Jan 15, 2022 2:10 pm

Re: Zoneminder&Telegram (event instant messaging to your phone!)

Post by kimonlope »

Juliio wrote: Mon Dec 27, 2021 9:04 am
Ryan70 wrote: Sun Dec 05, 2021 9:24 am I have also switched to telegram but the problem is my friends and family use yowhatsapp, not one of them is using telegram.
Yeah...telegram has lots of functionalities than other social apps and it's interface is also a little complex than other apps. That's one of the reason many people don't it.
I also use telegram to connect with my friend and also to download latest movies. Also telegram interface I very userfriendly.
julia3570car
Posts: 1
Joined: Mon Feb 21, 2022 5:31 am

Re: Zoneminder&Telegram (event instant messaging to your phone!)

Post by julia3570car »

Yes, I used telegram to connect my family, when I am playing dream11 apk game. Thanks
ThomyaPatlacha20
Posts: 1
Joined: Fri Mar 25, 2022 10:07 am

Re: Zoneminder&Telegram (event instant messaging to your phone!)

Post by ThomyaPatlacha20 »

You gave us the best solution for this problem.. Now I can easily take over from telegram, there will be no difficulties. Keep giving such important information in the future. Thank you..
ananyaverma
Posts: 1
Joined: Wed Mar 30, 2022 10:06 am

Re: Zoneminder&Telegram (event instant messaging to your phone!)

Post by ananyaverma »

PacoLM wrote: Fri Feb 03, 2017 7:06 pm Hi,

I'm not activating anything from ZM, the Telegram daemon is running in the same computer where ZM is installed. The Telegram daemon is running a LUA script that is looking for some special words to be received, so if one on them is received, the command associated to that word is executed.
I will try to document everything during next week, if I find some free time!gb whatsapp download

Regards,
Pacogb whatsapp download
It is safe tough
Post Reply