CCTV Smart Hub – Wireless
This project is an integrated security and control system built on a Raspberry Pi. It combines a camera module, motion detection, LED control, and push notifications to create a smart CCTV solution. A live video stream is provided through a web interface, and notifications are sent to your iPhone using the Pushover API when snapshots are captured or LED settings are changed.
Overview
This project continuously captures video from a Raspberry Pi camera module in 1080p resolution and downscales the frames to 720p for a live MJPEG preview in the browser. Users can:
- Capture high‑resolution snapshots
- Control an RGB LED (auto‑mode or manual presets)
- Receive real‑time push notifications on their phone
- Monitor motion detection status
Features
- Continuous Video Capture at 1080p (streamed at 720p for performance)
- Snapshot Capture of full‑resolution images with one click
- Motion Detection using OpenCV to trigger LED and notifications
- LED Control
- Auto‑mode turns LED blue on motion
- Manual presets for common colors and LED Off
- Push Notifications via Pushover on key events
Hardware Requirements
- Raspberry Pi (any model with Camera Module port)
- Raspberry Pi Camera Module (IMX219 or similar)
- Common‑anode RGB LED with resistors
- Breadboard, jumper wires, and power supply
- Network connectivity for streaming and notifications
Software Requirements
- Raspberry Pi OS
- Python 3
- Flask
- picamera2
- OpenCV (
cv2) requests(for Pushover)gpiozero(for PWM LED)- Pushover account (user key & API token)
Setup Instructions
- Hardware Assembly
- Mount camera on CSI port.
- Wire LED to GPIO 17, 27, 22 with 220 Ω resistors.
- Install Dependencies
sudo apt update sudo apt install python3-pip pip3 install flask picamera2 opencv-python requests gpiozero - Configure Pushover
Sign up at Pushover, get your keys, then edit
application.pyto set them. - Run the App
python3 application.pyBrowse to
http://<raspberry-pi-ip>:5000.
Usage
- Live Stream: MJPEG preview (720p).
- Motion Status: “Motion Detected!” or “No Motion”.
- Capture Image: Save 1080p JPEG + push alert.
- LED Controls: Presets, “LED Off”, auto‑mode toggle.
Screenshots & Demos
Code Structure
application.py: Flask server, MJPEG stream, motion detection, LED PWM loops, Pushover integration.
index.html: Bootstrap-based UI (video panel, controls card).
Push Notification Integration
- Snapshot capture (timestamp, LED color, auto‑mode status)
- Manual LED color changes
- LED Off actions
Instant alerts keep you informed on your mobile device.
View Code
See the full source for both index.html and application.py on GitHub:
🔗 GitHub Repository