Argon One Fan Control

  • I tried autostart.sh on LE10. I worked once but the TV display stopped on next boot after upgrading the config file. I removed the autostart.sh file and rebooted but still had problems so did and upgrade to same version which fixed things.

  • 1. Edit the argonone-config file on line 35, 36, and 37 to reflect:


    echo 55"="10 >> $daemonconfigfile

    echo 60"="55 >> $daemonconfigfile

    echo 65"="100 >> $daemonconfigfile


    2.Edit the argononed.py line 75 to reflect:

    /storage/.config directory
    fanconfig = ["65=100", "60=55", "55=10"]



    2. Create a sh file and name it autostart.sh and in that file copy and paste this script and save:
    place file in /storage/.config directory
    #!/bin/sh

    (

    python /storage/.config/argononed.py

    ) &


    3. Edit the argononed.service file in the /storage/.config/system.d directory and add this command to line 8:
    ExecStart=/bin/sh -c ". /etc/profile; exec /usr/bin/python /storage/.config/argononed.py"


    4. Go to terminal and test by running ./argononed-config


    5. Fan will run at those values.

    • Best Answer

    Hey Guys,


    To add more, I installed a fresh LibreElec v10.0.0. I installed the add on Raspbery pi tools, System tools and Adafruit Librairies (not sure it helps) from the repos.

    I installed the dedicated argon one libreelec script: "curl argonone-setup-libreelec.sh | bash"

    It was obviously not working at first.

    I only needed to update the "/storage/.config/system.d/argononed.service" and change the ExecStart line with this one : ExecStart=/bin/sh -c ". /etc/profile; exec /usr/bin/python /storage/.config/argononed.py".

    Everything then went fine and I was able to manage the fan control through the config file.


    Have Fun,

    Damien.

  • This worked for me to get the "all or nothing" fan settings working (thanks), has somone then gotten the variable speed working?

  • This worked well. I had the noisey stock fan running flat out when I rebooted. I edited "argononed.conf" with 4 lines of °C to % fan settings after removing 1=100.

    ie

    42=25

    44=50

    46=75

    48=100


    I didnt try through their app.


    Chook

  • When I do this, I get no fan at all at any temperature. Any ideas.


    EDIT: Fan is working now with this config!


    I also get no fan when applying this method :@


    Thanks,

    craigr

    LibreELEC 10.0.1 on Pi4B 4GB - Argon ONE M.2 Case - Toshiba 256GB MSATA

    NVidia Shields two 2015's and one 2019 running Kodi Matrix

    Lumagen RP Video Processor - Lexicon MC10 Pre/Pro - JVC NX9 Projector

    Edited once, last by craigr ().

  • Hi, I've tried many times to get this working. I installed raspberry pi tools and adafruit from the addons but didn't see that you'd written System Tools. As soon as I installed this and rebooted it started working.

    Thanks a lot for this. I'm not sure how beneficial the fan actually is as the case is a good heatsink and I never get huge temps, but it's nice to have it there working should I need it.

    Dozer.

  • Anyone has the ideia how to install this? seens better for controlling the argon fan..

    https://gitlab.com/DarkElvenAngel/argononed

    You or someone needs to build the daemon. It says to clone the repository and make the requisite files. This seems fine if it were dealing with a myriad of hardware types. If someone has a GIT build environment set up perhaps you could try? My fan and button setup are working fine using previous solutions. So if it isn't broken don't fix it. Perhaps contact the author to contact the developers and post a plugin.

  • Hello all,

    So I finally got my argon one pi4 case running libreelec 10.0.1. Followed the install instructions with the script and as expected the fan does not work. Power button works fine. The only option I have in the config file is fan on/off but whatever I do the fan does not work.

    Anyway after reading this topic I have tried several things listed here but nothing has worked so far. So what I have done so far is I have installed the modified "argoneone-config" file as mention in the first page (i think about 5 or 6 posts down). What this has done is given me extra options to control the fan ie temp, speed etc. I know this works because it re writes those values I set into the "argononed-conf" file, however fan is still not working.

    Have I missed something here? Any help greatly appreciated.

    Thank you.

  • Hello all,

    So I finally got my argon one pi4 case running libreelec 10.0.1. Followed the install instructions with the script and as expected the fan does not work. Power button works fine. The only option I have in the config file is fan on/off but whatever I do the fan does not work.

    Anyway after reading this topic I have tried several things listed here but nothing has worked so far. So what I have done so far is I have installed the modified "argoneone-config" file as mention in the first page (i think about 5 or 6 posts down). What this has done is given me extra options to control the fan ie temp, speed etc. I know this works because it re writes those values I set into the "argononed-conf" file, however fan is still not working.

    Have I missed something here? Any help greatly appreciated.

    Thank you.

    matzo70.


    This is what I did.

  • Thank you for the reply chook55, unfortunately that did not work, still no fan control.

    Did you install Raspberry pi tools and System tools? I just did an install to RPi4 version 10.01. Seems to be working.


    Install them if not already.


    Try systemctl restart argononed.service


    Chook

  • Hi Chook,


    Yes I do have pi and system tools installed along with adafruit libraries.


    I uninstalled the script and done it again using the above method but still not working no fan control. The script says it installed fine but there is an error that says "too many errors from stdin" after installing the script.


    Any ideas?

    Edited once, last by matzo70: P.s, after typing "systemctl restart argononed.service" i get this error "Job for argononed.service failed because the control process exited with error code. See "systemctl status argononed.service" and "journalctl -xe" for details." ().

  • Further to my above post, after running "journalctl -xe" i get the below errors.


    LibreELEC sh[1431]: /usr/bin/python: can't open file '/storage/.config/argononed.py.': [Errno 2] No such file or directory

    LibreELEC systemd[1]: argononed.service: Main process exited, code=exited, status=2/INVALIDARGUMENT

    LibreELEC systemd[1]: argononed.service: Failed with result 'exit-code'.

    LibreELEC systemd[1]: argononed.service: Scheduled restart job, restart counter is at 4.

    LibreELEC systemd[1]: Stopped Argon One Fan and Button Service.


    Regarding line 1, i checked to see if the argononed.py file is located under '/storage/.config/ and the file does exist in that location.


    This has got me stumped. Any ideas?


  • I assume you edited the argononed.config file.


    Mine looks like this.


    # Argon One Fan Speed Configuration

    #

    # Min Temp=Fan Speed


    42=12.5

    44=25

    46=50

    48=100


    chook


    You should do this by jimmyneutron.




    1. Edit the argonone-config file on line 35, 36, and 37 to reflect:


    echo 55"="10 >> $daemonconfigfile

    echo 60"="55 >> $daemonconfigfile

    echo 65"="100 >> $daemonconfigfile

    2.Edit the argononed.py line 75 to reflect:

    /storage/.config directory

    fanconfig = ["65=100", "60=55", "55=10"]


    2. Create a sh file and name it autostart.sh and in that file copy and paste this script and save:

    place file in /storage/.config directory

    #!/bin/sh

    (

    python /storage/.config/argononed.py

    ) &

    3. Edit the argononed.service file in the /storage/.config/system.d directory and add this command to line 8:

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

    4. Go to terminal and test by running ./argononed-config

    5. Fan will run at those values.



    It was a long process getting it working. I feel your frustration.

    I am not a coder. but a long time xbmc user.

    Edited once, last by chook55: Merged a post created by chook55 into this post. ().

  • Hello chook,

    Well I finally got it working I actually did a typo on editing the execstart line in "argonone.service" file. I also managed to get the config file to behave in a way where you can set the temp/speed as well. This is what I did the steps below.


    1. Ensure you have Pi tools and system tools installed.


    2. Install the following script "curl argonone-setup-libreelec.sh | bash"


    3. reboot (very important)


    4.

    Create a sh file and name it autostart.sh and in that file copy and paste this script and save:

    place file in /storage/.config directory

    #!/bin/sh

    (

    python /storage/.config/argononed.py

    ) &


    5. Edit the argononed.service file in the /storage/.config/system.d directory and add this command to line 8:

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


    6. open "argonone-config" and delete all entries and add the below and save the file.




    #!/bin/bash

    daemonconfigfile=/storage/argononed.conf

    echo "--------------------------------------"

    echo "Argon One Fan Speed Configuration Tool"

    echo "--------------------------------------"

    echo "WARNING: This will remove existing configuration."

    echo -n "Press Y to continue:"

    read -n 1 confirm

    echo

    if [ "$confirm" = "y" ]

    then

    confirm="Y"

    fi


    if [ "$confirm" != "Y" ]

    then

    echo "Cancelled"

    exit

    fi

    echo "Thank you."


    get_number () {

    read curnumber

    re="^[0-9]+$"

    if [ -z "$curnumber" ]

    then

    echo "-2"

    return

    else

    if [ $curnumber -lt 0 ]

    then

    echo "-1"

    return

    elif [ $curnumber -gt 100 ]

    then

    echo "-1"

    return

    fi

    echo $curnumber

    return

    fi

    echo "-1"

    return

    }



    loopflag=1

    while [ $loopflag -eq 1 ]

    do

    echo

    echo "Select fan mode:"

    echo " 1. Always on"

    echo " 2. Adjust to temperatures (55C, 60C, and 65C)"

    echo " 3. Customize behavior"

    echo " 4. Fixed Speed"

    echo " 5. Cancel"

    echo "NOTE: You can also edit argononed.conf directly"

    echo -n "Enter Number (1-5):"

    newmode=$( get_number )

    if [[ $newmode -ge 1 && $newmode -le 5 ]]

    then

    loopflag=0

    fi

    done


    echo

    if [ $newmode -eq 5 ]

    then

    echo "Cancelled"

    exit

    elif [ $newmode -eq 1 ]

    then

    echo "#" > $daemonconfigfile

    echo "# Argon One Fan Speed Configuration" >> $daemonconfigfile

    echo "#" >> $daemonconfigfile

    echo "# Min Temp=Fan Speed" >> $daemonconfigfile

    echo 1"="100 >> $daemonconfigfile

    systemctl restart argononed.service

    echo "Fan always on."

    exit

    elif [ $newmode -eq 4 ]

    then

    echo "Please provide fan speed:"

    echo "#" > $daemonconfigfile

    echo "# Argon One Fan Speed Configuration" >> $daemonconfigfile

    echo "#" >> $daemonconfigfile

    echo "# Min Temp=Fan Speed" >> $daemonconfigfile

    echo -n "Speed (0-100 only):"

    curfan=$( get_number )

    echo 1"="$curfan >> $daemonconfigfile

    systemctl restart argononed.service

    echo "Fan set to "$curfan

    exit

    elif [ $newmode -eq 2 ]

    then

    echo "Please provide fan speeds for the following temperatures:"

    echo "#" > $daemonconfigfile

    echo "# Argon One Fan Speed Configuration" >> $daemonconfigfile

    echo "#" >> $daemonconfigfile

    echo "# Min Temp=Fan Speed" >> $daemonconfigfile

    curtemp=55

    while [ $curtemp -lt 70 ]

    do

    errorfanflag=1

    while [ $errorfanflag -eq 1 ]

    do

    echo -n ""$curtemp"C (0-100 only):"

    curfan=$( get_number )

    if [ $curfan -ge 0 ]

    then

    errorfanflag=0

    fi

    done

    echo $curtemp"="$curfan >> $daemonconfigfile

    curtemp=$((curtemp+5))

    done


    systemctl restart argononed.service

    echo "Configuration updated."

    exit

    fi


    echo "Please provide fan speeds and temperature pairs"

    echo


    loopflag=1

    paircounter=0

    while [ $loopflag -eq 1 ]

    do

    errortempflag=1

    errorfanflag=1

    while [ $errortempflag -eq 1 ]

    do

    echo -n "Provide minimum temperature (in Celsius) then [ENTER]:"

    curtemp=$( get_number )

    if [ $curtemp -ge 0 ]

    then

    errortempflag=0

    elif [ $curtemp -eq -2 ]

    then

    errortempflag=0

    errorfanflag=0

    loopflag=0

    fi

    done

    while [ $errorfanflag -eq 1 ]

    do

    echo -n "Provide fan speed for "$curtemp"C (0-100) then [ENTER]:"

    curfan=$( get_number )

    if [ $curfan -ge 0 ]

    then

    errorfanflag=0

    elif [ $curfan -eq -2 ]

    then

    errortempflag=0

    errorfanflag=0

    loopflag=0

    fi

    done

    if [ $loopflag -eq 1 ]

    then

    if [ $paircounter -eq 0 ]

    then

    echo "#" > $daemonconfigfile

    echo "# Argon One Fan Speed Configuration" >> $daemonconfigfile

    echo "#" >> $daemonconfigfile

    echo "# Min Temp=Fan Speed" >> $daemonconfigfile

    fi

    echo $curtemp"="$curfan >> $daemonconfigfile


    paircounter=$((paircounter+1))


    echo "* Fan speed will be set to "$curfan" once temperature reaches "$curtemp" C"

    echo

    fi

    done


    echo

    if [ $paircounter -gt 0 ]

    then

    echo "Thank you! We saved "$paircounter" pairs."

    systemctl restart argononed.service

    echo "Changes should take effect now."

    else

    echo "Cancelled, no data saved."

    fi


    7. Reboot then type "./argonone-config" (without quotes) and you can now control the fan to your likeing.



    Thanks for your help chook I just needed a nudge.