Telegram Bot for Receiving Videos & Camera Snapshots

Most surveillance systems alert you via email or SMS — or offer a dedicated mobile app — but everyone already uses messaging apps on their phones. Why not receive your security alerts where you already are? Banalytics goes beyond simple alarms by offering a Telegram bot that not only sends you alerts, but also delivers live videos, lets you access local storage remotely, monitors your camera and server status, and even restarts your server if needed.

Example

How to Set Up Your Telegram Bot Integration

Step 1: Set Up a Telegram Account

First things first, if you haven't already, download the Telegram app on your preferred device and create an account. Once you're logged in, you're ready to start building your bot.

Step 2: Create a Bot with BotFather

Telegram's BotFather is the official bot used to create and manage other bots on the platform. Start a conversation with BotFather by searching for it in Telegram. Once you've found BotFather, follow steps below.

Step 3: Complete Bot Setup

Type "/start" to initiate a conversation with BotFather.

Type "/newbot" to create a new bot.

BotFather will prompt you to choose a name for your bot. This name will be displayed in chats and contact lists, so choose wisely..

After selecting a name, BotFather will ask you to choose a username for your bot. This username must be unique and end in "bot" (e.g., BanalyticsHomeBot).

Once you've chosen a username, BotFather will provide you with an API token. This token is essential for interacting with your bot programmatically, so be sure to keep it safe and secure.

Example
Example

Now, your bot is ready to integrate into your Banalytics server. Click the button next to the Telegram bot integration. Name your integration (note that this is not the bot name but the identifier of your integration with a particular bot. You can have several integrations with different bots). Insert the token you obtained at the last step of bot creation. Specify the access code. This is an additional security measure on Banalytics' side, while the Telegram bot has its own privacy settings.

Now, your Telegram bot is ready to receive notifications from your camera.

After configuring the Telegram bot, go to messenger and choose to start it. The bot will ask for the authorization code you specified in Banalytics. After getting the necessary information, you can log out of the bot to prevent unauthorized access to your cameras through it.

Example

Configuration Parameters

Value Required (Yes/No) Description Default
uuid Yes A unique, automatically generated identifier for this component instance. This value is not editable.
Restart on failure Yes Restart mode upon catching an error:
  • Stop on failure - not restarted until triggered manually.
  • Immediately - tries to restart automatically immediately after catching an error.
  • 10 sec - tries to restart automatically with a 10-seconds delay after catching an error.
  • 30 sec - tries to restart automatically with a 30-seconds delay after catching an error.
  • 1 min - tries to restart automatically with a 1-minute delay after catching an error.
Default to 10 sec
Title Yes Integration name. This is not the bot name but the identifier of your integration with a particular bot. You can have several integrations with different bots.
Bot token Yes The token you obtained at the last step of bot creation.
Authorization code Yes Set up password to access Banalytics assets from the Telegram app.
Was this page helpful ? Yes No