{"id":26950666,"url":"https://github.com/zkhan93/rpi_power_button","last_synced_at":"2026-05-20T07:39:43.617Z","repository":{"id":81623017,"uuid":"216861339","full_name":"zkhan93/rpi_power_button","owner":"zkhan93","description":"Power button for RaspberryPi","archived":false,"fork":false,"pushed_at":"2021-03-29T08:05:19.000Z","size":15,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-02T23:34:06.990Z","etag":null,"topics":["iot","raspberry-pi"],"latest_commit_sha":null,"homepage":null,"language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/zkhan93.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2019-10-22T16:36:27.000Z","updated_at":"2021-03-29T08:05:22.000Z","dependencies_parsed_at":null,"dependency_job_id":"aa64de7a-0754-4d19-98fc-46063d8e32e3","html_url":"https://github.com/zkhan93/rpi_power_button","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/zkhan93/rpi_power_button","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zkhan93%2Frpi_power_button","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zkhan93%2Frpi_power_button/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zkhan93%2Frpi_power_button/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zkhan93%2Frpi_power_button/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zkhan93","download_url":"https://codeload.github.com/zkhan93/rpi_power_button/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zkhan93%2Frpi_power_button/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":264538584,"owners_count":23624436,"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":["iot","raspberry-pi"],"created_at":"2025-04-02T23:31:18.653Z","updated_at":"2026-05-20T07:39:38.520Z","avatar_url":"https://github.com/zkhan93.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# POWER BUTTON for Raspberry Pi\n\n## Hardware Setup\n\nConnect a simple push button with two ends, one with GPIO5 PIN and the other with GPIO6 pin.\nOn button press, it should essentially touch these two pins together and then disconnect them.\n\n\n## Software Setup\n\npre-requisites\nmake sure you have `python3-dev` and `virtualenv` installed\n```bash\nsudo apt-get install python3-dev gcc python3-setuptools\npython3 -m pip install virtualenv\n```\n\nclone the repository to `/home/pi/repos/rpi_power_button` (feel free to choose a different path) lets call this `REPO_DIR`,\nreplace `REPO_DIR` with this path for all the following commands.\n\nThere are 2 ways\n\n### Manual way\n\ncreate python vurtualenv and install dependencies\n```bash\ncd REPO_DIR\nvirtualenv -P python3 vevn\npip install -r requirements.txt\n```\n\ncreate a symlink of this power_button service which start the python script to listen to the GPIO 5 BOARD pin\n```bash\nsudo ln -s REPO_DIR/power_button.service /etc/systemd/system/power_button.service\n```\n\nmodify `power_button.service` to replace REPO_DIR with the actual repo path.\n```bash\n# leave the first `REPO_DIR` as is.\nsed -i \"s+REPO_DIR+REPO_DIR+g\" power_button.service\n```\n\nEnable the new service using systemd\n```bash\nsudo systemctl enable power_button.service\nsudo systemctl daemon-reload\n```\n\n### The Shell Way\n\nrun the setup script to do it.\n```bash\n./setup.sh\n```\n\n\n## for Power LED using UART PIN\nhttps://howchoo.com/g/ytzjyzy4m2e/build-a-simple-raspberry-pi-led-power-status-indicator\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzkhan93%2Frpi_power_button","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzkhan93%2Frpi_power_button","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzkhan93%2Frpi_power_button/lists"}