Where do I install the fan script for my Raspberry Case?

Hi,

I put balenaOS onto a Raspi4 which itselfs sits in a Argon One M.2 case which has active cooling fans.
Usually i can just run the curl command to download the script which sets the fan settings to only run when the temperature is getting too hot.

On balena my first assumption was to tunnel into the host system and then run the command, but it is working.

I receive a message that sudo ist not installed and I am not sure if this is the right approach.

Can you tell me if this is the right apporach? Can I install the script in the host system?

https://www.waveshare.com/wiki/PI4-CASE-ARGON-ONE-M.2

Thanks a lot!
Roger

Hi @rbleuler

Thanks for reaching out. The script which you shared is designed to run raspbian (or a debian flavor). I am checking with some of my colleagues here but I think you would need to heavily modify the script or run this via a container.

Here is one of the links which can help you during the process (if you go the route of creating your own): Custom Boot Action/Script

Regards,
N

1 Like

Hi Roger, there is not an easy way to install the script into the Host operating system, balenaOS, as it is based on Yocto Linux, and this script Argon has provided is expecting a Raspbian or Ubuntu-based system. Further, being that balenaOS is normally mounted read-only, it will not be trivial to port this script and get it working.

However, you could possible try running it inside of a container. Glancing at the script, as it’s checking for Ubuntu or Raspbian, you could try creating a Dockerfile that pulls from Docker Hub, install their script, and run it as a daemon or part of a launch file.

It would take some experimentation I suspect, but that is the only way I can think of to attempt to get it working. Hope that helps!