Pimoroni Fanshim Script and Bullseye

Hi all,

when I try to install the Fanshim script on Bullseye (Raspian) it fails with lot of errors that I cannot post, due to user limitations, but basically are:
-Package python-configparser is not available on Bullseye
-script is trying to install stuff for Python 2 wich is depreciated long time ago and not available in Bullseye
-rpi.gpio>=0.7.0 should have issues on Bullseye Python 3.9
-you are missing Build-Essential package

So I had to format and re-install Buster back in order for the script to work, is it possible to update it?

Thanks in advance

The final Bullseye image dropped into my lap with little notice, and I’d previously been running a manually upgraded (from Buster) version that- of course- still had Python 2 sigh

Fix incoming here: Fixx installl.sh for bullsye/default Python 3 by Gadgetoid · Pull Request #104 · pimoroni/fanshim-python · GitHub

I have… a lot of install scripts to fix!

In the mean time, adding a dtoverlay to your config.txt file will get you some temperature control of the fan. The button can also be used as a shutdown button with a second edit.
Fan Shim BCM 18 Pin 12 Fan Control
Fan Shim BCM 17 Pin 11 Button

dtoverlay=gpio-fan,gpiopin=18,temp=55000
dtoverlay=gpio-shutdown,gpio_pin=17,active_low=1,gpio_pull=up

55000 is 55c on, you can change that to what ever on temperature you want. It will go off again when the temp is 10c below your on temp.
The fan control option in Raspberry Pi Config will work and make the edit for you. Just use GPIO 18.
By default with no edits, pressing the fan shim button will boot up your Pi. Assuming you don’t unplug the power supply after doing a shutdown.

Thanks.
Do you know more or less how long will it takes?

You mean on a fresh installed Bullseye I can simply add those lines in the config file to make the fan working also without the Fanshim script?

Yes, they will work with no fanshim software installed. You only need the first one for temperature control. The second line is an optional extra for the button.
You need to reboot just the once after doing the edit. They only get read on bootup.

It works, thanks for the suggestion.
Once the Fanshim script is ready I can simply delete the line and install the script, right?

Yes, just delete that line and install the fanshim software.

Another question, is there a line to add in order to control the fan speed?

No, not via the config.txt anyway. To control the speed you would have to use PWM on the fan control pin. You basically turn it on, off, on, off very quickly. More off than on means slower speed. It’s doable via python etc, I haven’t tried it myself though.

Hi, is there any update on this? I have bought the fan but still cannot properly use it on Bullseye. Thanks