DarkElvenAngel
Posts: 1999
Joined: Tue Mar 20, 2018 9:53 pm

Re: Argon One Replacement Daemon

Wed Sep 15, 2021 10:50 pm

Looks like Argon 40 have a new case in the work the EON 4 drive NAS case looks quite interesting.

I'm not sure how if this project will support it once it's out in the wild I may pick one up I'm not doing Kickstarter.

Still waiting to see if the active issue can be closed it deals with log flooding when support is compiled I. For the power button however the power button devices are missing.

DarkElvenAngel
Posts: 1999
Joined: Tue Mar 20, 2018 9:53 pm

Re: Argon One Replacement Daemon

Thu Sep 16, 2021 3:21 am

EctoOne wrote:
Tue Sep 07, 2021 6:49 pm
By the way, is the missing i2c-dev in etc/modules for Raspberry Pi OS Lite fixed yet? Because I noticed the same problem on TwisterOS lite today.
Please find that the Testing branch 0.3.x has an updated script that should solve the bug you found. If you could test it and give feedback that would be most helpful.

Also did you try again to install on OSMC? If you post a full console log I can look for where any errors are occurring and help fix them.

EctoOne
Posts: 19
Joined: Wed Jan 06, 2021 8:01 pm

Re: Argon One Replacement Daemon

Thu Sep 23, 2021 12:03 pm

DarkElvenAngel wrote:
Thu Sep 16, 2021 3:21 am
EctoOne wrote:
Tue Sep 07, 2021 6:49 pm
By the way, is the missing i2c-dev in etc/modules for Raspberry Pi OS Lite fixed yet? Because I noticed the same problem on TwisterOS lite today.
Please find that the Testing branch 0.3.x has an updated script that should solve the bug you found. If you could test it and give feedback that would be most helpful.

Also did you try again to install on OSMC? If you post a full console log I can look for where any errors are occurring and help fix them.
I just flashed a new card with Raspberry OS Lite and used your installation script to install the testing version. But the /etc/modules was still empty. I haven't looked at the logs yet because I'm currently installing OMV (By the way l, thanks for the heads-up on the new case.).

I assume the installation script does pull the correct branch or should I have manually cloned your repo?

And I have not tried it with another OSMC installation yet, since I already had to much issues with OSMC itself. I might do it when I'm done testing OMV and "messed up" enough that a clean install would be better, but no promises.

DarkElvenAngel
Posts: 1999
Joined: Tue Mar 20, 2018 9:53 pm

Re: Argon One Replacement Daemon

Thu Sep 23, 2021 12:41 pm

EctoOne wrote:
Thu Sep 23, 2021 12:03 pm
DarkElvenAngel wrote:
Thu Sep 16, 2021 3:21 am
EctoOne wrote:
Tue Sep 07, 2021 6:49 pm
By the way, is the missing i2c-dev in etc/modules for Raspberry Pi OS Lite fixed yet? Because I noticed the same problem on TwisterOS lite today.
Please find that the Testing branch 0.3.x has an updated script that should solve the bug you found. If you could test it and give feedback that would be most helpful.

Also did you try again to install on OSMC? If you post a full console log I can look for where any errors are occurring and help fix them.
I just flashed a new card with Raspberry OS Lite and used your installation script to install the testing version. But the /etc/modules was still empty. I haven't looked at the logs yet because I'm currently installing OMV (By the way l, thanks for the heads-up on the new case.).

I assume the installation script does pull the correct branch or should I have manually cloned your repo?

And I have not tried it with another OSMC installation yet, since I already had to much issues with OSMC itself. I might do it when I'm done testing OMV and "messed up" enough that a clean install would be better, but no promises.
The changes only live in the 0.3.x branch so just check your pulling from there I believe the script will give the option to do this.

The other issue has been resolved and if this to works without mucking things up then the master can be updated.

EctoOne
Posts: 19
Joined: Wed Jan 06, 2021 8:01 pm

Re: Argon One Replacement Daemon

Thu Sep 23, 2021 4:11 pm

Looks like the script has set the correct branch.

Code: Select all

pi@raspberrypi:~/argononed $ git status
On branch 0.3.x
Your branch is up to date with 'origin/0.3.x'.

nothing to commit, working tree clean
I looked at your gitlab and believe the error is that you're looking for the wrong file.

Code: Select all

MODULE_FILE="/etc/modules.conf"
It should be:

Code: Select all

MODULE_FILE="/etc/modules"

DarkElvenAngel
Posts: 1999
Joined: Tue Mar 20, 2018 9:53 pm

Re: Argon One Replacement Daemon

Thu Sep 23, 2021 6:05 pm

