


I like the fact, that FanControl.tool is just a bash script which has to be configured once and then gets started after every boot. I made my way to where i created my own config, set it up as good as i can but as i want to start the script running viaĬan anyone help me to go into the right direction?ĭid i miss more simple and obvious solutions? Now i tried to make my way through the FanControl.tool. The housing includes two fans wich i connetcted to the CPU_FAN and CHA_FAN connector and always running at full power. Running TrueNAS Scae with vanilla docker. … and your fan should start to fire up every time your CPU temperature goes above 50 degrees….Im very proud owner of my first server housing for my Snap connect pi-fancontrol:hardware-observe Snap connect pi-fancontrol:gpio pi4-devel:bcm-gpio-14 You can easily install it with: snap install pi-fancontrol The whole code for the pi-fancontrol snap can be found on github and there is indeed a ready made snap for you to use in the snap store at A simple fancontrol part that just copies the script into the snap package, and off we go ! Now we need a very simple apps: entry that spawns the script as a daemon, allows it to access the info about temperature via the hardware-observe interface and also allows it to write to the gpio interface we connect the snap to, to echo the 0/1 values into the sysfs node for the GPIO.

It is very specific to the Raspberry Pi, so we also add an architectures: block that makes it only build and run on arm images. The image is based on core18, so we add a base: core18 entry. Summary: Control a raspberry pi fan attached to GPIO 14Ĭontrol a fan attached to a GPIO via NPN transistorĬp -av fancontrol.sh $SNAPCRAFT_PART_INSTALL/ Since we run Ubuntu Core we indeed want to run the whole thing as a snap package, so lets quickly create a snapcraft.yaml file for it: name: pi-fancontrol So now I had an addon board that can cool the CPU, but the fan indeed needs some controlling software, this is easily done via some small shell script by echoing 0 or 1 into /sys/class/gpio/gpio14/value … this script can be found on my github account as fancontrol.sh Finished addon board (with pic how it gets attached)
