alexbn71 / AgentDVR-Telegram

A PHP script to send alerts to your Telegram bot with the free version of AgentDVR
9 stars 0 forks source link

AgentDVR - Telegram notifications with Image

This simple but effective script sends the image generated by AgentDVR on alerts to your Telegram bot. It works with the free version of AgentDVR.

CONFIGURATION

  1. Copy telegram_sendphoto.sh into AgentDVR Commands folder.
  2. Create "grabs" folder inside Commands folder
  3. Set variable values in the script:
CHATID=your telegram id
TOKEN=your bot token

4. Go in camera Action and set these values

Actions -> Action Configuration -> If = Manual Alert (just for testing purposes)
Actions -> Action Configuration -> Then = Execute Command
Actions -> Action Configuration -> File = telegram_sendphoto
Actions -> Action Configuration -> Parameters = {ID} '{MSG}' {BASE64IMAGE}

You are ready to go! Fire "Manual Alert" and see what happen on Telegram.

Telegram BOT configuration (on the web there are dozens of guides better than this):

  1. Click “Start” to activate BotFather bot. In response, you receive a list of commands to manage bots.
  2. Choose or type the /newbot command and send it.
  3. Choose a name for your bot — your subscribers will see it in the conversation. And choose a username for your bot — the bot can be found by its username in searches. The username must be unique and end with the word “bot.”
  4. After you choose a suitable name for your bot — the bot is created. You will receive a message with a link to your bot t.me/, recommendations to set up a profile picture, description, a list of commands to manage your new bot and the TOKEN.

Share any improvements to the script with me so that everyone can benefit!

That's all! Enjoy.