I've made your recommended change when you get a chance let me know if it works.

Thanks for your contributions.

EctoOne
Posts: 19
Joined: Wed Jan 06, 2021 8:01 pm

Re: Argon One Replacement Daemon

Thu Sep 23, 2021 8:14 pm

After:

Code: Select all

git pull
./install
I get this:

Code: Select all

    ___                                                __
   /   |  _________ _____  ____  ____  ____  ___  ____/ /
  / /| | / ___/ __ `/ __ \/ __ \/ __ \/ __ \/ _ \/ __  /
 / ___ |/ /  / /_/ / /_/ / / / / /_/ / / / /  __/ /_/ /
/_/  |_/_/   \__, /\____/_/ /_/\____/_/ /_/\___/\__,_/
            /____/
_________________________________________________________
>>> Reset build to mrproper...
removed 'build/argonone-cli'
removed 'build/argonone-shutdown'
removed 'build/argonone.dtbo'
removed 'build/argononed'
removed 'build/argononed.o'
removed 'build/event_timer.o'
removed 'makefile.conf'
>>> Running prebuild configuration...
ARGON ONE DAEMON CONFIGURING ...
Distro check [raspbian] : OK
SYSTEM CHECK
gcc : OK
dtc : OK
make : OK
I2C Bus check : NOT ENABLED
CHECKING OPTIONAL SYSTEMS
bash-autocomplete : OK
logrotate : INSTALLED
Dependency Check : Successful
>>> Building...
Compile src/argononed.c
gcc -c -o build/argononed.o src/argononed.c -Wall -s -O3 -DLOG_LEVEL=5
Compile src/event_timer.c
gcc -c -o build/event_timer.o src/event_timer.c -Wall -s -O3 -DLOG_LEVEL=5
Build argononed
gcc -o build/argononed build/argononed.o build/event_timer.o -Wall -s -O3 -lpthread -lrt
Build argonone-shutdown
gcc -o build/argonone-shutdown src/argonone-shutdown.c -Wall -s -O3
MAKE: Daemon
Build argonone-cli
gcc -o build/argonone-cli src/argonone-cli.c -Wall -s -O3 -DLOG_LEVEL=5 -lrt
MAKE: CLI
Build argonone.dtbo
dtc -@ -I dts -O dtb -o build/argonone.dtbo src/argonone.dts
MAKE: Overlay
MAKE: Complete
>>> Installing...
Installing overlay Successful
Search config.txt for overlay ... FOUND
Installing daemon Successful
Installing CLI Successful
Installing CLI autocomplete for bash Successful
Installing services
argononed.service ... Successful
argonone-shutdown ... Successful
Refresh services list
Enable Service Successful
Starting Service Successful
Install Complete
>>>  Complete
The modules file is still unchanged. Shouldn't there be the output from:

Code: Select all

echo -n "Check for module ${MODULE}  " 
or

Code: Select all

echo "INFO:  ${MODULE_FILE} Not Found"
in there somewhere? Looks like the i2chelper.sh script isn't executed.

DarkElvenAngel
Posts: 1999
Joined: Tue Mar 20, 2018 9:53 pm

Re: Argon One Replacement Daemon

Thu Sep 23, 2021 8:23 pm

Your right I've missed something I'm going to have to look at again.

I'm away from my desk for a while however I will update you here once I've made the change it's most likely in the OS configuration step.

If you run the i2chelper.sh manually does it work and do what is expected?

EctoOne
Posts: 19
Joined: Wed Jan 06, 2021 8:01 pm

Re: Argon One Replacement Daemon

Thu Sep 23, 2021 8:50 pm

Yes, I ran the script as sudo and it just did the right thing. The log looked fine after I've done some switching between auto and manual mode.

I will also get you the output on OSMC later. OMV is kinda bloated for my needs. So I will remove it and set up a simple samba share on RP OS lite. And before that, I can quickly install OSMC again.

EctoOne
Posts: 19
Joined: Wed Jan 06, 2021 8:01 pm

Re: Argon One Replacement Daemon

Thu Sep 23, 2021 10:22 pm

Here is the OSMC output after I did:

Code: Select all

sudo apt install -y make gcc device-tree-compiler

Code: Select all

    ___                                                __
   /   |  _________ _____  ____  ____  ____  ___  ____/ /
  / /| | / ___/ __ `/ __ \/ __ \/ __ \/ __ \/ _ \/ __  /
 / ___ |/ /  / /_/ / /_/ / / / / /_/ / / / /  __/ /_/ /
/_/  |_/_/   \__, /\____/_/ /_/\____/_/ /_/\___/\__,_/
            /____/
