AI Security System With Telegram Alert in 10 Minutes (No Coding Required)

by KimY21 in Circuits > Raspberry Pi

50 Views, 1 Favorites, 0 Comments

AI Security System With Telegram Alert in 10 Minutes (No Coding Required)

AI Home Security System - Demo

Build an AI-powered home security system that detects human intruders, captures photo evidence, sends instant Telegram alerts, and scares off burglars with police sirens, voice warnings, and flashing emergency lights.

Traditional security systems require complex programming across computer vision, messaging APIs, audio control, and hardware coordination. With Grablo, you simply drag and drop visual blocks.


What You'll Build

A complete AI-powered home security system featuring:

  1. AI person detection that ignores animals and objects
  2. Nighttime-only surveillance with time-based triggers (10 PM - 6 AM)
  3. Instant Telegram alerts with captured photo evidence
  4. Multi-layered deterrent: police siren + voice warnings + flashing RGB LEDs
  5. Live dashboard monitoring with camera feed and detection status
  6. Zero lines of code required!


Supplies

결선도.png

Hardware:

  1. Raspberry Pi 4 Model B
  2. Camera (Raspberry Pi Camera or USB webcam)
  3. RGB LED Module
  4. Speaker (3.5mm, USB, or Bluetooth)
  5. Jumper wires


Software:

  1. Grablo IoT Platform (free)
  2. Telegram app


Wiring:

  1. RGB LED (Common Anode):
  2. Red → GPIO 23
  3. Green → GPIO 24
  4. Blue → GPIO 25
  5. Common → 3.3V
  6. Camera: Connect to CSI port (Pi Camera) or USB port,
  7. Speaker: 3.5mm audio jack, USB or pair Bluetooth speaker

⚠️ Note: This tutorial uses common anode RGB LED. If using common cathode, wiring differs.

Quick Start

  1. Download and install Grablo software on your Raspberry Pi
  2. Set up hardware: Wire camera, RGB LED, and speaker according to wiring diagram
  3. Get this project: Project Link
  4. Connect controller: In your project, go to "Connect Controller" and enter IP address
  5. Configure Telegram: Enter Telegram bot token in Project Settings and Chat ID in "Send Telegram Message" action bock.
  6. Upload siren: Add your police siren audio file (or download from tutorial)
  7. Hit RUN: Your security system is now protecting your home!


💡 Want to build it yourself? Continue to Step 2

Set Up Telegram Bot

  1. Open Telegram → Search @BotFather
  2. Send /newbot and follow prompts
  3. Copy your bot token
  4. Search @userinfobot → Get your Chat ID
  5. In Grablo: Project Settings → Paste bot token

Create Project

  1. Go to https://app.grablo.co
  2. Click "Create Project"
  3. Give your project a name

Logic - Smart Security Camera

2025-10-31_12-50-20 (1).png
2025-10-31_12-52-01.png

Control 1: Start Camera with AI Person Detection

Create a logic and add a control that starts camera and continuously monitors for people

  1. Condition (Once): Runs only once when project starts
  2. Action (AI Camera): Start camera with AI person detection- AI Analysis 1 (Object Detection): Detect if person exists


Control 2: Capture and Alert When Person Detected at Night

Create a control that captures evidence and sends alerts when an intruder is detected

  1. Condition 1 (Time Range): Only active during nighttime hours (e.g., 10 PM - 6 AM)
  2. Condition 2 (Compare): Check if person is detected with 5-second hold time to filter false alarms
  3. Action 1 (AI Camera): Capture current frame and save to file
  4. Action 2 (Telegram Message): Send captured photo to your phone with alert message
  5. Action 3 (Play Media): Play police siren sound


Logic - Voice Alert

2025-10-31_12-53-21.png

Control 1: Voice Announcement While Siren Plays

Create a logic that announces warnings while siren is active

  1. Condition (Watch Action): Trigger while siren playback is running
  2. Action (Text To Speech): Play threatening voice message to scare intruder


Logic - Emergency Light Effect

2025-10-31_12-54-21.png

Control 1: Flash RGB LED While Siren Plays

Create a logic that flashes emergency lights while siren is active

  1. Condition (Watch Action): Trigger while siren playback is running
  2. Action 1 (I/O Device Control): Set LED to red (R=255)
  3. Action 2 (Delay): Wait 500ms
  4. Action 3 (I/O Device Control): Turn off LED (R=0)
  5. Action 4 (I/O Device Control): Set LED to blue (B=255)
  6. Action 5 (Delay): Wait 500ms
  7. Action 6 (I/O Device Control): Turn off LED (B=0)


Create Dashboard

2025-10-31_13-57-36.png

Add widgets:

  1. Camera Widget: Live feed with AI detection overlay
  2. LED Widget: Person_Detected status

Launch Your Project

That's It - You're Done!

Congratulations! You've built a complete AI security system using only 3 logics and zero lines of code. This is the power of visual programming with Grablo.


Run Your Project

  1. Download and install Grablo software on your Raspberry Pi
  2. Set up hardware: Wire camera, RGB LED, and speaker according to wiring diagram
  3. Connect controller: In your project, go to "Connect Controller" and enter IP address
  4. Configure Telegram: Enter Telegram bot token in Project Settings and Chat ID in "Send Telegram Message" action bock.
  5. Upload siren: Add your police siren audio file (or download from tutorial)
  6. Hit RUN: Your security system is now protecting your home!


Expected Results

When you run your project:

  1. Daytime (6 AM - 10 PM): Monitors, no action
  2. Animal or object detected: No action (AI recognizes only humans)
  3. Night + Person < 5 sec: No action (false alarm filter)
  4. Night + Person ≥ 5 sec:
  5. Captures photo evidence
  6. Sends Telegram alert with photo
  7. Plays police siren
  8. Announces voice warning
  9. Flashes red/blue emergency lights
  10. Dashboard shows detection status


Troubleshooting

  1. No Telegram alerts:
  2. Check bot token and Chat ID in settings
  3. Verify Raspberry Pi has internet connection
  4. Test bot manually with /start command
  5. Person not detected:
  6. Improve lighting (optimal range: 2-10 meters)
  7. Adjust camera angle to cover entry points
  8. Clean camera lens
  9. No siren sound:
  10. Check speaker volume and connections
  11. Verify audio file uploaded correctly
  12. Test with speaker-test -t wav -c 2
  13. LED not flashing:
  14. Confirm GPIO pins match wiring (R=23, G=24, B=25)
  15. Check LED type (common anode vs cathode)
  16. Verify 3.3V power connection
  17. Camera not detected:
  18. Pi Camera: Enable with sudo raspi-config → Interface → Camera
  19. USB Camera: Check with ls /dev/video*
  20. Reboot after enabling

Video Tutorial

AI Security System with Telegram Alert

Watch the complete build process in action! This video demonstrates every step from hardware setup to AI camera configuration and launching your security system.

Expand Your Project


Expand Your Project

  1. Multiple zones: Monitor doors, windows separately with AI zone detection
  2. Email reports: Send daily summary with captured photos
  3. Motion spotlight: Add bright LED that turns on when person detected
  4. Smart scheduling: Different modes for weekdays/weekends


Resources

  1. Website: https://grablo.co
  2. Web App: https://app.grablo.co
  3. Documentation: https://doc.grablo.co
  4. Support: support@grablo.co