r/pythoncoding • u/aivo83 • Jan 24 '25
Open-source DIY Home Security System
Hello r/PythonCoding,
I have recently finished building a DIY home security system that supports multiple devices. It works well on old laptops and can use a RaspberryPi Zero W for on-demand pictures and videos (I have found the Zero W too weak for full motion detection with OpenCV).
You can get the source code here: MingSec
Here is some more information about the project:
Features:
Motion Detection: Utilizes OpenCV to detect motion and trigger responses.
Image Capture: Captures and uploads an image every ten minutes to Dropbox.
Alarm Response: Captures an image and records a video if the alarm is triggered. Both are uploaded to Dropbox.
Offline Operation: Logs all videos and images when the internet connection is down, and uploads them once the connection is restored.
REST API: Provides endpoints for users to check the status of each camera and request images or videos.
Kotlin Notification App: A companion mobile app developed in Kotlin that receives notifications each time an alarm is triggered.
Project Structure:
docs/ - Contains a Single Page Application (SPA) for the project demo.
core/ - Includes the REST API and user interface for remote control and system management.
local/ - Contains the MingSec application, including configuration files and local scripts.
app/ - Contains the Kotlin notification app that receives alerts for triggered alarms.