_________________________________________________________
>>> Reset build to mrproper...
makefile:56: Configuration missing or not correct
>>> Running prebuild configuration...
ARGON ONE DAEMON CONFIGURING ...
Distro check [osmc] : WARNING: UNKNOWN DISTRO, The installer may not work
SYSTEM CHECK
gcc : OK
dtc : OK
make : OK
I2C Bus check : NOT ENABLED
CHECKING OPTIONAL SYSTEMS
bash-autocomplete : OK
logrotate : INSTALLED
Dependency Check : Successful
>>> Building...
Compile src/argononed.c
gcc -c -o build/argononed.o src/argononed.c -Wall -s -O3 -DLOG_LEVEL=5
src/argononed.c:24:10: fatal error: stdio.h: No such file or directory
 #include <stdio.h>
          ^~~~~~~~~
compilation terminated.
make: *** [makefile:83: build/argononed.o] Error 1
>>> Build ERROR...

DarkElvenAngel
Posts: 1999
Joined: Tue Mar 20, 2018 9:53 pm

Re: Argon One Replacement Daemon

Thu Sep 23, 2021 11:51 pm

Thanks for testing the script glad that works should be easy enough to sort out the problem.
EctoOne wrote:
Thu Sep 23, 2021 10:22 pm
Here is the OSMC output after I did:

Code: Select all

sudo apt install -y make gcc device-tree-compiler

Code: Select all

    ___                                                __
   /   |  _________ _____  ____  ____  ____  ___  ____/ /
  / /| | / ___/ __ `/ __ \/ __ \/ __ \/ __ \/ _ \/ __  /
 / ___ |/ /  / /_/ / /_/ / / / / /_/ / / / /  __/ /_/ /
/_/  |_/_/   \__, /\____/_/ /_/\____/_/ /_/\___/\__,_/
            /____/
_________________________________________________________
>>> Reset build to mrproper...
makefile:56: Configuration missing or not correct
>>> Running prebuild configuration...
ARGON ONE DAEMON CONFIGURING ...
Distro check [osmc] : WARNING: UNKNOWN DISTRO, The installer may not work
SYSTEM CHECK
gcc : OK
dtc : OK
make : OK
I2C Bus check : NOT ENABLED
CHECKING OPTIONAL SYSTEMS
bash-autocomplete : OK
logrotate : INSTALLED
Dependency Check : Successful
>>> Building...
Compile src/argononed.c
gcc -c -o build/argononed.o src/argononed.c -Wall -s -O3 -DLOG_LEVEL=5
src/argononed.c:24:10: fatal error: stdio.h: No such file or directory
 #include <stdio.h>
          ^~~~~~~~~
compilation terminated.
make: *** [makefile:83: build/argononed.o] Error 1
>>> Build ERROR...
I'll have to do an install for this and see what packages are missing normally build-essential is the right one but it's missing the stdio header so that could be a pathing issue. I'll update my PINN install and see if I can fix this too. I may need to write a readme for this OS is it based on Debian, like Raspberry Pi OS?

OMV hasn't been requested for support yet so I'll leave that for now.

DarkElvenAngel
Posts: 1999
Joined: Tue Mar 20, 2018 9:53 pm

Re: Argon One Replacement Daemon

Fri Sep 24, 2021 3:35 am

I've updated the 0.3.x to fix the helper script to run and added osmc to the OS directory to see if it will install.

You don't have the full compiler installed so try adding

Code: Select all

sudo apt-get install libc6-dev
Or for a new install

Code: Select all

sudo apt-get install build-essential
not just gcc.

I'm thinking that osmc should just be a link to debian unless it needs any special considerations.

EctoOne
Posts: 19
Joined: Wed Jan 06, 2021 8:01 pm

Re: Argon One Replacement Daemon

Fri Sep 24, 2021 4:36 am

Ok, looks like the i2chelper script is working now. There are some initial errors but i guess that based on the setup order.

Code: Select all

Fri Sep 24 06:01:45 2021 [INFO] Startup ArgonOne Daemon ver 0.3.3
Fri Sep 24 06:01:45 2021 [INFO] Loading Configuration
Fri Sep 24 06:01:45 2021 [INFO] Reading values from device-tree
Fri Sep 24 06:01:45 2021 [WARNING] Unable to open device-tree data
Fri Sep 24 06:01:45 2021 [INFO] GPIO initialized
Fri Sep 24 06:01:45 2021 [INFO] RPI MODEL 4B 4GB rev 1.4
Fri Sep 24 06:01:45 2021 [INFO] Lock file created
Fri Sep 24 06:01:45 2021 [INFO] Now running as a daemon
Fri Sep 24 06:01:45 2021 [INFO] Begin Initalizing shared memory
Fri Sep 24 06:01:45 2021 [CRITICAL] Failed to open the i2c bus
Fri Sep 24 06:01:45 2021 [INFO] Set GPIO 4 to mode INPUT
Fri Sep 24 06:01:45 2021 [INFO] Set GPIO 4 pull up/down to DOWN
Fri Sep 24 06:01:45 2021 [INFO] Now waiting for button press
Fri Sep 24 06:01:45 2021 [INFO] Monitoring line 4 on /dev/gpiochip0
Fri Sep 24 06:01:47 2021 [INFO] Successfully opened /dev/vcio for temperature sensor
Fri Sep 24 06:01:47 2021 [CRITICAL] Failed to write to the i2c bus.

Fri Sep 24 06:01:47 2021 [INFO] Set fan to 0%
Fri Sep 24 06:03:20 2021 [INFO] Terminate Signal
Fri Sep 24 06:03:20 2021 [INFO] Cleaning up
Fri Sep 24 06:03:20 2021 [INFO] Successfully closed temperature sensor
Fri Sep 24 06:03:20 2021 [INFO] I2C Closed
Fri Sep 24 06:03:20 2021 [INFO] Ready for shutdown
Fri Sep 24 06:03:20 2021 [INFO] Exiting
Fri Sep 24 06:03:42 2021 [INFO] Startup ArgonOne Daemon ver 0.3.3
Fri Sep 24 06:03:42 2021 [INFO] Loading Configuration
Fri Sep 24 06:03:42 2021 [INFO] Reading values from device-tree
Fri Sep 24 06:03:42 2021 [INFO] Hysteresis set to 3
Fri Sep 24 06:03:42 2021 [INFO] Fan Speeds set to 10% 55% 100%
Fri Sep 24 06:03:42 2021 [INFO] Fan Temps set to 55 60 65
Fri Sep 24 06:03:42 2021 [INFO] GPIO initialized
Fri Sep 24 06:03:42 2021 [INFO] RPI MODEL 4B 4GB rev 1.4
Fri Sep 24 06:03:42 2021 [INFO] Lock file created
Fri Sep 24 06:03:42 2021 [INFO] Now running as a daemon
Fri Sep 24 06:03:42 2021 [INFO] Begin Initalizing shared memory
Fri Sep 24 06:03:42 2021 [INFO] I2C Initialized
Fri Sep 24 06:03:42 2021 [INFO] Set fan to 0%
Fri Sep 24 06:03:42 2021 [INFO] Set GPIO 4 to mode INPUT
Fri Sep 24 06:03:42 2021 [INFO] Set GPIO 4 pull up/down to DOWN
Fri Sep 24 06:03:42 2021 [INFO] Now waiting for button press
Fri Sep 24 06:03:42 2021 [INFO] Monitoring line 4 on /dev/gpiochip0
Fri Sep 24 06:03:44 2021 [INFO] Successfully opened /dev/vcio for temperature sensor
Looks good enough for me.

As for OSMC. Yeah i figured that I was missing a package. When I was switching around the distros with PINN, I noticed that the installation size of OSMC is like 300MB smaller then RP OS Lite. Around 900 MB compared to around 1200 MB. I might have figured which package I was missing, but I just installed what was mentioned when I ran your installer. And just for that, I had to look up what package contained dtc, because sudo apt install dtc did obviously not work.

So, yeah I guess adding/expanding a/the Readme would be a viable solution.

And don't worry about OMV, it is installed with a script on top of RP OS lite. I was just mentioning it because I was trying it out and since it isn't something I'm spending more times on, I just had no problem testing OSMC again.

DarkElvenAngel
Posts: 1999
Joined: Tue Mar 20, 2018 9:53 pm

Re: Argon One Replacement Daemon

Fri Sep 24, 2021 5:03 am

Thanks for testing things out,

I'll take a look at the README and see where I can slip the package names in, at least for the Debian based distributions. The installer only tells you what programs are missing and not the packages to install them as that could be different depending on the OS. for example dtc is a valid package on Alpine Linux

I'm thinking under How To Install to add
Firstly you need to have a build environment setup, that includes the following `gcc dtc git bash linux-headers make git`
NOTE : The package names will be different depending on your OS so I've only given their binary names. Refer to your distribution for what you need to install.
Any thoughts?

EctoOne
Posts: 19
Joined: Wed Jan 06, 2021 8:01 pm

Re: Argon One Replacement Daemon

Fri Sep 24, 2021 6:47 pm

DarkElvenAngel wrote:
Fri Sep 24, 2021 5:03 am
I'm thinking under How To Install to add
Firstly you need to have a build environment setup, that includes the following `gcc dtc git bash linux-headers make git`
NOTE : The package names will be different depending on your OS so I've only given their binary names. Refer to your distribution for what you need to install.
Any thoughts?
It's fine, since you can google the binary names and figure out the package names from there. I only had issues with dtc because I wasn't using google. I searched directly for a debian package and mostly got some web hosting related stuff. :D
And I forgot about build-essentials...

DarkElvenAngel
Posts: 1999
Joined: Tue Mar 20, 2018 9:53 pm

Re: Argon One Replacement Daemon

Fri Sep 24, 2021 7:16 pm

Done and done.

I will soon try to see what is needed for OSMC and if the install process works or needs more steps. I noticed Twister OS in PINN so I thought maybe I'll give that a go too.

DarkElvenAngel
Posts: 1999
Joined: Tue Mar 20, 2018 9:53 pm

Re: Argon One Replacement Daemon

Fri Sep 24, 2021 9:16 pm

UPDATE:
VERSION 0.3.3 is now stable.

0.3.3 brings new OS support and fixes some bugs, most notable is the log flood bug this should now be resolved.
You can now install on OSMC, TwisterOS, & opensuse.

WHAT'S NEXT:
Now that the major bugs are quashed and the supported operating systems is now 14 and counting, I will start looking at working on revisions to the code and build system and start work on 0.4.0

Argon One Replacement Daemon

Special thank you to User EctoOne for all your help with testing 0.3.3 with new distributions, inspiring the install script, finding the lite OS bug.

Khurram
Posts: 21
Joined: Sun Aug 02, 2020 7:17 pm

Re: Argon One Replacement Daemon

Fri Oct 08, 2021 8:34 am

I got a couple of geeekpi pwm fans from amazon. The one on the raspberry pi 3b+ running raspbian buster works great using a nodered flow. However, the one on the raspberry pi 4 running ubuntu 20.04 x64 only acts as an on/off fan with no pwm control. The nodered flow and argononed daemon both have the same behavior on ubuntu. Are there any special settings needed on ubuntu?

DarkElvenAngel
Posts: 1999
Joined: Tue Mar 20, 2018 9:53 pm

Re: Argon One Replacement Daemon

Fri Oct 08, 2021 12:46 pm

Khurram wrote:
Fri Oct 08, 2021 8:34 am
I got a couple of geeekpi pwm fans from amazon. The one on the raspberry pi 3b+ running raspbian buster works great using a nodered flow. However, the one on the raspberry pi 4 running ubuntu 20.04 x64 only acts as an on/off fan with no pwm control. The nodered flow and argononed daemon both have the same behavior on ubuntu. Are there any special settings needed on ubuntu?
To be honest I've never tested the PWM branch on any other OS I'm not sure if there could be something with the PWM frequency that is being used maybe it's too fast.

Khurram
Posts: 21
Joined: Sun Aug 02, 2020 7:17 pm

Re: Argon One Replacement Daemon

Fri Oct 08, 2021 1:09 pm

According to https://ubuntu.com/tutorials/gpio-on-ra ... 1-overview, normal gpio does not work on the raspberry pi on ubuntu. There is a package (lgpio) to make it work on 21.04. Unfortunately, I am running 20.04 LTS. Maybe they will make it available for 20.04 LTS in due time.

DarkElvenAngel
Posts: 1999
Joined: Tue Mar 20, 2018 9:53 pm

Re: Argon One Replacement Daemon

Fri Oct 08, 2021 1:58 pm

Ubuntu at it again. You could try to grab the package and see if it will install to the older version your using sometimes this works without a hitch other times it can run into a dependency nightmare.

Oh wait a minute the package your looking at is for python so might not be the problem. Since you tried this before and the fan was on off I'm still thinking the PWM timing might be the issue. I only could test with an LED since I don't have a PWM controlled fan for a Pi.

I don't have time right now to dig into the code to choose a different frequency. It's a little more than just changing one number of I recall.
https://gitlab.com/DarkElvenAngel/argon ... ned.c#L314

The explanation of how to set the PWM is here you can do it from the CLI. Funny the line number is pi 314

DarkElvenAngel
Posts: 1999
Joined: Tue Mar 20, 2018 9:53 pm

Re: Argon One Replacement Daemon

Mon Nov 08, 2021 3:10 pm

UPDATE:

Bullseye is here and I've tested the daemon and it work perfectly, however since the change to GTK+3 the applet is now broken.

I will look into updating the applet to GTK+3 however it may be a while since I suspect it will be a full rewrite.

Return to “Advanced users”