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)
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:
- AI person detection that ignores animals and objects
- Nighttime-only surveillance with time-based triggers (10 PM - 6 AM)
- Instant Telegram alerts with captured photo evidence
- Multi-layered deterrent: police siren + voice warnings + flashing RGB LEDs
- Live dashboard monitoring with camera feed and detection status
- Zero lines of code required!
Supplies
Hardware:
- Raspberry Pi 4 Model B
- Camera (Raspberry Pi Camera or USB webcam)
- RGB LED Module
- Speaker (3.5mm, USB, or Bluetooth)
- Jumper wires
Software:
- Grablo IoT Platform (free)
- Telegram app
Wiring:
- RGB LED (Common Anode):
- Red → GPIO 23
- Green → GPIO 24
- Blue → GPIO 25
- Common → 3.3V
- Camera: Connect to CSI port (Pi Camera) or USB port,
- 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
- Download and install Grablo software on your Raspberry Pi
- Set up hardware: Wire camera, RGB LED, and speaker according to wiring diagram
- Get this project: Project Link
- Connect controller: In your project, go to "Connect Controller" and enter IP address
- Configure Telegram: Enter Telegram bot token in Project Settings and Chat ID in "Send Telegram Message" action bock.
- Upload siren: Add your police siren audio file (or download from tutorial)
- Hit RUN: Your security system is now protecting your home!
💡 Want to build it yourself? Continue to Step 2
Set Up Telegram Bot
- Open Telegram → Search @BotFather
- Send /newbot and follow prompts
- Copy your bot token
- Search @userinfobot → Get your Chat ID
- In Grablo: Project Settings → Paste bot token
Create Project
- Go to https://app.grablo.co
- Click "Create Project"
- Give your project a name
Logic - Smart Security Camera
Control 1: Start Camera with AI Person Detection
Create a logic and add a control that starts camera and continuously monitors for people
- Condition (Once): Runs only once when project starts
- 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
- Condition 1 (Time Range): Only active during nighttime hours (e.g., 10 PM - 6 AM)
- Condition 2 (Compare): Check if person is detected with 5-second hold time to filter false alarms
- Action 1 (AI Camera): Capture current frame and save to file
- Action 2 (Telegram Message): Send captured photo to your phone with alert message
- Action 3 (Play Media): Play police siren sound
Logic - Voice Alert
Control 1: Voice Announcement While Siren Plays
Create a logic that announces warnings while siren is active
- Condition (Watch Action): Trigger while siren playback is running
- Action (Text To Speech): Play threatening voice message to scare intruder
Logic - Emergency Light Effect
Control 1: Flash RGB LED While Siren Plays
Create a logic that flashes emergency lights while siren is active
- Condition (Watch Action): Trigger while siren playback is running
- Action 1 (I/O Device Control): Set LED to red (R=255)
- Action 2 (Delay): Wait 500ms
- Action 3 (I/O Device Control): Turn off LED (R=0)
- Action 4 (I/O Device Control): Set LED to blue (B=255)
- Action 5 (Delay): Wait 500ms
- Action 6 (I/O Device Control): Turn off LED (B=0)
Create Dashboard
Add widgets:
- Camera Widget: Live feed with AI detection overlay
- 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
- Download and install Grablo software on your Raspberry Pi
- Set up hardware: Wire camera, RGB LED, and speaker according to wiring diagram
- Connect controller: In your project, go to "Connect Controller" and enter IP address
- Configure Telegram: Enter Telegram bot token in Project Settings and Chat ID in "Send Telegram Message" action bock.
- Upload siren: Add your police siren audio file (or download from tutorial)
- Hit RUN: Your security system is now protecting your home!
Expected Results
When you run your project:
- Daytime (6 AM - 10 PM): Monitors, no action
- Animal or object detected: No action (AI recognizes only humans)
- Night + Person < 5 sec: No action (false alarm filter)
- Night + Person ≥ 5 sec:
- Captures photo evidence
- Sends Telegram alert with photo
- Plays police siren
- Announces voice warning
- Flashes red/blue emergency lights
- Dashboard shows detection status
Troubleshooting
- No Telegram alerts:
- Check bot token and Chat ID in settings
- Verify Raspberry Pi has internet connection
- Test bot manually with /start command
- Person not detected:
- Improve lighting (optimal range: 2-10 meters)
- Adjust camera angle to cover entry points
- Clean camera lens
- No siren sound:
- Check speaker volume and connections
- Verify audio file uploaded correctly
- Test with speaker-test -t wav -c 2
- LED not flashing:
- Confirm GPIO pins match wiring (R=23, G=24, B=25)
- Check LED type (common anode vs cathode)
- Verify 3.3V power connection
- Camera not detected:
- Pi Camera: Enable with sudo raspi-config → Interface → Camera
- USB Camera: Check with ls /dev/video*
- Reboot after enabling
Video Tutorial
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
- Multiple zones: Monitor doors, windows separately with AI zone detection
- Email reports: Send daily summary with captured photos
- Motion spotlight: Add bright LED that turns on when person detected
- Smart scheduling: Different modes for weekdays/weekends
Resources
- Website: https://grablo.co
- Web App: https://app.grablo.co
- Documentation: https://doc.grablo.co
- Support: support@grablo.co