- Sep 4, 2017
- 194
- 325
This little tool sends your Blue Iris Alert images and mp4 videos to your Telegram chat.
Backstory: Since I developed AI Tools a few years ago, Blue Iris nicely integrated AI analysis. The only (big) thing missing for me was the possibility to send Alert images to my Telegram account. So I made "Telegram Upload Tool" (TUT):
How it works
1. TUT scans a specified input folder for new alert images and videos that Blue Iris put there (.jpg and .mp4 files)
2. TUT connects to a Telegram Bot you created and with whom you have a private chat
3. TUT sends the images and videos to your Telegram chat with the Bot
Setup
1. Unzip TelegramUploadTool.zip wherever you like
(2. Add TelegramUploadTool.exe to your Autostart or schedule a Task to automatically start TUT)
3. In Blue Iris, choose a folder and configure BI to save alert snapshots and/or videos there. For example like that:
Videos: Blue Iris -> Camera Settings -> Trigger -> Add to alerts list: Export to MP4 files
Images: Blue Iris -> Camera Settings -> Record -> JPEGs: When alerted & Folder: your Input path from above
4. In Telegram, create a bot and get the Bot Token:
4.1 Contact BotFather on Telegram.
4.2 Use the /newbot command to create a new bot. The BotFather will ask you for a name and username to generate the Bot Token along the lines of 110201543:AAHdqTcvCH1vGWJxfSeofSAs0K5PALDsaw for your bot. Copy the Bot Token.
4.3 Contact the bot you created with the telegram account you want to receive the notifications on and send the bot a message.
5. Open TelegramUploadTool.exe, go to Settings
- Input Path: select the folder from step 3
- Telegram Bot Token: from step 4.2
- after inserting the Bot token: Click on "Get ChatID", your browser will open and will show you some values, among them is the "chat" and "id" value (something like 35057230). Copy it and insert it in the Telegram Chat ID field.
- Hit Save.
Multiple recipients:
If you want to send alert images to multiple Telegram accounts (yours, your wifes, etc), you need to repeat step 4.3 for every account, copy the chat-ids of all chats and enter the chat ids interposed by a comma ("12345678, 87654321"). Or alternatively, you can simply add the bot to a group (p.e. your familys Telegram group) which should receive the alert images.
Tips
- the maximum upload size for Telegram Bots is 50MB, so make sure your videos are smaller, otherwise the upload will fail
Changelog
1.1 Several Bug fixes
Setup alternative within Blue Iris using curl (thanks to @hopalong)
directly send images to Telegram from Blue Iris without the need for Telegram Upload Tool.
Replace the XXXXXX:YYYYYYYY and ZZZZZZZ with the appropriate info.
PS: Have fun, enjoy some fresh air after installing this and best wishes to you all from GentlePumpkin!
Backstory: Since I developed AI Tools a few years ago, Blue Iris nicely integrated AI analysis. The only (big) thing missing for me was the possibility to send Alert images to my Telegram account. So I made "Telegram Upload Tool" (TUT):
How it works
1. TUT scans a specified input folder for new alert images and videos that Blue Iris put there (.jpg and .mp4 files)
2. TUT connects to a Telegram Bot you created and with whom you have a private chat
3. TUT sends the images and videos to your Telegram chat with the Bot
Setup
1. Unzip TelegramUploadTool.zip wherever you like
(2. Add TelegramUploadTool.exe to your Autostart or schedule a Task to automatically start TUT)
3. In Blue Iris, choose a folder and configure BI to save alert snapshots and/or videos there. For example like that:
Videos: Blue Iris -> Camera Settings -> Trigger -> Add to alerts list: Export to MP4 files
Images: Blue Iris -> Camera Settings -> Record -> JPEGs: When alerted & Folder: your Input path from above
4. In Telegram, create a bot and get the Bot Token:
4.1 Contact BotFather on Telegram.
4.2 Use the /newbot command to create a new bot. The BotFather will ask you for a name and username to generate the Bot Token along the lines of 110201543:AAHdqTcvCH1vGWJxfSeofSAs0K5PALDsaw for your bot. Copy the Bot Token.
4.3 Contact the bot you created with the telegram account you want to receive the notifications on and send the bot a message.
5. Open TelegramUploadTool.exe, go to Settings
- Input Path: select the folder from step 3
- Telegram Bot Token: from step 4.2
- after inserting the Bot token: Click on "Get ChatID", your browser will open and will show you some values, among them is the "chat" and "id" value (something like 35057230). Copy it and insert it in the Telegram Chat ID field.
- Hit Save.
Multiple recipients:
If you want to send alert images to multiple Telegram accounts (yours, your wifes, etc), you need to repeat step 4.3 for every account, copy the chat-ids of all chats and enter the chat ids interposed by a comma ("12345678, 87654321"). Or alternatively, you can simply add the bot to a group (p.e. your familys Telegram group) which should receive the alert images.
Tips
- the maximum upload size for Telegram Bots is 50MB, so make sure your videos are smaller, otherwise the upload will fail
Changelog
1.1 Several Bug fixes
Setup alternative within Blue Iris using curl (thanks to @hopalong)
directly send images to Telegram from Blue Iris without the need for Telegram Upload Tool.
https://api.telegram.org/botXXXXXXXX:YYYYYYYYYYY/sendphoto -F chat_id=ZZZZZZZZZZZZZ -F photo=@C:\BlueIris\Alerts\&ALERT_PATH -F caption="[URL='http://10.10.30.10:81/ui3.htm?t=live&cam=&CAM'][I]&NAME[/I][/URL] \- &MEMO" -F parse_mode=MarkdownV2
Replace the XXXXXX:YYYYYYYY and ZZZZZZZ with the appropriate info.
PS: Have fun, enjoy some fresh air after installing this and best wishes to you all from GentlePumpkin!
Attachments
Last edited: