How to set up Pi 4 Case Fan

Ho community,

this is my first request. Today I was able to install openhab 3 on my new raspberry pi 4. I think I’m not the only one who will operate this 24/7. So I added the Pi 4 Case Fan. To set it up that the fan only is running when needed the only way I found so far was to connect the raspberry to a monitor and keyboard.

Is there a possibility to change the according raspbian setting via the Putty console? I checked the console setup by openhabian but couldn’t find anything.

Kind regards,
Günther

Try these docs for headless setup:

Thanks for the answer. Although this does not get me further. Putty works fine and I’m getting familiar with openhabian-config. raspi-config would be probable the way to go but unfortunately is not part of openhabian. In openhabian I can’t find any setting options for the fan.

Kind regards,
Günther

Oh, sorry, I was reading a bit too fast.

A quick Google search reveals:
"The fan is connected to the 40-pin Raspberry Pi header and comes with 3 wires (5V, GND, and GPIO) since the blue wire is used to control the fan by software using PWM. You won’t need to mess with any settings, and updating Raspberry Pi OS to the latest version will take care of everything automatically. "

@mstormi can probably tell us how close openhabian folows raspian

Possibly. He dislikes being pinged however.

Heh, quite informative

This might be interesting: https://howchoo.com/g/ote2mjkzzta/control-raspberry-pi-fan-temperature-python

Hey folks,

I just joined the openHAB/Raspberry Pi 4 crew and so far it’s an interesting journey. I bought the Raspberry Pi4 Model with the official case and fan. During my test runs with the official Raspberry Pi OS I was able to let the system control the fan, when a certain temperature threshold has been reached.

I did some research and I came across this post which unfortunately does not provide a solution that works respectively I understand. :slight_smile: Any idea/guidance how I could control the fan via SSH/terminal? Currently the fan is spinning at full speed 24/7.

Cheers!

Perhaps this link could help you.

RPI fan control

I’ve never found a fan to be necessary for an RPi 3/4 running openHAB, and suspect that’s the case for most people. OH doesn’t strain the CPU. So before going too far, I’d suggest seeing if you have any issues without the fan.

There’s also the FLIRC case, which is passively cooled, so no fan needed at all.
I drilled/tapped the back of mine, and put a DIN-rail clip on it, so now it’s vertically oriented which affords good convective cooling.

You can further reduce the power (heat) a by disabling hardware you may not be using: WiFi, HDMI… etc.

Raspbian examples:

HDMI:
sudo tvservice --off  (saves 20mA)
#sudo tvservice -p  (start again with preferred settings)  
#vcgencmd display_power  (shows current status)
#vcgencmd display_power 1 (turns on the screen)
#vcgencmd display_power 0 (turns off the screen)
vcgencmd display_power 0
WIFI:
#sudo rfkill (shows status)
#sudo rfkill unblock all
sudo rfkill block all

1 Like

raspi-config ist now available under openhab, so you can control the case fan
under 4 Performance Options / P4 Fan (temperatue from 60°C - 120°C)

I think you mean openHABian. :wink:

(just trying to avoid confusion for future readers)

Yes, I mean openHABian.