They both fail with messages about sudo not being supported.
I downloaded script 1 and removed the sudo commands and it worked fine.
I downloaded script 2 and removed the sudo commands and it fails with:
mkdir: can’t create directory ‘/etc/argon’: Read-only file system
Is there a work around for buttons and fan control or an updated script for raspberry pi 5 and LibreElec?
Well, the fan never comes on and is connected to the internal board not to the new Pi5 fan connector.
Plus you would still need a script to use the button as it isn’t working either.
I don’t know Python but the standard GPIO library doesn’t work anymore as they have their own silicone for pin control. The GPIO library hasn’t been updated for this change. GPIZERO seems to have been updated but when I try any examples for anything on the Pi5 I get the error “SOC can’t find base address”
the 1st script is for the EEPROM settings allowing the RPI5 max 5amps of power. the 2nd script if the Raspberry Pi OS to control the fan and power button functionalities.
We are still updating the scripts for the LIbreElec and should be ready in a week or 2
I have the ONE V3 case, and all working, except the fan. I do not want the EEPROM updates - I did them as part of the install. I don’t like rats nest of the main install script - just the fan control, that I will probably tweak.
BTW Raspberry pi OS no longer has a default ‘pi’ user
It is a shame that Argon40 didn’t just use the Pi5 power switch connector, and the standard fan port/control - they just work without 3rd party hacks.
It’s forked from the orginal one (unluckly 3 years unmaintained) and was changed by me to get it to work with LE10/11/12. One user with a Argon One V3 gave me these days enough feedback to make version 0.0.7 work with this new case in combination with LE12 nightly. LE11 should work too with RPi5, but it’s currently untested. Feedback is very welcome.
PS:
If you want to get your fan control test script working with RPi5, you should change this line: bus.write_byte(address, percent)
to bus.write_byte_data(address,0x80,percent)
Please have a look in the argonregister.py to the constants “ADDR_ARGONONREG_” (line 16 - 23). This is the only source of thruth I currently know. 0x80 = ADDR_ARGONONEREG_DUTYCYCLE. I had to look at the different argon1 scripts to understand the new behavior.
This is the register for PWM value 0 - 100. Older firmware versions used the address 0x1a directly. Now the new firmware accept registers at this address and ignores the old fan control commands.
for example fan always on (100% dutycycle) at CLI: i2cset -y 1 0x1a 0x80 0x64
address: 0x1a
register: 0x80
value: 0x64
There is also a new register 0x86 ADDR_ARGONONEREG_CTRL for the shutdown control. In contrast to the fan control, the old command is apparently still supported here.
If not, use bus.write_byte_data(address,0x86,1) instead of bus.write_byte(address,0xFF)
Beware: Please be careful with the i2cdump command, because it leaves the MCU at Argon One V2 case in undefined state (could be a maintenance mode or it may hang). You must power cut the case, before it reacts normal again.
Currently I don’t have a build process ready. I simply used zip and updated the archive from 0.0.1 already linked in the LibreELEC thread. Alternatively, you can use this as a template:
Fan set to come on by temp (default temps)
a. pulses at startup then never comes on again
Fan set to come on at temp (lowest setting 20 degress celsius)
a. fan pulsed for about one second while disabling the addon
b. fan pulsed for about one second while enabling the addon
c. fan pulses for about one second every 20 seconds
Buttons
a. Pushing button for one second does nothing
b. Pushing button for two seconds completely shuts down
c. Pusning button for about 2.5 seconds completely shuts down
d. Pushing button for 3 seconds completely shuts down
e. Pushing button for > 5 seconds completely shuts down
Note: seems no amount of seconds results in a restart as noted in argon.py
Regarding the temperatures, possibly there is a bug inside of version 0.0.7. Because of that I have posted some minutes ago version 0.0.6d which is Argon One V3 only (because registers support is required).
But it’s normal that the fan is off as long the CPU temperature value (celsius) is below the first threshold. Pulsing of the fan speed also is possible if the reported CPU temperature directly in the near of a threshold. Because of the integrated fan is not a silent version, the most users are fine if the fan only starts if the CPU is starting getting to hot.
The button behavior like tested is okay. There is a different between b.)c.)d.) and e.)
b.) appears to have been long enough to count as a 3 second press.
c.) d.) should be a graceful shutdown (first power offs KODI and after ~ 10 seconds the red LED should be goes off)
e.) cuts the power from RPi without OS shutdown
For Reboot it needs to tap the button twice, shortly after another.
c.).d.) and Reboot works only if the Add-on is installed and working right. Alternatively without the Add-on a script like argononed service can be used.
The kernel source for the CPU temperature is in Celsius. This is the reason for that. If I were experienced enough with KODI Add-on development I would answer: “Yea, no issue”. But currently I must learning additional things to can make it happen.