{"id":21056603,"url":"https://github.com/waveshareteam/power-management-hat-b","last_synced_at":"2025-09-02T20:50:21.969Z","repository":{"id":95583795,"uuid":"579884248","full_name":"waveshareteam/Power-Management-HAT-B","owner":"waveshareteam","description":"Power Management HAT (B) Example","archived":false,"fork":false,"pushed_at":"2022-12-20T07:29:29.000Z","size":776,"stargazers_count":5,"open_issues_count":1,"forks_count":2,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-03T17:11:17.263Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"C","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/waveshareteam.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":"2022-12-19T07:15:11.000Z","updated_at":"2024-10-10T16:28:26.000Z","dependencies_parsed_at":"2023-03-18T16:02:59.683Z","dependency_job_id":null,"html_url":"https://github.com/waveshareteam/Power-Management-HAT-B","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/waveshareteam%2FPower-Management-HAT-B","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/waveshareteam%2FPower-Management-HAT-B/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/waveshareteam%2FPower-Management-HAT-B/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/waveshareteam%2FPower-Management-HAT-B/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/waveshareteam","download_url":"https://codeload.github.com/waveshareteam/Power-Management-HAT-B/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254442429,"owners_count":22071864,"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-19T16:52:13.724Z","updated_at":"2025-05-15T23:33:14.540Z","avatar_url":"https://github.com/waveshareteam.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Power-Management-HAT-B\n[Power Management HAT (B)](https://www.waveshare.com/power-management-hat-b.htm) Example code\n## Example\n### 1. Button_Ctr\n* Power on or off by the PWR button\n1. If Raspberry Pi is off\n    * Press PWR button to start Raspberry Pi\n2. If Raspberry Pi is on\n    * Long-press PWR button for 2s~8s, Raspberry Pi will be first software shutdown and then cut off power\n    * Long-press PWR button for more than 8s to directly cut off power of Raspberry Pi.\n### 2. Period_Time\n* Power on or off by Period_Time\n1. Power on when Power_On_Time（default 9：00:30）\n2. Power off when Power_Off_Time （default 10：00:00）\n### 3. Cycle\n* Power on or off by Cycle\n1. Power_On_Keep_Time（default 1800S）\n2. Power_Off_Keep_Time（default 3600S）\n## Version Description\n### V1.0\n* First release\n### V1.1\n* Add cycle function, default：turning on 1800S  and turning off 3600s\n* Fix the issue where STA did not wait when the timing switch was started for the first time\n* Add Readme Description\n\n\n# Power-Management-HAT-B\n[Power Management HAT (B)](https://www.waveshare.net/shop/Power-Management-HAT-B.htm) Example code\n## Example\n### 1. Button_Ctr\n* 使用PWR按键开关机\n1. 当树莓派关机\n    * 按下PWR按键则开机\n2. 当树莓派开机\n    * 长按PWR按键超过2S但不到8S，尝试将树莓派软关机\n    * 长按PWR按键超过8S则尝试直接掐断电源\n### 2. Period_Time\n* 定时开关机\n1. 当时间到达指定时间Power_On_Time（默认为 9：00:30）时开机\n2. 当时间到达指定时间Power_Off_Time （默认为 10：00:00）时关机\n### 3. Cycle\n* 循环开关机\n1. 保持开机时间Power_On_Keep_Time（默认为1800S）\n2. 保持关机机时间Power_Off_Keep_Time（默认为3600S）\n## 版本描述\n### V1.0\n* 初次提交\n### V1.1\n* 增加 循环开关机功能，默认开机1800S，关机3600S\n* 修复定时开关机 初次开机STA没有等待的问题\n* 增加readme描述","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwaveshareteam%2Fpower-management-hat-b","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwaveshareteam%2Fpower-management-hat-b","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwaveshareteam%2Fpower-management-hat-b/lists"}