{"id":17957936,"url":"https://github.com/petrockblog/powerblock","last_synced_at":"2025-08-03T10:05:52.880Z","repository":{"id":34455614,"uuid":"38391192","full_name":"petrockblog/PowerBlock","owner":"petrockblog","description":"Driver for petrockblock.com PowerBlock","archived":false,"fork":false,"pushed_at":"2024-11-11T22:01:20.000Z","size":2582,"stargazers_count":45,"open_issues_count":2,"forks_count":10,"subscribers_count":8,"default_branch":"master","last_synced_at":"2025-05-16T17:42:17.127Z","etag":null,"topics":["petrockblock","power-switch","raspberry-pi","raspberry-pi-3","raspberry-pi-4","raspberry-pi-5","raspberrypi","shutdown","shutdown-manager","soft-shutdown"],"latest_commit_sha":null,"homepage":"https://www.petrockblock.com/powerblock-raspberry-pi-power-button/","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":"trangbtm31/verhicle-api","license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/petrockblog.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":"2015-07-01T19:40:57.000Z","updated_at":"2024-12-22T15:50:14.000Z","dependencies_parsed_at":"2024-01-18T04:09:11.559Z","dependency_job_id":"ec10c0e8-41e3-4bef-8dc4-7db55d209a40","html_url":"https://github.com/petrockblog/PowerBlock","commit_stats":null,"previous_names":[],"tags_count":9,"template":false,"template_full_name":null,"purl":"pkg:github/petrockblog/PowerBlock","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/petrockblog%2FPowerBlock","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/petrockblog%2FPowerBlock/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/petrockblog%2FPowerBlock/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/petrockblog%2FPowerBlock/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/petrockblog","download_url":"https://codeload.github.com/petrockblog/PowerBlock/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/petrockblog%2FPowerBlock/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":268525073,"owners_count":24264095,"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","status":"online","status_checked_at":"2025-08-03T02:00:12.545Z","response_time":2577,"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":["petrockblock","power-switch","raspberry-pi","raspberry-pi-3","raspberry-pi-4","raspberry-pi-5","raspberrypi","shutdown","shutdown-manager","soft-shutdown"],"created_at":"2024-10-29T10:58:13.330Z","updated_at":"2025-08-03T10:05:52.818Z","avatar_url":"https://github.com/petrockblog.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"PowerBlock Driver\n=================\n\nThis is the driver for the petrockblock.com [PowerBlock](https://blog.petrockblock.com/powerblock-raspberry-pi-power-switch/), \nwhich is an extension board for the Raspberry Pi (TM). The driver itself is denoted as _powerblock_ in the following. The \ndriver provides a service for interacting with the power button signal as well as driving the optionally attached LED.\n\n:exclamation: The following description is intended to be used in combination with a Raspberry Pi and a \n**Linux-based operating system** running on the Raspberry Pi. There is a **driver for Windows 10 IoT Core** that can be \nfound at https://github.com/petrockblog/PowerBlockWinIoT/releases :exclamation:\n\n\n## Installation\n\nThere comes an installation script with this reposity that does all the steps described below: `install.sh` This script \ncompiles the driver, installs the binary and configuration files, and installs the PowerBlock service. \n\nTo run the quick installation, you just need to call this one line from the Raspbian console\n\n```bash\nwget -O - https://raw.githubusercontent.com/petrockblog/PowerBlock/master/install.sh | sudo bash\n```\n\nTo uninstall the service you can simply call `sudo ./uninstall.sh` from within the `PowerBlock` directory.\n\n\n## Configuration\n\nThe configuration file of _powerblock_ is located at ```/etc/powerblockconfig.cfg```. It uses simple .ini file syntax \u003ckey\u003e=\u003cvalue\u003e for setting the the values of its configuration parameters.\n\nThe parameters are explained in detail in the following:\n\n - ```activated```: Can be set to\n     + ```1```: Activates the handling of the power switch signals of the PowerBlock.\n     + ```0```: Deactivates the handling of the power switch signals of the PowerBlock.\n - ```statuspin```: Raspberry BCM pin used for status signaling (default: 17) connects to S2 on PowerBlock\n - ```shutdownpin```: Raspberry BCM pin used for shutdown signaling (default: 18) connects to S1 on Powerblock\n - ```logging```: Enables or disables logging via syslog to /var/log/syslog. The logging is enabled if set to 1.\n\n## Logging\n\nThe PowerBlock driver logs certain events in the file `/var/log/syslog`.\n\n## Shutdown Script\n\nWhen the driver observes a shutdown signal from the PowerBlock, a shutdown Bash script is called. You can find and edit \nit at `/etc/powerblockswitchoff.sh`.\n\n\n## LibreELEC Installation\n\nThis section is about installing the PowerBlock service on LibreELEC. In the following, it is assumed that we install the driver on a fresh, unmodified LibreELEC installation.\n\nFirst, use SSH to log into the running LibreELEC instance. This can be done, e.g., with the command `ssh root@IP_OF_LIBREELEC`. The default password is `libreelec`. \n\nBeing logged in, the actual driver installation is done with this command: \n\n```bash\nwget -O - https://raw.githubusercontent.com/petrockblog/PowerBlock/master/install_libreelec.sh | bash\n```\n\nAnd that's it!\n\n\n\u003cbr\u003e\u003cbr\u003e\n__Have fun!__\n\n-Florian [petrockblock.com](http://blog.petrockblock.com)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpetrockblog%2Fpowerblock","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpetrockblog%2Fpowerblock","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpetrockblog%2Fpowerblock/lists"}