{"id":27472919,"url":"https://github.com/aranbarri/motion-detector-mailsender","last_synced_at":"2026-04-26T20:31:21.024Z","repository":{"id":287774276,"uuid":"965733342","full_name":"aranbarri/motion-detector-mailsender","owner":"aranbarri","description":"This project uses a Raspberry Pi with a PiCamera2 module (IMX219, OV5647) to detect motion using OpenCV. When motion is detected, an image is saved and automatically sent to a configured email address. You can customize motion sensitivity and resolution easily using environment variables.","archived":false,"fork":false,"pushed_at":"2025-04-21T18:18:52.000Z","size":37,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-06-07T09:03:54.168Z","etag":null,"topics":["deep-neural-networks","email-sender","motion-detection","opencv-python","picamera2","raspberrypi"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/aranbarri.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-04-13T19:41:14.000Z","updated_at":"2025-04-24T09:00:29.000Z","dependencies_parsed_at":"2025-06-07T09:03:56.591Z","dependency_job_id":"edc7db5a-1dac-47ae-b1de-14ff37b8bfd7","html_url":"https://github.com/aranbarri/motion-detector-mailsender","commit_stats":null,"previous_names":["aranbarri/motion-detector-mailsender"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/aranbarri/motion-detector-mailsender","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aranbarri%2Fmotion-detector-mailsender","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aranbarri%2Fmotion-detector-mailsender/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aranbarri%2Fmotion-detector-mailsender/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aranbarri%2Fmotion-detector-mailsender/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/aranbarri","download_url":"https://codeload.github.com/aranbarri/motion-detector-mailsender/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aranbarri%2Fmotion-detector-mailsender/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32312176,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-26T19:15:34.056Z","status":"ssl_error","status_checked_at":"2026-04-26T19:15:15.467Z","response_time":129,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["deep-neural-networks","email-sender","motion-detection","opencv-python","picamera2","raspberrypi"],"created_at":"2025-04-16T03:02:02.433Z","updated_at":"2026-04-26T20:31:21.019Z","avatar_url":"https://github.com/aranbarri.png","language":"Python","funding_links":[],"categories":["100 + 𝗔𝗿𝘁𝗶𝗳𝗶𝗰𝗶𝗮𝗹 𝗜𝗻𝘁𝗲𝗹𝗹𝗶𝗴𝗲𝗻𝗰𝗲 𝗣𝗿𝗼𝗷𝗲𝗰𝘁 𝗟𝗶𝘀𝘁 𝘄𝗶𝘁𝗵 𝗰𝗼𝗱𝗲"],"sub_categories":[],"readme":"# 📸 Motion Detector and Email Sender with PiCamera2 and OpenCV\n\nThis project uses a Raspberry Pi with a PiCamera2 module (IMX219, OV5647) to detect motion using OpenCV. \n\nWhen motion is detected, an image is saved and automatically sent to a configured Gmail address. You can customize motion sensitivity and resolution easily using environment variables.\n\n##  Features\n- Motion detection via frame differencing\n- Photo capture on movement\n- Automatic email alerts with attached images\n- Live preview window using OpenCV\n- Dockerized for easy deployment\n- Configurable sensitivity via environment variable `DIFF_THRESHOLD`\n\n---\n\n##  Requirements\n- Raspberry Pi with PiCamera2 module - (IMX219, OV5647)\n- Raspberry Pi OS (Bullseye or newer)\n- Python 3.9+\n- Docker \u0026 Docker Compose\n\n---\n\n##  Setup\n\n### 1. Clone the repository\n```bash\ngit clone https://github.com/aranbarri/motion-detector-mailsender.git\ncd motion-detector-mailsender\n```\n\n### 2. Set your environment variables\n\nEdit the `docker-compose.yml`:\n\n```env\nSENDER_EMAIL=youremail@gmail.com\nRECIPIENT_EMAIL=destination@example.com\nEMAIL_PASSWORD=your_app_password\nDIFF_THRESHOLD=5000\nCAMERA_WIDTH = 2028\nCAMERA_HEIGHT = 1520\n```\n\u003e Use an app-specific password if you have 2FA enabled on Gmail.\n\n\n### 3. Build and run\n```bash\ndocker-compose up -d\n```\n\nThe motion detection script will start and display a live preview. Images with detected motion will be saved and emailed.\n\n---\n\n## 🗂 Project Structure\n\n```\nmotion-detector-mailsender/\n├── detektor/\n│   └── motion_detektor.py      # Main script\n├── Dockerfile                  # Container setup\n├── docker-compose.yml          # Service configuration\n├── requirements.txt            # Python dependencies\n```\n\n---\n\n## 🛠 Customize\n- Adjust motion sensitivity with the `DIFF_THRESHOLD` environment variable.\n- Change the capture resolution the same way.\n- Modify the email logic to send to multiple addresses or use other services (e.g. Telegram, Discord).\n\n---\n\n## 📜 License\nMIT License\n\n---\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faranbarri%2Fmotion-detector-mailsender","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Faranbarri%2Fmotion-detector-mailsender","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faranbarri%2Fmotion-detector-mailsender/lists"}