{"id":20487208,"url":"https://github.com/fdocr/pir_trigger","last_synced_at":"2026-04-17T03:32:56.822Z","repository":{"id":155012870,"uuid":"626532250","full_name":"fdocr/pir_trigger","owner":"fdocr","description":"Script that connects a PIR Sensor to a webhook","archived":false,"fork":false,"pushed_at":"2023-04-25T14:53:44.000Z","size":5,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-01-22T08:30:25.284Z","etag":null,"topics":["home-automation","python","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/fdocr.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}},"created_at":"2023-04-11T16:50:36.000Z","updated_at":"2024-01-10T16:10:26.000Z","dependencies_parsed_at":"2023-06-02T18:45:11.922Z","dependency_job_id":null,"html_url":"https://github.com/fdocr/pir_trigger","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/fdocr/pir_trigger","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fdocr%2Fpir_trigger","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fdocr%2Fpir_trigger/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fdocr%2Fpir_trigger/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fdocr%2Fpir_trigger/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fdocr","download_url":"https://codeload.github.com/fdocr/pir_trigger/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fdocr%2Fpir_trigger/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31913633,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-16T18:22:33.417Z","status":"online","status_checked_at":"2026-04-17T02:00:06.879Z","response_time":62,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["home-automation","python","raspberry-pi"],"created_at":"2024-11-15T16:40:28.491Z","updated_at":"2026-04-17T03:32:56.793Z","avatar_url":"https://github.com/fdocr.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# PIR Trigger\n\nScript that connects a PIR Sensor to a webhook.\n\n# Usage\n\nClone the repo in a folder, install dependencies and then run in background\n\n```bash\n# Install requirements\npip install -r requirements.txt\n\n# Run in background\n# TODO: Find/Document a better way to do this\nTRIGGER_URL=\"\u003cwebhook_url\u003e\" python main.py \u0026\n```\n\nOtherwise add `TRIGGER_URL = \"\u003cwebhook_url\u003e\"` to an `.env` file and the script will pick it up.\n\nThe script writes its own PID to `pid.txt` so it can be used. Examples:\n\n```bash\n# Follow output of background process\ntail -f /proc/$(cat pid.txt)/fd/1\n\n# Kill process\nkill -9 $(cat pid.txt)\n```\n\n# Sensor to board connections\n\n[Cable diagram here](https://projects-static.raspberrypi.org/projects/physical-computing/248971027a596f3437da45bafd2bd8a8cc35cb95/en/images/pir_wiring.png)\n\nThe script was inspired by [this Raspberry Pi Foundation article](https://projects.raspberrypi.org/en/projects/physical-computing/11) and uses their suggested example layout. The sensor needs 5v (Vcc) and Ground (Gnd), so PIN 2 and PIN 6 work well. Connect the sensor's output (Out) to PIN 7 (GPIO 4).","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffdocr%2Fpir_trigger","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffdocr%2Fpir_trigger","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffdocr%2Fpir_trigger/lists"}