Skip to content

Monitor your home with a Raspberry PI and and a PI camera

License

Notifications You must be signed in to change notification settings

catalinc/homewatch

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

homewatch

Monitor your home with a Raspberry Pi and a web camera.

Based on Home surveillance and motion detection with the Raspberry Pi, Python, OpenCV, and Dropbox.

Prerequisites

  • Raspberry Pi 4 Model B
  • Python 3.7+
  • OpenCV 4.0+

Installation

  1. Follow Install OpenCV 4 on Raspberry Pi 4 and Raspbian Buster to install OpenCV. I recommend to go with option B - compiling OpenCV from source.
  2. Clone the repository: git clone https://github.com/catalinc/homewatch

Quickstart

Edit config.json to adjust the configuration. Run the script with python surveillance.py -c config.json.

Configuration:

{
    // Video capture device id. No need to change if you connected only one webcam to RPi. 
	"video_device": 0, 
    // Show live camera feed. Set to false when running in headless mode.
	"show_video": true,
    // Threshold to compute the absolute difference between current frame and average frame.
	"delta_thresh": 5,
    // FPS
	"framerate": 30,
    // Minimum countour area for detecting motion.
	"min_area": 5000,
    // Minimum interval between two detections (in seconds).
	"min_interval": 5,
    // Where to save the frames containing motion.
	"base_path": "./data",
    // Image type
	"image_ext": "png",
    // Send emails with frames containing motion.
	"email": {
        // Send emails?
		"enabled": false,
        // Email from
		"from": "",
        // Email to
		"to": "",
        // SMTP password in plain text. Consider yourself warned :). 
		"password": "",
        // SMTP host
		"host": "",
        // SMTP port
        "port": 587,
        // Minimum interval between emails (in seconds)
		"interval": 30
	}
}

About

Monitor your home with a Raspberry PI and and a PI camera

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages