{"id":45128636,"url":"https://github.com/mrabine/pifan","last_synced_at":"2026-04-02T16:59:15.704Z","repository":{"id":194127078,"uuid":"342986648","full_name":"mrabine/pifan","owner":"mrabine","description":"Raspberry Pi fan controller daemon","archived":false,"fork":false,"pushed_at":"2026-03-28T18:31:08.000Z","size":29,"stargazers_count":4,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-03-28T18:31:39.428Z","etag":null,"topics":["cpu-temperature","fan","fan-controller","linux","raspberry-pi","raspberry-pi-4b","raspberry-pi-gpio","systemd","temperature-monitoring"],"latest_commit_sha":null,"homepage":"","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/mrabine.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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2021-02-28T00:17:34.000Z","updated_at":"2026-03-28T17:11:52.000Z","dependencies_parsed_at":"2023-09-12T01:00:06.017Z","dependency_job_id":null,"html_url":"https://github.com/mrabine/pifan","commit_stats":null,"previous_names":["mrabine/pifan"],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/mrabine/pifan","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mrabine%2Fpifan","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mrabine%2Fpifan/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mrabine%2Fpifan/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mrabine%2Fpifan/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mrabine","download_url":"https://codeload.github.com/mrabine/pifan/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mrabine%2Fpifan/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31310963,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-02T12:59:32.332Z","status":"ssl_error","status_checked_at":"2026-04-02T12:54:48.875Z","response_time":89,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["cpu-temperature","fan","fan-controller","linux","raspberry-pi","raspberry-pi-4b","raspberry-pi-gpio","systemd","temperature-monitoring"],"created_at":"2026-02-19T23:32:58.700Z","updated_at":"2026-04-02T16:59:15.699Z","avatar_url":"https://github.com/mrabine.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# pifan\n### Raspberry Pi fan controller daemon\n\n[![Test Status](https://github.com/mrabine/pifan/actions/workflows/cd.yml/badge.svg?branch=main)](https://github.com/mrabine/pifan/actions?query=workflow%3Acd+branch%3Amain)\n[![Security Status](https://github.com/mrabine/pifan/actions/workflows/audit.yml/badge.svg?branch=main)](https://github.com/mrabine/pifan/actions?query=workflow%3Aaudit+branch%3Amain)\n[![Codacy Badge](https://app.codacy.com/project/badge/Grade/aa8d30be1e104cdebdaf1861de8a8db1)](https://app.codacy.com/gh/mrabine/pifan/dashboard?utm_source=gh\u0026utm_medium=referral\u0026utm_content=\u0026utm_campaign=Badge_grade)\n[![GitHub Releases](https://img.shields.io/github/release/mrabine/pifan.svg)](https://github.com/mrabine/pifan/releases/latest)\n[![GitHub License](https://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/mrabine/pifan/blob/main/LICENSE)\n\nStart fan when CPU temperature is high and stop it when CPU temperature is low.\nSupports Raspberry Pi 4 and Raspberry Pi 5. The GPIO chip is auto-detected at startup and can be overridden with the `-g` option.\n\n\u003e **Note:** tested on Ubuntu 24.04.\n\n## Dependencies\n\nPifan requires `libgpiod`, to install it do this:\n```bash\nsudo apt install libgpiod-dev\n```\n\nThe `gpiod` package (CLI tools such as `gpiodetect`, `gpioinfo`) is optional but useful for troubleshooting:\n```bash\nsudo apt install gpiod\n```\n\n## Download\n\nTo download the latest source do this:\n```bash\ngit clone https://github.com/mrabine/pifan.git\n```\n\nMove to `pifan` directory:\n```bash\ncd pifan\n```\n\n## Configuration\n\nTo configure pifan do this:\n```bash\ncmake --preset gcc-release -DCMAKE_INSTALL_PREFIX=/usr\n```\n\n## Build\n\nTo build pifan do this:\n```bash\ncmake --build --preset gcc-release\n```\n\n## Installation\n\nTo install pifan do this:\n```bash\nsudo cmake --install build/gcc-release\n```\n\n## Enabling\n\nTo enable pifan do this:\n```bash\nsudo systemctl enable --now pifan\n```\n\n## Usage\n\n**pifan** [options]\n\n**-c**\\\n\u0026emsp;print the cpu temperature\\\n**-g chip**\\\n\u0026emsp;gpio chip device name (default: auto detection, `\"gpiochip0\"`, `\"gpiochip4\"`).\\\n**-h**\\\n\u0026emsp;show available options\\\n**-i interval**\\\n\u0026emsp;sleep interval in seconds (default: 2)\\\n**-l threshold**\\\n\u0026emsp;lower threshold in °C, fan stops below this value (default: 55)\\\n**-n**\\\n\u0026emsp;don't fork into background\\\n**-p pin**\\\n\u0026emsp;gpio pin number (default: 14)\\\n**-u threshold**\\\n\u0026emsp;upper threshold in °C, fan starts above this value (default: 65)\\\n**-v**\\\n\u0026emsp;print version\n\n## Recommended thresholds\n\nA 10°C hysteresis between lower and upper thresholds avoids rapid on/off cycling.\nThe Raspberry Pi 5 begins thermal throttling at 80°C, so the following values provide\na comfortable safety margin while keeping the fan off most of the time:\n\n```bash\npifan -l 55 -u 65\n```\n\nThese are also the default values.\n\n## License\n\n[MIT](https://choosealicense.com/licenses/mit/)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmrabine%2Fpifan","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmrabine%2Fpifan","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmrabine%2Fpifan/lists"}