I created a udev rule so the /dev/i2c-1 device is created with i2c as the group and 0666 permissions. My account can now successfully run
$ i2cdetect -F 1
I think this is a step forward.
Now when I try to start the daemon as user argonone, it still fails, but now in a new location:
argonone[1451]: INFO: Loading config file from /etc/argonone.yaml
argonone[1451]: /usr/lib/python3.9/site-packages/argonone/__init__.py:537: YAMLLoadWarning: calling yaml.load() without Loader=... is deprecated, as>
argonone[1451]: config = yaml.load(fp)
argonone[1451]: Traceback (most recent call last):
argonone[1451]: File "/usr/bin/argononed", line 33, in <module>
argonone[1451]: sys.exit(load_entry_point('argon1==0.1', 'console_scripts', 'argononed')())
argonone[1451]: File "/usr/lib/python3.9/site-packages/argonone/cmdline.py", line 175, in argondaemon_main
argonone[1451]: daemon = ArgonDaemon()
argonone[1451]: File "/usr/lib/python3.9/site-packages/argonone/__init__.py", line 549, in __init__
argonone[1451]: self._argon_board = ArgonOneBoard(initial_speed=0, bus_mutex=Lock())
argonone[1451]: File "/usr/lib/python3.9/site-packages/argonone/__init__.py", line 94, in __init__
argonone[1451]: GPIO.setup(_SHUTDOWN_BCM_PIN, GPIO.IN, pull_up_down=GPIO.PUD_DOWN)
argonone[1451]: RuntimeError: Not running on a RPi!
Hmm, interesting error.
But now it is a gpio related issue… so now I bet I need to figure out what group gpio does on debian.
There are /dev/gpio* devices, could be a similar issue.
Edit: Yes, exactly the same issue. I created a udev rule for /dev/gpiomem so that it is owned by root:gpio and 0666 permissions. And now the daemon mostly runs as the user argonone.
$ systemctl status argonone
● argonone.service - Fan and power control for ArgonOne case
Loaded: loaded (/usr/lib/systemd/system/argonone.service; enabled; vendor preset: disabled)
Active: active (running) since Sun 2021-02-21 21:04:46 CST; 1s ago
Main PID: 1333 (argononed)
Tasks: 3 (limit: 9064)
CGroup: /system.slice/argonone.service
└─1333 /usr/bin/python /usr/bin/argononed
argonone[1333]: INFO: Adjusting fan speed to 70 for temperature 44.303
argonone[1333]: Traceback (most recent call last):
argonone[1333]: File "/usr/lib/python3.9/threading.py", line 954, in _bootstrap_inner
argonone[1333]: INFO: D-Bus server thread starting
argonone[1333]: self.run()
argonone[1333]: File "/usr/lib/python3.9/site-packages/argonone/__init__.py", line 290, in run
argonone[1333]: button_press = self._argon_board.wait_for_button()
argonone[1333]: File "/usr/lib/python3.9/site-packages/argonone/__init__.py", line 144, in wait_for_button
argonone[1333]: if GPIO.wait_for_edge(_SHUTDOWN_BCM_PIN, GPIO.RISING, timeout=timeout) is None:
argonone[1333]: RuntimeError: Error waiting for edge
An issue with the power button to be resolved.