Skip to main content

Auto Temp GPIOd Control

Automatic temperature-based GPIO control for any device with libgpiod 2.x support.

Features

  • Monitors all available temperature sensors using psutil
  • Controls a GPIO pin based on user-defined temperature thresholds
  • Displays a live, aligned temperature table in the terminal
  • Optional test mode to simulate CPU load for thermal testing
  • Clean startup/shutdown: always resets GPIO to OFF on exit

Requirements

Installation

Install via pip (recommended):

pip install auto-temp-gpiod-ctrl

Or from source:

git clone https://github.com/Anthony-s-Personal-Projects/orange-pi-zero-auto-temp-ctrl.git
cd orange-pi-zero-auto-temp-ctrl
pip install .

Usage

Run the controller with your desired parameters:

python -m auto_temp_gpiod_ctrl --on-temp 50 --off-temp 45 --soc-pin PH2

Or, if installed as a script:

auto-temp-gpiod-ctrl --on-temp 50 --off-temp 45 --soc-pin PH2

Parameters

  • -i, --interval : Seconds between temperature checks and table refresh (default: 5.0)
  • --soc-pin : SoC pin spec to control (e.g. H2, PH2)
  • -c, --chip : GPIO chip device (e.g. gpiochip0 or /dev/gpiochip1, default: gpiochip0)
  • --on-temp : Threshold to turn ON GPIO (≥ this temperature, required)
  • --off-temp : Threshold to turn OFF GPIO (≤ this temperature, required)
  • --test-mode : Enable heavy calculation simulation (for testing only)

Example

python -m auto_temp_gpiod_ctrl --on-temp 60 --off-temp 50 --soc-pin PH2 --test-mode

How it works

  • Reads all temperature sensors and displays a live table
  • Monitors the maximum temperature
  • Sends GPIO output HIGH when max_temp ≥ on_temp, LOW when max_temp ≤ off_temp
  • Optionally simulates CPU load if --test-mode is enabled
  • Always resets GPIO to OFF on exit

License

MIT


Author: Anthony (anthonyma24.development@gmail.com)

Metadata

Release files for auto-temp-gpiod-ctrl 0.1.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for auto-temp-gpiod-ctrl 0.1.2
File Size Uploaded Provenance
auto_temp_gpiod_ctrl-0.1.2.tar.gz 9.0 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for auto-temp-gpiod-ctrl 0.1.2
File Interpreter ABI Platform
auto_temp_gpiod_ctrl-0.1.2-py3-none-any.whl Python 3 none any Details

Total release size: 19.0 kB

Release files / auto_temp_gpiod_ctrl-0.1.2.tar.gz

Download URL auto_temp_gpiod_ctrl-0.1.2.tar.gz
Size 9.0 kB
Tags Source
SHA-256 checksum
How to use checksums
32128c729a095f7abbe3de3188cd47de34d3bf890f776010a263b58a00bd2727
BLAKE2b-256 checksum
How to use checksums
042309e25f9db13758a9e666bec0395a591b50f1006147f717ff80f5c0cb88a5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.11.2

Release files / auto_temp_gpiod_ctrl-0.1.2-py3-none-any.whl

Download URL auto_temp_gpiod_ctrl-0.1.2-py3-none-any.whl
Size 9.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
5c3aafc34493ee0a5aed5c00486c4c33e4fd3b41b4786d2842edbe4d77d05b33
BLAKE2b-256 checksum
How to use checksums
74d4d9e3c2a5d01765da94760a85dc8b78d4f5854c9abade7794a995a9b5e9b6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.11.2

Security for auto-temp-gpiod-ctrl 0.1.2

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page