Package Details: argonone-git r30.c878d73-1

Git Clone URL: https://aur.archlinux.org/argonone-git.git (read-only, click to copy)
Package Base: argonone-git
Description: Argon One Service and Control Scripts por Raspberry Pi
Upstream URL: https://download.argon40.com/argon1.sh
Licenses: GPL3
Provides: argonone
Submitter: tonyfettes
Maintainer: tonyfettes
Last Packager: tonyfettes
Votes: 0
Popularity: 0.000000
First Submitted: 2020-06-21 03:28
Last Updated: 2021-01-17 12:11

Pinned Comments

tonyfettes commented on 2021-01-10 16:36

@Nihili0

Thank you very much and I do find it helpful!

I looked into the dependencies of the script file again, and I found out that all these dependencies could be satisfied with packages from repos and PKGBUILDs from AUR. smbus is satisfied by community/i2c-tools, RPi.GPIO by aur/python-raspberry-gpio (thanks katoitalia and Nihili0), and now they work well on my machine (rpi4B 8Gb).

Since doing creating files in argonone.install script will create files doesn't belong to any package (while they should belong to this package), I decide to remove any creation and write to file in the install script.

Therefore, it's better to first remove the package and then reinstall it, rather than directly upgrading it.

After the upgrading/reinstalling, following files may need manual operations:

  • Remove /opt/argonone. This directory is no longer needed.
  • If your /etc/modules-load.d/i2c.conf is created by this package and only contains
i2c_dev
i2c_bcm2835

then you can delete it. Now this package ships with /etc/modules-load.d/argonone.conf with the same content so there is no need to keep it.

Edit: grammar, more details

Latest Comments

1 2 3 4 Next › Last »

k0os commented on 2021-06-25 04:52

Download the vendors script @

https://download.argon40.com/argon1.sh

with

cd Downloads/
wget https://download.argon40.com/argon1.sh
sudo chmod +x /home/alarm/Downloads/argon1.sh

Remove the OS check which causes the script to exit on fail

sudo nano /home/alarm/Downloads/argon1.sh

delete this:

CHECKPLATFORM="Others"
# Check if Raspbian, otherwise Ubuntu
grep -q -F 'Raspbian' /etc/os-release &> /dev/null
if [ $? -eq 0 ]
then
    CHECKPLATFORM="Raspbian"
    pkglist=(raspi-gpio python3-rpi.gpio python3-smbus i2c-tools)   
else
    # Ubuntu has serial and i2c enabled
    pkglist=(python3-rpi.gpio python3-smbus i2c-tools)
fi

for curpkg in ${pkglist[@]}; do
    sudo apt-get install -y $curpkg
    RESULT=$(argon_check_pkg "$curpkg")
    if [ "NG" == "$RESULT" ]
    then
        echo "********************************************************************"
        echo "Please also connect device to the internet and restart installation."
        echo "********************************************************************"
        exit
    fi
done

Execute as root

sudo /home/alarm/Downloads/argon1.sh

There is one error but the script gets the fan up and running regardless.

[root@raspberrypi Downloads]# /home/alarm/Downloads/argon1.sh 
* Failed to read active DTB
***************************
Argon One Setup Completed.
***************************

You may need to reboot for changes to take effect

Use argonone-config to configure fan
Use argonone-uninstall to uninstall

I set a custom setting to test the fan immediately. My pi sits around 48 Celsius without the fan. Check your temp with

sensors

Run

argonone-config

Select option 3 and set the temp to the current temp or just below. set the speed to 50. Press return twice.

[root@raspberrypi Downloads]# argonone-config 
--------------------------------------
Argon One Fan Speed Configuration Tool
--------------------------------------
WARNING: This will remove existing configuration.
Press Y to continue:y
Thank you.

Select fan mode:
  1. Always on
  2. Adjust to temperatures (55C, 60C, and 65C)
  3. Customize behavior
  4. Cancel
NOTE: You can also edit /etc/argononed.conf directly
Enter Number (1-4):3

Please provide fan speeds and temperature pairs

Provide minimum temperature (in Celsius) then [ENTER]:40
Provide fan speed for 40C (0-100) then [ENTER]:50
* Fan speed will be set to 50 once temperature reaches 40 C

Restart the service with

systemctl restart argononed.service

The fan should switch on. I would do more digging but it works now so I'm content. Also I would check in a revision but I'm new here. I'll pull and commit sometime soon.

Peace and Love k

gameslayer commented on 2021-01-13 09:44

@tonyfettes It's no problem, I'm sure if you fix it or revert it ( what ever works best) will solve the issue :)

tonyfettes commented on 2021-01-13 07:04

@gameslayer

I think you're right. Sorry for bringing the frustration, and thank you for your comment.

gameslayer commented on 2021-01-13 05:30

@tonyfettes I could but I mean why?

