send Telegram notifications with pictures

tms5d

n3wb
Joined
Mar 23, 2015
Messages
4
Reaction score
1

bp2008

Staff member
Joined
Mar 10, 2014
Messages
9,187
Reaction score
6,418
Location
USA
I glanced at their API documentation but it doesn't seem like they support sending images. Even if they did it is unlikely that Blue Iris would support sending images to them anyway.
 

tms5d

n3wb
Joined
Mar 23, 2015
Messages
4
Reaction score
1
So, this is how far I got until now:

- I wrote this BASh-script (lines after # not active yet) called achterom.sh (achterom = backyard in Dutch ;-)



- which I put in a .bat-file called achterom.bat like this:


Have a look at How to Create and Run Bash Shell Scripts on Windows 10 for more information on how to run bash-scripts on a Windows platform.


- the achterom.bat-file is then executed from 'Alerts'--> 'Run a program or execute a script' like this:




When I push "Test", it works like a charm, I get a Telegram-notification plus image which I pull directly from one of my Hikvision camera's (the 'wget -O $SnapFile1 ....'-line from the bash-script ).

This is what I see in Telegram after pushing the 'configure run alert' -'TEST'-button in Blue Iris (expected behaviour):



After pushing the 'configure run alert' --> 'OK' button however, I do NOT get a Telegram-notification at all when motion is detected, (which is unexpected because it works when I pushed the TEST button).

Blue Iris service is running as Admin by the way (because of Cam trigger sends text message, but does not run a script)




Until, now, I have not been able to figure out why everything does work as expected (telegram notification plus image) when hitting the TEST button, but not when motion is detected (no telegram notification at all). Any help would be really appreciated!!
 
Last edited:

bp2008

Staff member
Joined
Mar 10, 2014
Messages
9,187
Reaction score
6,418
Location
USA
I don't see a reason why the behavior would be any different. Can you inspect the network traffic with a program like Fiddler? That might indicate where the problem is.
 

GentlePumpkin

IPCT Contributor
Joined
Sep 4, 2017
Messages
69
Reaction score
100
Another option is to use the etlgr.com @etlgr_bot bot for telegram. You assign an email address, send the picture or video to it via BI email notification and etlgr forwards this email to telegram. You then might want to configure that you only see the attached image and not the subject, sender etc, buts thats easily done by changing the message format to "%{}" (without the " of course :)).

Works very well im my opinion, but one should keep in mind that etlgr could access the images.
 

Sascha S

n3wb
Joined
Sep 25, 2019
Messages
1
Reaction score
0
Location
Ger
You got it working ?? I got...

your script has to start with cd ~


Greets Sascha

So, this is how far I got until now:

- I wrote this BASh-script (lines after # not active yet) called achterom.sh (achterom = backyard in Dutch ;-)



- which I put in a .bat-file called achterom.bat like this:


Have a look at How to Create and Run Bash Shell Scripts on Windows 10 for more information on how to run bash-scripts on a Windows platform.


- the achterom.bat-file is then executed from 'Alerts'--> 'Run a program or execute a script' like this:




When I push "Test", it works like a charm, I get a Telegram-notification plus image which I pull directly from one of my Hikvision camera's (the 'wget -O $SnapFile1 ....'-line from the bash-script ).

This is what I see in Telegram after pushing the 'configure run alert' -'TEST'-button in Blue Iris (expected behaviour):



After pushing the 'configure run alert' --> 'OK' button however, I do NOT get a Telegram-notification at all when motion is detected, (which is unexpected because it works when I pushed the TEST button).

Blue Iris service is running as Admin by the way (because of Cam trigger sends text message, but does not run a script)




Until, now, I have not been able to figure out why everything does work as expected (telegram notification plus image) when hitting the TEST button, but not when motion is detected (no telegram notification at all). Any help would be really appreciated!!
 

tlow

n3wb
Joined
Nov 22, 2019
Messages
3
Reaction score
1
Location
Germany
Hey,

I created a telegram-bot in Nodejs that can send you a snapshot or a gif on alerts.

I currently just run the nodejs script on the same machine that runs blue iris.


If you have questions just ask me here, or create an issue on github so that others can benefit from it.
 

Mr White

n3wb
Joined
Mar 7, 2017
Messages
10
Reaction score
3
Hey,

I created a telegram-bot in Nodejs that can send you a snapshot or a gif on alerts.

I currently just run the nodejs script on the same machine that runs blue iris.


If you have questions just ask me here, or create an issue on github so that others can benefit from it.
Does the telegram alert come through just as quickly as the native motion alert?
 

tlow

n3wb
Joined
Nov 22, 2019
Messages
3
Reaction score
1
Location
Germany
Does the telegram alert come through just as quickly as the native motion alert?
Yes, there is no noticeable delay. I have not measured it but I would estimate it's at most 1 or 2 seconds. The objects triggering the alert are always fully visible in the gif, if that's what you are concerned about.
 

Mr White

n3wb
Joined
Mar 7, 2017
Messages
10
Reaction score
3
Than
Yes, there is no noticeable delay. I have not measured it but I would estimate it's at most 1 or 2 seconds. The objects triggering the alert are always fully visible in the gif, if that's what you are concerned about.
Thank you. I was just curious about speed of it. Well done on getting this working! Hopefully I can setup a group chat and have this working for my family who arnt technically minded.
 

tlow

n3wb
Joined
Nov 22, 2019
Messages
3
Reaction score
1
Location
Germany
Than


Thank you. I was just curious about speed of it. Well done on getting this working! Hopefully I can setup a group chat and have this working for my family who arnt technically minded.
I haven't used the bot in groups yet, it is used by 3 different telegram users independently. For security reasons you have to allow users to receive messages from the bot, but it's really easy to set up. Just send the bot the /start command and the userid is shown on the pc that runs the bot. Just add the id to the list of the allowed users and thats it.
 
Top