0% found this document useful (0 votes)
44 views2 pages

How To Use Real-Time Gate Surveillance With Notification Alert Via Telegram

This document provides instructions for setting up real-time gate surveillance with notification alerts using a Raspberry Pi, USB camera, speaker, and Telegram. It involves 8 steps: creating a Telegram bot; editing a Python script with the bot token and user chat ID; installing necessary software on the Raspberry Pi; creating a photo folder; running the Python script; and using the bot commands "/snap" and "/alarm" to take photos and activate an alarm.

Uploaded by

KhaiTeo
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
44 views2 pages

How To Use Real-Time Gate Surveillance With Notification Alert Via Telegram

This document provides instructions for setting up real-time gate surveillance with notification alerts using a Raspberry Pi, USB camera, speaker, and Telegram. It involves 8 steps: creating a Telegram bot; editing a Python script with the bot token and user chat ID; installing necessary software on the Raspberry Pi; creating a photo folder; running the Python script; and using the bot commands "/snap" and "/alarm" to take photos and activate an alarm.

Uploaded by

KhaiTeo
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

How to use Real-Time Gate Surveillance with Notification Alert via Telegram.

*NOTE: If you want to use this directly, just skip to STEP 6.

Requirement:-

1. Make sure Raspberry Pi is connected to the Internet.


2. USB Camera must be connected to the Raspberry Pi.
3. Connect speaker to Raspberry Pi using 3.55mm Audio Jack.
4. Commands for Raspberry Pi:
a. sudo apt-get update
b. sudo apt-get install motion
c. sudo apt-get install python3-pip
d. sudo pip3 install telepot
e. sudo pip install teleport

STEP 1: Create bot in Telegram using BotFather and save the token given.

STEP 2: Edit Telegram_Motion.py, find “bot = telepot.Bot(‘***TOKEN HERE***’)” and


change “***TOKEN HERE***” to your bot’s token.

STEP 3: To get your Telegram’s chat_id, send message to the Bot in telegram first then open
terminal in Raspberry Pi and type “python” to use python shell and type in the following:

>>> import teleport

>>> bot = telepot.Bot('666944278:AAHS3BQSNmbF3CMvaECdyKAhP0R2xOOr_cw')

>>> from pprint import pprint

>>> response = bot.getUpdates()

>>> pprint(response)

With this, it will return info about your Telegram’s. Save the chat_id id.

STEP 4: Edit Telegram_Motion.py again and change the chat_id to your Telegram’s chat_id.

STEP 5: Create folder “foto” in Raspberry Pi’s desktop.

Notes: Make sure the Python script is place inside “/home/pi/Desktop/fyp” or otherwise, edit in
with your preferred path. Examine the script make sure all path is correct.
STEP 6: Run Telegram_Motion.py using Python shell.

STEP 7: Open telegram and search for @TripleA_Bot to use the bot. Or you can use your own
bot.

STEP 8: From the bot, reply “/snap” to snap photo and reply “/alarm” to turn on the alarm.

STEP 9: You’re done!

You might also like