This package is specifically made for Arch based systems on Raspberry pi 4 using this specific software to make it work and should just work, I shouldn't be told be go else if it didn't as everyone would have an issue not just me and you can clearly see a lot of people using Arch on their raspberry pi's while using this package are having issues..

I'm really sorry to say but clearly the rust implementation from the original go language version was a bad idea and broke everything because the original version still works but really frustrating that I have to do everything manually instead of this package which was convenient and great and needs to be fixed instead of telling people to go elsewhere.

tonyfettes commented on 2021-01-10 16:55

@gameslayer

You could have a look at some repos on this search result on github.com, and pick some to see if it works.

I myself rewrite the logic of this python script in rust (here is the code), but now it only subject to my personal use. After that did I realize that someone must have done that before, and the found out there are several re-implementation of the Argone case fan control service. So, I mean, these implementations could be alternative solutions of this package to control the fan.

Edit: grammar

tonyfettes commented on 2021-01-10 16:36

@Nihili0

Thank you very much and I do find it helpful!

I looked into the dependencies of the script file again, and I found out that all these dependencies could be satisfied with packages from repos and PKGBUILDs from AUR. smbus is satisfied by community/i2c-tools, RPi.GPIO by aur/python-raspberry-gpio (thanks katoitalia and Nihili0), and now they work well on my machine (rpi4B 8Gb).

Since doing creating files in argonone.install script will create files doesn't belong to any package (while they should belong to this package), I decide to remove any creation and write to file in the install script.

Therefore, it's better to first remove the package and then reinstall it, rather than directly upgrading it.

After the upgrading/reinstalling, following files may need manual operations:

  • Remove /opt/argonone. This directory is no longer needed.
  • If your /etc/modules-load.d/i2c.conf is created by this package and only contains
i2c_dev
i2c_bcm2835

then you can delete it. Now this package ships with /etc/modules-load.d/argonone.conf with the same content so there is no need to keep it.

Edit: grammar, more details

Nihili0 commented on 2021-01-10 10:39

@tonyfettes I get it working on my rpi 8gB by installing linux-raspberrypi4-aarch64 but be careful you have to do some tweaks

  • check your fstab to put the correct path to mmcblk it should be mmcblk0 instead of mmcblk1(suggested in the AArch64 Installation on archlinuxarm.org)

  • then I installed aur/python-raspberry-gpio

  • and if you have errors with smbus or if all is working but your fans don't do anything try:

installing smbus2 in the local install /opt/argonone/bin/pip install smbus2 and changing /opt/argonone/bin/argononed.py:

  • first import smbus2
-import smbus
+import smbus2 as smbus
  • then edit the temp_check function:
@@ -101,7 +101,7 @@ def temp_check():
  time.sleep(30)
  prevblock = block
  try:
-            bus.write_byte_data(address,0,block)
+            bus.write_byte(address, block)
  except IOError:
  temp = ""
  time.sleep(30)

Hope that helps, good luck

gameslayer commented on 2021-01-10 08:35

@tonyfettes so what's the alternative solutions?

tonyfettes commented on 2020-12-21 15:01

@soyel

By searching the internet, I found out this merge request on the SourceForge repo of the python module PRi.GPIO, and currently it seems that there is no work around to get this module function properly on rpi4B 8gb, 400 and CM4, before that MR get merged.

p.s. Actually, I've searched github and found some alternative solutions to detect the power button and to control the fan. You could probably try some of them and see if it works on your case.

soyel commented on 2020-12-21 00:29

@tonyfettes sorry for the delay and thanks a lot for the suggestion.

It installed pysmbus correctly but then I get another error.

Dec 20 23:16:00 rpi-srv00 systemd[1]: Started Argon One Fan and Button Service.
Dec 20 23:16:00 rpi-srv00 python3[208676]: Traceback (most recent call last):
Dec 20 23:16:00 rpi-srv00 python3[208676]:   File "/opt/argonone/bin/argononed.py", line 10, in <module>
Dec 20 23:16:00 rpi-srv00 python3[208676]:     import RPi.GPIO as GPIO
Dec 20 23:16:00 rpi-srv00 python3[208676]:   File "/opt/argonone/lib/python3.9/site-packages/RPi/GPIO/__init__.py", line 23, in <module>
Dec 20 23:16:00 rpi-srv00 python3[208676]:     from RPi._GPIO import *
Dec 20 23:16:00 rpi-srv00 python3[208676]: RuntimeError: This module can only be run on a Raspberry Pi!
Dec 20 23:16:00 rpi-srv00 systemd[1]: argononed.service: Main process exited, code=exited, status=1/FAILURE

Not sure what to do with that (it's a rpi4B 8gb if it helps).

This fork install without issues but I end up with the same error.

For some reasons, I also don't have that issue when I do those tests:

% sudo /opt/argonone/bin/python3
Python 3.9.1 (default, Dec 15 2020, 20:22:32) 
[GCC 10.2.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import RPi.GPIO as GPIO
>>> GPIO.VERSION
'0.7.0'
>>> GPIO.RPI_REVISION
3