Smart Video Doorbell
Project Overview
The Smart Video Doorbell transforms a standard Raspberry Pi Zero W and Pi Camera Module V2 into a fully functional smart doorbell. A PIR motion sensor triggers the camera to begin recording and simultaneously streams a live MJPEG feed accessible from any device on the local network. A physical doorbell button triggers an audio chime played through a connected speaker while sending a Telegram notification with a captured snapshot.
Key Features & Implementation
- Motion-Triggered Recording: A PIR sensor wakes the system from low-power idle mode. Python's picamera library begins capturing a 30-second H.264 video clip stored locally with a timestamped filename, building an automatic visitor log.
- MJPEG Live Stream: A lightweight Python Flask server serves a continuous MJPEG stream at 720p/15fps accessible via browser on any LAN device — no app installation required for viewing.
- Telegram Bot Alerts: On doorbell press, a Telegram bot sends an instant push notification with a high-resolution JPEG snapshot to the homeowner's phone within 2 seconds of the button press.
Challenges Solved
Pi Zero W's limited processing power caused frame drops during simultaneous recording and streaming. Implementing a separate thread for the MJPEG server and using hardware-accelerated H.264 encoding via the GPU pipeline resolved the bottleneck, maintaining smooth 15fps streams without dropped frames.