spapadim / argon1

Rewrite of Argon One case fan and button support
MIT License
82 stars 16 forks source link

Argon one fan control installation on DietPi V7.4.2 with solution #17

Open HugoFroh opened 3 years ago

HugoFroh commented 3 years ago

Here are the steps I took to get the argon1_0.2.1_all.deb package working on DietPi V7.4.2. All steps are done with the user dietpi sudo adduser pi Add user "pi". During the process, the password for the user "pi" is set mkdir download Create the directory "download" in the home directory of the user dietpi Put the file "argon1_0.2.1_all.deb" on a USB stick formatted with FAT32 and plug it into the Rapberry Pi. sudo dietpi-drive_manager Mount the USB stick with the drive manager in a directory (for example -> /mnt/USB-stick). USB-Stick ist mounted: USB-Stick sudo dietpi-software -> Browse Software -> select file manager "mc" (package no. 3) -> install. sudo mc Start the file manager Use "mc" to copy the argon1_0.2.1_all.deb file from the USB stick to the "download" directory. /mnt/USB-Stick/ -> /home/dietpi/download/ Leave "mc" Install the following packages sudo apt-get install --reinstall python3-pkg-resources sudo apt install python3-gi python3-gi-cairo gir1.2-gtk-3.0 cd download Change to the "download" folder sudo apt install ./argon1_0.2.1_all.deb The fan control is installed sudo mc Mark the file /lib/python3/dist-packages/argonone/init.py -> Edit -> Select editor "nano". The following entry must be changed in the file so that the fan also starts when the temperature is reached:

Old: def _bus_write(self, value: int, register: int = _SMBUS_REGISTER):

Could raise IOError, according to "official" scripts

 self._bus.write_byte_data(_SMBUS_ADDRESS, register, int(value))

New: def _bus_write(self, value: int, register: int = _SMBUS_REGISTER):

Could raise IOError, according to "official" scripts

 self._bus.write_byte_data(_SMBUS_ADDRESS, int(value), register)   <-----

Ctrl & o -> Enter -> Ctrl & x Save the file under the same name and exit the editor Leave "mc" sudo adduser dietpi argonone sudo reboot sudo cat /etc/group • i2c has entered the user "argonone" • gpio has entered the user "argonone" • argonone has entered the user "pi" & "dietpi" All of the following commands should now work without an error message argonctl speed argonctl temp argonctl pause argonctl set_speed 50 argonctl resume speed sudo systemctl status argonone looks like this now dämon2

I wish you success