{"id":19608924,"url":"https://github.com/fire1ce/raspberry-pi-pir-motion-display-control","last_synced_at":"2025-08-07T09:09:45.515Z","repository":{"id":46591591,"uuid":"412791405","full_name":"fire1ce/raspberry-pi-pir-motion-display-control","owner":"fire1ce","description":"Raspberry Pi display control based on motion (PIR) sensor using GPIO ","archived":false,"fork":false,"pushed_at":"2022-09-11T23:22:00.000Z","size":430,"stargazers_count":11,"open_issues_count":0,"forks_count":5,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-05T03:22:31.134Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://3os.org","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/fire1ce.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null},"funding":{"github":"fire1ce","patreon":"fire1ce","custom":["https://www.paypal.com/donate/?hosted_button_id=Y5NSXQQ6VPSK6\u0026Z3JncnB0","https://www.buymeacoffee.com/fire1ce"]}},"created_at":"2021-10-02T12:34:55.000Z","updated_at":"2025-03-21T03:10:05.000Z","dependencies_parsed_at":"2023-01-18T04:15:20.864Z","dependency_job_id":null,"html_url":"https://github.com/fire1ce/raspberry-pi-pir-motion-display-control","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fire1ce%2Fraspberry-pi-pir-motion-display-control","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fire1ce%2Fraspberry-pi-pir-motion-display-control/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fire1ce%2Fraspberry-pi-pir-motion-display-control/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fire1ce%2Fraspberry-pi-pir-motion-display-control/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fire1ce","download_url":"https://codeload.github.com/fire1ce/raspberry-pi-pir-motion-display-control/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251204771,"owners_count":21552286,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":[],"created_at":"2024-11-11T10:18:34.459Z","updated_at":"2025-04-27T20:33:09.306Z","avatar_url":"https://github.com/fire1ce.png","language":"Python","funding_links":["https://github.com/sponsors/fire1ce","https://patreon.com/fire1ce","https://www.paypal.com/donate/?hosted_button_id=Y5NSXQQ6VPSK6\u0026Z3JncnB0","https://www.buymeacoffee.com/fire1ce"],"categories":[],"sub_categories":[],"readme":"# Raspberry Pi Display Control Based on Motion (PIR) Sensor\n\n## Information\n\nThis script uses pin GPIO4(7) to read data from Motion (PIR) Sensor, Any 5v and ground for PIR Sensor\n\n![gpio layout](https://github.com/fire1ce/raspberry-pi-pir-motion-display-control/raw/main/gpio_layout.jpg)\n\n![raspberrypi-with-PIR-sensor](https://github.com/fire1ce/raspberry-pi-pir-motion-display-control/raw/main/raspberrypi-with-PIR-sensor.jpg)\n\n## Requirements\n\n- python3-gpiozero\n\nCan be install via apt\n\n```bash\nsudo apt install python3-gpiozero\n```\n\n## Install\n\nThis will install the script as `service` and it will run at boot\n\n```bash\ncurl https://raw.githubusercontent.com/fire1ce/raspberry-pi-pir-motion-display-control/main/install.sh | bash\n```\n\n## Uninstall\n\n```bash\ncurl https://raw.githubusercontent.com/fire1ce/raspberry-pi-pir-motion-display-control/main/uninstall.sh | bash\n```\n\n## Default Behavior\n\n| **Condition**               | **Behavior**                        |\n| --------------------------- | ----------------------------------- |\n| Motion while display is off | Turns on display for 60 sec         |\n| Motion while display is on  | Resets the timer for another 60 sec |\n| No motion \u003e 60 sec          | Turns off the display               |\n\n## Config\n\nFile\n\n```bash\n/usr/local/bin/motion-display-control.py\n```\n\nYou can change Data Pin of the PIR Sensor at **gpio_pin** value\nYou can change Delay at **display_delay** value\n\nLine\n\n```python\nmotion = Motion(gpio_pin=4, display_delay=60, verbose=False)\n```\n\nRestart the service to apply changes\n\n```bash\nsudo systemctl restart power_button.service\n```\n\n## Debug\n\nIn order to allow verbose debug change the following\n\nFile\n\n```bash\n/usr/local/bin/motion-display-control.py\n```\n\nLine\n\nSet **verbose** value to **True**\n\n```python\nmotion = Motion(gpio_pin=4, display_delay=60, verbose=True)\n```\n\nRestart the service to apply changes\n\n```bash\nsudo systemctl restart motion-display-control.service\n```\n\n## Check if service is running\n\n```bash\nsudo systemctl status motion-display-control.service\n\n```\n\n## Contributors\n\nThanks to [Boris Berman\n](https://github.com/bermanboris/raspberry-pi-pir-motion-display-control) for the script rewrite from function to classes\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffire1ce%2Fraspberry-pi-pir-motion-display-control","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffire1ce%2Fraspberry-pi-pir-motion-display-control","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffire1ce%2Fraspberry-pi-pir-motion-display-control/lists"}