{"id":20498120,"url":"https://github.com/nbsp1221/pi-home-security-system","last_synced_at":"2026-04-14T23:33:42.597Z","repository":{"id":242422169,"uuid":"808762471","full_name":"nbsp1221/pi-home-security-system","owner":"nbsp1221","description":"🏠 Home security system using Raspberry Pi with IoT sensors and web interface","archived":false,"fork":false,"pushed_at":"2025-04-10T14:07:49.000Z","size":810,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-10-24T00:32:33.334Z","etag":null,"topics":["mqtt","raspberry-pi"],"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/nbsp1221.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,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2024-05-31T19:02:55.000Z","updated_at":"2025-04-10T14:07:53.000Z","dependencies_parsed_at":"2024-06-02T23:01:59.262Z","dependency_job_id":"a9260d40-2b51-4560-9246-edfcf49c2f22","html_url":"https://github.com/nbsp1221/pi-home-security-system","commit_stats":null,"previous_names":["nbsp1221/pi-home-security-system"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/nbsp1221/pi-home-security-system","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nbsp1221%2Fpi-home-security-system","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nbsp1221%2Fpi-home-security-system/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nbsp1221%2Fpi-home-security-system/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nbsp1221%2Fpi-home-security-system/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nbsp1221","download_url":"https://codeload.github.com/nbsp1221/pi-home-security-system/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nbsp1221%2Fpi-home-security-system/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31819837,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-14T18:05:02.291Z","status":"ssl_error","status_checked_at":"2026-04-14T18:05:01.765Z","response_time":153,"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":["mqtt","raspberry-pi"],"created_at":"2024-11-15T18:13:06.672Z","updated_at":"2026-04-14T23:33:42.573Z","avatar_url":"https://github.com/nbsp1221.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 🏠 Raspberry Pi Home Security System\n\n![Demo image](demo.png)\n\nA comprehensive home security system utilizing Raspberry Pi, equipped with temperature, humidity, flame, gas, and motion sensors, along with a live camera stream.\nThe system is built to store detection records in a MySQL database and can send alerts via MQTT.\n\n\u003e This project was developed as a school course project.\n\n## Features\n\n- **Temperature and Humidity Monitoring**: Logs data at regular intervals.\n- **Flame Detection**: Detects and logs fire incidents.\n- **Gas Detection**: Detects and logs gas leaks.\n- **Motion Detection**: Logs motion events and captures video recordings.\n- **Relay Control**: Allows remote control of a connected relay.\n- **Live Camera Streaming**: Provides a real-time video feed.\n- **MQTT Alerts**: Sends alerts for flame, gas, and motion detections.\n- **Web Interface**: Displays sensor data and video streams.\n\n## Hardware Requirements\n\n- Raspberry Pi (any model with GPIO support)\n- DHT11 Temperature and Humidity Sensor\n- Flame Sensor\n- Gas Sensor\n- Ultrasonic Distance Sensor\n- Relay Module\n- Camera Module (compatible with Raspberry Pi)\n- Breadboard and Jumper Wires\n\n## Software Requirements\n\n- Raspberry Pi OS\n- Python 3\n- Mosquitto MQTT Broker\n\n## Installation\n\n### Step 1: Install packages\n\n```bash\nsudo apt update\nsudo apt install ffmpeg mosquitto mosquitto-clients\n```\n\n### Step 2: Configure Mosquitto\n\nModify the Mosquitto configuration file to allow connections from any IP address and enable anonymous access.\n\n```bash\nsudo nano /etc/mosquitto/mosquitto.conf\n```\n\nAdd the following lines to the configuration file:\n\n```conf\nbind_address 0.0.0.0\nallow_anonymous true\n```\n\nSave the file and restart the Mosquitto service:\n\n```bash\nsudo systemctl restart mosquitto\n```\n\n### Step 3: Set Up Virtual Environment and Install Python Packages\n\nRun the provided `setup.sh` script to create a virtual environment and install the required Python packages.\n\n```bash\nchmod +x setup.sh\nsource setup.sh\n```\n\n## Configuration\n\nCreate a `.env` file in the project directory and configure the following environment variables.\nYou can use the provided `.env.example` as a template:\n\n```bash\nMQTT_HOST=localhost\nMQTT_PORT=1883\n\nMYSQL_DATABASE=pi\nMYSQL_USER=root\nMYSQL_PASSWORD=raspberry\nMYSQL_HOST=localhost\nMYSQL_PORT=3306\n\nWEB_SERVER_USER=pi\nWEB_SERVER_PASSWORD=raspberry\nWEB_SERVER_PORT=8000\n```\n\n## Usage\n\nRun the application by executing:\n\n```bash\npython3 app.py\n```\n\nAccess the web interface by navigating to `http://\u003cyour_raspberry_pi_ip\u003e:8000` in your browser.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnbsp1221%2Fpi-home-security-system","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnbsp1221%2Fpi-home-security-system","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnbsp1221%2Fpi-home-security-system/lists"}