RPi 4 fan shim

I just got the fan shim. I put it together, mounted it on my RPi 4 and installed the software for it. It seemed to work OK. During installation I set threshold to 65 degrees and hysteresis to 5 degrees (as recommedned). After a while I noticed that the temperature as measured with vcgencmd is from around 51 up to 55 degrees. So I went to investigate through terminal history of software installation and found that when I issued the command:

sudo ./install-service.sh 65 5

I’ve got response:

Setting up with:
Threshold: 55 C
Hysteresis: 5 C
Delay: 2 seconds
Preempt: no
No LED:
No Button:

So it seems that the program incorrectly read parameters from command line. I went through the routine of stopping the service, and installing it anew (as in docs):

sudo systemctl stop pimoroni-fanshim.service
sudo ./install-service.sh XX YY

It turns out that no matter what I put for values of XX an YY, they’re always interpreted as 55 and 5 respectively by the install-service.
Obviously that is not show stopper, I can live (at least a while) with CPU being held at around 50 degrees, yet I’d like to have things working as the’re expected to.

I was searching some more what is happening with fan shim sw. On https://github.com/pimoroni/fanshim-python/tree/master/examples I found out what the problem is. It turns out that the correct syntax to call install-service is:

sudo ./install-service.sh --threshold <threshold> --hysteresis <hysteresis> --delay <delay> --preempt

That also means that the instructions given at https://learn.pimoroni.com/tutorial/sandyj/getting-started-with-fan-shim are either wrong or (perhaps) wrong for current version of software and should be corrected.

Post that in https://github.com/pimoroni/fanshim-python/issues and it will likely get seen and fixed quickly. ;)

The software has been in flux for a week or so, leaving the guide a little bit in the dust. I’ve got one final change pending a merge that’s discussed at length here - RPi 4 fan shim - and really makes the fan behave much more sensibly.

Perhaps I should try and add back in support for positional arguments to make the guide right in the interim.

Phil, that link is just taking me back to this thread?

D’oh! Trapped in an infinite loop!

I meant THIS link- Fanshim automatic.py preempt bug

New to the RP game but absolutely loving my RP4.

Installed the fan shim and registered on here with the intention of posting exactly the problem the OP has.

I can’t get the shim script to move away from the 55/5 setting. Have tried various combinations of starting and stopping the script, amending the setup file, reinstalling etc.

Happy fan shim user here but I cheated - I use the fan with my Pi 4 with no software so it simply runs all the time that the power is on. The CPU temperature indicates 39-41 degrees pretty much all the time.
I’m happy that it runs at a permanently safe temperature.
BTW, as I am deaf I have no idea what noise it makes - doesn’t matter to me :-)

Still having some difficulty with this.

I think there was an update to Automatic.py with improvements in the LED fade from green to red, but the problem I am getting is the script does not seem to run automatically each time I boot up.

Every time I turn on my Pi4, the fan is ‘dumb’ again, with a red light and running consistently. It only gets smart if I manually run Automatic.py.

Any tips?

I do believe to have it run automatically on every boot you need to
cd examples
sudo ./install-service.sh --on-threshold 65 --off-threshold 55 --delay 2
https://learn.pimoroni.com/tutorial/sandyj/getting-started-with-fan-shim
Otherwise you would need to run automatic.py via crontab etc.