Error with Argononed

I want my Argon fan to stay off as long as the temperature stays below 50 degrees.

i tried:

curl https://download.argon40.com/argon1.sh | bash
sudo systemctl enable argononed
sudo service argononed start

nano /etc/argononed.conf

#
# Argon One Fan Speed Configuration
#
# Min Temp=Fan Speed
0=0
55=10
60=55
65=100

I get the following error message

root@DietPi:~# systemctl status argononed
● argononed.service - Argon One Fan and Button Service
     Loaded: loaded (/lib/systemd/system/argononed.service; enabled; vendor preset: enabled)
     Active: failed (Result: exit-code) since Thu 2023-02-09 12:02:10 CET; 56s ago
    Process: 601 ExecStart=/usr/bin/python3 /usr/bin/argononed.py (code=exited, status=1/FAILURE)
   Main PID: 601 (code=exited, status=1/FAILURE)
        CPU: 84ms

Feb 09 12:02:10 DietPi systemd[1]: argononed.service: Scheduled restart job, restart counter is at 5.
Feb 09 12:02:10 DietPi systemd[1]: Stopped Argon One Fan and Button Service.
Feb 09 12:02:10 DietPi systemd[1]: argononed.service: Start request repeated too quickly.
Feb 09 12:02:10 DietPi systemd[1]: argononed.service: Failed with result 'exit-code'.
Feb 09 12:02:10 DietPi systemd[1]: Failed to start Argon One Fan and Button Service.

I have reinstalled Argononed twice and still get the error

Looks like it is missing a package. Try:

sudo python3 -i /usr/bin/argononed.py SERVICE

This will attempt to start the service interactively so… you may be able to see an error message. Please post that message. I suspect that the install script is not downloading everything needed for DietPi

Hi,

NHHiker suggestions give nothing as python script works in user interactive mode

You can troubleshot service context with journalctl :

May 03 23:23:21 LibreELECP4 systemd[1]: Started Argon One Fan and Button Service.
May 03 23:23:21 LibreELECP4 python3.8[4245]: Traceback (most recent call last):
May 03 23:23:21 LibreELECP4 python3.8[4245]:   File "/storage/.config/argononed.py", line 4, in <module>
May 03 23:23:21 LibreELECP4 python3.8[4245]:     import smbus
May 03 23:23:21 LibreELECP4 python3.8[4245]: ImportError: libi2c.so.0: cannot open shared object file: No such file or directory

After some hours searching for a fix i found this one on libreelec forum

The environment is not set in service :

ADAPT path for your distrib, here is for libreelec
eg: replace /storage/.config/ with /usr/bin/

nano /storage/.config/system.d/argononed.service

change this line :
ExecStart=/usr/bin/python /storage/.config/argononed.py

to :
ExecStart=/bin/sh -c ". /etc/profile; exec /usr/bin/python /storage/.config/argononed.py"

then reload services, start argononed :

systemctl daemon-reload
systemctl start argononed.service

source: https://forum.libreelec.tv/thread/23933-argon40-case-python-script-for-fan-control-problem-with-le-10-beta/

Thanks to mglae

Worked for me :ok_hand:

systemctl status argononed.service

argononed.service - Argon One Fan and Button Service
     Loaded: loaded (/storage/.config/system.d/argononed.service; enabled; vendor preset: disabled)
     Active: active (running) since Wed 2023-05-03 23:37:17 CEST; 28min ago
   Main PID: 4725 (python)
     CGroup: /system.slice/argononed.service
             └─4725 /usr/bin/python /storage/.config/argononed.py

May 03 23:37:17 LibreELECP4 systemd[1]: Started Argon One Fan and Button Service.

May 03 23:23:21 LibreELECP4 python3.8[4245]:     import smbus
May 03 23:23:21 LibreELECP4 python3.8[4245]: ImportError: libi2c.so.0: cannot open shared object file: No such file or directory

Is showing that smbus could not be found.