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.

← Back to Projects

CCTV Smart Hub cover

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:

Features

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
LED and camera wiring on breadboard
LED and camera wiring on the breadboard.

Software Requirements

  • Raspberry Pi OS
  • Python 3
  • Flask
  • picamera2
  • OpenCV (cv2)
  • requests (for Pushover)
  • gpiozero (for PWM LED)
  • Pushover account (user key & API token)
Software setup
Software dependencies and versions.

Setup Instructions

  1. Hardware Assembly
    • Mount camera on CSI port.
    • Wire LED to GPIO 17, 27, 22 with 220 Ω resistors.
  2. Install Dependencies
    sudo apt update
    sudo apt install python3-pip
    pip3 install flask picamera2 opencv-python requests gpiozero
  3. Configure Pushover

    Sign up at Pushover, get your keys, then edit application.py to set them.

  4. Run the App
    python3 application.py

    Browse to http://<raspberry-pi-ip>:5000.

Usage

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

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

×