Skip to main content

Control the Raspberry Pi 5's fan curve

Project description

Pi5 Fan Control

The Pi5 Fan Control library wraps functions to read and control the fan curve of a Raspberry Pi 5 from a Python script. The main method of doing this is through editing the firmware config.txt.

Prerequisites

You will need a fan, like the official case fan or the Active Cooler fan, plugged into the fan port on your Pi 5. In addition, you will need some form of sudo access on your Pi, as the library requires it in order to access the configuration files.

Installation

This library is available in PyPi. Simply install the library:

pip install pi5_fan_control

Getting Started

Example code files can be found under src/pi5_fancontrol/examples in the repository. In addition, unit tests for every function of the library can be found in the tests folder; read through these to get a comprehensive understanding of what the library can do. Features include:

  • Updating the fan curve (requires a reboot to take effect)
  • Reading the current fan curve config, if it exists
  • Getting the live fan speed and CPU temperature
  • Safety checks for bad configs, bad values

Getting Help

If you need any help with this library, or if you've found an issue, please feel free to open up a new issue in this repository or email me at shashankprasanna1@gmail.com.

If you're feeling up to the task, you can also update the code yourself and submit a pull request.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pi5_fan_control-1.0.0.tar.gz (4.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pi5_fan_control-1.0.0-py3-none-any.whl (6.8 kB view details)

Uploaded Python 3

File details

Details for the file pi5_fan_control-1.0.0.tar.gz.

File metadata

  • Download URL: pi5_fan_control-1.0.0.tar.gz
  • Upload date:
  • Size: 4.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.2 {"installer":{"name":"uv","version":"0.11.2","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Debian GNU/Linux","version":"13","id":"trixie","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for pi5_fan_control-1.0.0.tar.gz
Algorithm Hash digest
SHA256 572e594eaa6d491f1ef4a3df41715c1f16bbf429bd8a8313f196861ad1f0f2d4
MD5 4f05c14180235d56566683cf18ec1342
BLAKE2b-256 03bbe3938012e7b9cfb776cd9185d6197b52646c74c396c9d5d9e5fa948b0928

See more details on using hashes here.

File details

Details for the file pi5_fan_control-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: pi5_fan_control-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 6.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.2 {"installer":{"name":"uv","version":"0.11.2","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Debian GNU/Linux","version":"13","id":"trixie","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for pi5_fan_control-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 92bcd5efcbc21c3cd63533e35faab84cfed3b3dc1888df9cf06f6a62d23aec15
MD5 bd404444f051046bcf5c8f0e372b48a0
BLAKE2b-256 b7de58e2f2a440cc8abdb314a85f29a9f67f6247bb1d4c8864453e58a4bf04da

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page