Posts by matzo70

    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.

    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?

    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?

    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.