RPI4B Fan Control

Hi,
Does anyone know if there is a way to configure the fan curve/behavior like within RaspbianOS?

I have a RPI4B with the official case fan (GPIO14) running balena-pihole and noticed the fans run quite loud without configuration.
Thanks in advance

Hi

We don’t have anything for this yet - but feels like an interesting feature to add. I have created an issue to track this feature request here - Add fan control utility · Issue #602 · balena-os/balena-raspberrypi · GitHub - feel free to add more details if you feel like.

In the meantime - a simple way to do this would be to implement a small service that checks the temperature and controls the fan similar to what raspbian does.

Hi, thanks for getting back to me so quickly.
Thanks for creating the issue, i’m looking forward to it.

Edit:
I came across a few websites just now and it looks like python is required in order to get this working.
This particular guide (click here) requires python3.
But trying this on the pihole container via the balenaCloud terminal does not work (says unable to locate package).

Can you send us the full error that you are getting and which command you are running that leads to this error, thanks.

Hi,
I just tried both development and production editions - both show the same error.

Full terminal log is as follows:
Connecting to 7f19ecf311cca2757386e9d6a05a1c40…
Spawning shell…
root@7f19ecf:/usr/src/app# sudo apt install python3-pip
Reading package lists… Done
Building dependency tree
Reading state information… Done
E: Unable to locate package python3-pip
root@7f19ecf:/usr/src/app#

Hello,
Can you please try apt-get update first before installing python3-pip. apt-get update updates the package lists for upgrades for packages that need upgrading, as well as new packages that have just come to the repositories.

Hi, perfect it works!
Still quite new to linux and didn’t think to update/upgrade.
Thanks for the help!

One more question though, the change I make in the container isn’t persistent is it? I’ll have to redo my work everytime the device reboots or restarts, is this correct?

Indeed the changes you made in the container aren’t persistent, it will probably persist between restarts. A push or update to the device with definitely remove your manually added scripts and packages. To make your fan control script persistent you should create a second container in your app and include the python script there. I think these links could help you on your way: