This project turns any CCTV camera into an AI-powered security system that detects people at night and responds automatically. When an intruder is detected, it sends a push notification to your phone and plays a police siren through a connected speaker to deter the intruder — all configured with visual blocks, no code required.
Key Features:
- AI person detection running on-device (70% confidence threshold)
- Nighttime-only alerting with configurable time range
- Instant push notifications to your smartphone
- Police siren deterrent through connected speaker
- 3-second continuous detection filter to prevent false alerts
- Live camera monitoring dashboard
Many people have old CCTV cameras that only record passively — you have to manually review footage after something happens. Adding AI person detection and instant alerts transforms a passive camera into an active security system. This project shows how to do it without replacing your existing camera or writing any code.
What You'll Build- A security system that detects people through your camera using AI object detection
- A time-based filter so alerts only trigger during nighttime hours
- A push notification system that alerts your phone instantly
- An audible siren that plays through a speaker to deter intruders
- A dashboard with a live camera feed you can monitor from your phone
- Connect a camera and speaker to your device
- If using an ONVIF or RTSP camera, go to Settings → Camera and edit the camera address and credentials
- Install the Grablo software from grablo.co/download
- Copy this project from the Grablo Gallery
- Connect to your device and hit RUN
- Install the Grablo mobile app and log in to receive push notifications
Want to test it first? Just install Grablo IoT Core on a laptop — the built-in webcam and speaker are all you need.
Build ProcessDashboard
The dashboard has a single Camera widget showing the live video feed with the AI detection overlay. You can monitor it from any browser or the Grablo mobile app. When a person is detected, you'll see the bounding box appear on the camera feed in real time.
This project uses 2 logics. The first logic, "Person Detection, " runs once at startup. It starts the camera and adds an AI Object Detection analyzer configured to detect people with a 70% confidence threshold. The detection result is stored in a "Person Detected" variable that the second logic monitors.
The second logic, "Night Intruder Alert, " is where the security response happens. It has two conditions that must both be true: a time range condition that checks if it's currently nighttime (midnight to 7 AM by default), and a compare condition that checks if the "Person Detected" variable is true. The compare condition has a 3-second minimum pending time, meaning a person must be continuously detected for at least 3 seconds before triggering — this filters out brief misdetections and people just passing by. When both conditions are met, it sends a push notification with the title "Intruder Alert" and plays a police siren sound file through the speaker.
Two logics, one camera, and your old CCTV is now an AI security system.
Expected Results- The camera feed shows real-time video with AI detection overlay
- During nighttime hours, when a person is continuously detected for 3+ seconds, an alert triggers
- Your phone receives a push notification — tap it to view the live camera stream
- A police siren plays through the connected speaker
- During daytime, the camera still runs but no alerts are triggered
Camera Options
- USB Camera — Plug and play, works out of the box
- USB Video Capture Adapter — Connect an older analog CCTV that doesn't have network support
- ONVIF / RTSP Network Camera — Connect over your local network. Edit the camera settings in Settings → Camera with your camera's address and credentials
- Raspberry Pi Camera Module (CSI) — Direct connection to Raspberry Pi
Speaker Options
- 3.5mm Audio Jack — Direct connection to Raspberry Pi
- USB Audio Adapter — For devices without 3.5mm jack
- Bluetooth Speaker — Wireless option
Tip: The project comes pre-configured for USB camera index 0. If you have multiple cameras or are using a network camera, update the camera settings before running.
What's Next?
- Add a Telegram bot action to send a snapshot photo when an intruder is detected
- Add RGB LED or relay to flash emergency lights alongside the siren
- Add multiple cameras and apply AI analysis to each one for full coverage
- Adjust detection zones to focus on specific areas like doorways or windows
- Add a voice warning using text-to-speech before playing the siren
Person not being detected:Ensure adequate lighting — AI detection accuracy drops in very dark conditions. Consider adding an IR illuminator for nighttime use. Check that the confidence threshold (70%) isn't too high for your camera quality.
Too many false alerts:Increase the 3-second pending time filter to a longer duration. You can also set a specific detection zone in the AI analysis settings to focus only on entry points rather than the full camera view.
No push notification received:Make sure the Grablo mobile app is installed and you're logged in with the same account. Check that notifications are enabled for the app in your phone's settings.
No siren sound playing:Check that your speaker is connected and the audio output is configured correctly. On Raspberry Pi, verify the audio output setting (3.5mm vs HDMI) in system configuration.
ONVIF/RTSP camera not connecting:Verify the camera's IP address and port. Ensure the camera and your Grablo device are on the same network. Double-check the username and password in Settings → Camera.









Comments