Pi Security Camera
Project Overview
The Pi Security Camera system is a DIY home surveillance setup built on a Raspberry Pi 4 running MotionEyeOS. It manages two camera feeds simultaneously — a Pi Camera Module V2 and a USB webcam — displaying both on a unified web dashboard accessible from any device on the network. Motion events trigger clip recording to a 64GB MicroSD card and send snapshot notifications via Telegram. The entire system consumes under 8W of power, making it suitable for 24/7 operation.
Key Features & Implementation
- Dual-Camera Dashboard: MotionEyeOS manages both cameras simultaneously within a single browser-accessible dashboard. Each feed runs at 1080p/10fps, and the dashboard supports live pan/tilt control for the USB webcam mounted on a two-axis servo gimbal.
- Smart Motion Zones: Custom motion detection masks define active monitoring regions within each frame — ignoring trees blowing in the background while sensitively detecting movement in doorway zones — dramatically reducing false alert frequency.
- Remote Access via Tailscale: The Raspberry Pi is enrolled in a Tailscale VPN mesh, enabling secure remote access to the camera dashboard from anywhere in the world over an encrypted peer-to-peer tunnel — without requiring port forwarding or a static IP.
Challenges Solved
Running two simultaneous 1080p streams saturated the Raspberry Pi 4's CPU at 95% under MotionEye's default settings. Enabling the GPU hardware encoder (h264_omx) for the Pi Camera feed and switching the USB webcam to MJPEG format dropped CPU usage to a stable 40%, allowing smooth dual-stream operation with headroom for motion processing.