Raspberry Pi DIY Remote Intruder Detector System With Telegram

Introduction: Raspberry Pi DIY Remote Intruder Detector System With Telegram

About: DIY Projects, maker world, opensource and assorted amazing stuff :)

In this project you will create an intruder detection device that will check if somebody is inside your house / room when you are out using a PIR sensor, if the PIR sensor detects somebody it will take a (set of) picture(s) of the intruder. The pictures will be sent to your telegram bot channel wherever you are. You can also add some “scare away” tactics, like trigger an alarm sound or a pre-recorded voice message.

Supplies

Raspberry Pi

SD Card

Raspberry Pi power supply

PIR sensor

Pi Camera

Speaker (optional)

Generic mobile camera lens (optional)

Step 1: Configure Your Raspberry Pi

You will need to setup your Raspberry Pi device with the lastest Rasberry Pi OS version with standard packages. Be sure to get the Python3 Telepot and PiCamera modules using pip3 or apt.

$ sudo apt-get update

$ sudo apt-get install python3-picamera

$ sudo pip3 install telepot

Step 2: Install PiCam

Connect your picam to your Rasbperry Pi using the CSI connector.

You also need to check if you have the picamera enabled on the Raspberry Pi configuration application.

Step 3: Install PIR Sensor (Passive InfraRed Presence Sensor)

Connect the PIR sensor to your Raspberry Pi

Step 4: Setup You Telegram Bot

Get the telegram key and chat id from telegram BotFather bot:

https://core.telegram.org/bots

Step 5: Install and Setup the Speaker (optional)

Install a regular speaker to your Raspberry Pi using the audio jack. Remember to setup the audio through 3.5mm headphone jack and not HDMI output.

Install the espeak software to synthesize the audio from text

$ sudo apt-get install espeak

Step 6: Set the Python Script and Basic Usage

Download the script through the git repo and set up:

-Telegram key and chat id from BotFather

- PIR pin used on your wiring setup

Basic usage instructions to run the intruder detection system:

-Edit the script with your specific data

-Start the script

-Open the telegram bot that you created before and control the script using the built-in commands

Commands:

enable pir: if PIR sensor is enabled, when PIR is triggered, the script will take a picture and send it to your bot channel

disable pir: if PIR sensor is disabled, never takes a picture automatically (when you are at home, PIR sensor must be disabled to avoid a picture flood)

show: take a real-time picture and send it to the telegram bot channel

say TEXT: read the TEXT string through the speaker

Step 7: Congrats! You Got It!

Now you have your own intruder detection device!!

Be the First to Share

    Recommendations

    • Back to School: Student Design Challenge

      Back to School: Student Design Challenge
    • 3D Printed Student Design Challenge

      3D Printed Student Design Challenge
    • Micro:bit Contest

      Micro:bit Contest

    Comments