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-0.1.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-0.1.0-py3-none-any.whl (6.8 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: pi5_fan_control-0.1.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-0.1.0.tar.gz
Algorithm Hash digest
SHA256 723216a34e6bdb9d2fee17453de2a49cece4de99b6aa9d1bc317041e386f8ee7
MD5 160f71f76cab2aa759c91836557a00b7
BLAKE2b-256 393a485768f8c964fa596ea2cdddd82cb610da4ed28d9446a89269b753af1fe2

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pi5_fan_control-0.1.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-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 c82cd9fc1277a48752b1b94d9381b4389d584afccc15629c0b43cc90c8055e6c
MD5 50faa52ed75737666f857ffa7f12ebc9
BLAKE2b-256 9f19e1dcda50279e8d4b539328baaf5921b94b14cd53bbab9f8448a6246e3973

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