Argon Fan HAT / Argon ONE Case Fan Controller for Ubuntu
argon1.sh
is a refactored version of the Argon FanHAT / Argon ONE Case Fan
controller for Ubuntu and is derived from the origin script published by
Argon Forty here:
The refactor consisted of:
- Adds support for Ubuntu by reading temps from sysfs.
- Adds support for Ubuntu 20.04 by only using Python 3.
- Uses here documents to make the script easier to read/maintain.
- Simplifies install/uninstall via an option parser.
- Removes the config script and desktop icons.
We have a Discord for this project:
This script will only work on Ubuntu running on a Raspberry Pi.
- Clone the project
git clone https://github.com/wimpysworld/argon1-ubuntu.git
- Install the fan controller
cd argon1-ubuntu
sudo ./argon1-ubuntu --install
Usage
$0 [options]
Available options are
--config Get help about how to configure the fan
--install Install the Argon ONE Case Fan / Argon FanHAT driver
--uninstall Uninstall the Argon ONE Case Fan / Argon FanHAT driver
To modify you fan curve edit /etc/argononed.conf
and then execute
sudo systemctl restart argononed.service
to made the changes active.
Power State | Action | Function |
---|---|---|
OFF | Short Press | Turn ON |
ON | Long Press (>=3s) | Soft Shutdown and Power Cut |
ON | Short Press (<=3s) | Nothing |
ON | Double Tap | Reboot |
ON | Long Press (>=5s) | Forced Shutdown |
Power State | Action | Function |
---|---|---|
OFF | Short Press | Nothing |
ON | Long Press (>=3s) | Soft Shutdown and Power Cut |
ON | Short Press (<=3s) | Nothing |
ON | Double Tap | Reboot |
ON | Long Press (>=5s) | Forced Shutdown |
- Thanks to kounch for their Arch Linux PKGBUILD for Argon One.
- Thanks to Cédric Meuter for their argon1.sh adapted for Ubuntu 20.04.
- Confirm Argon Fan HAT works on Pi 2, 3 and 4.
- Clean up parsing of the config file.
- Read
/sys/class/thermal/thermal_zone0/temp
in a Pythonic way. - Replace use of
os.system
.