Pi PoE HAT fan control

I’ve installed Hass.io on my Pi 3B+ with the official PoE HAT but the fan ramps up to 100% for 10-20s every minute or so.

Raspbian seems to allow the fan to be controlled through a couple entries in the config.txt but this isn’t available in Hass.io.

Is it possible to control the fan in Hass?

Yes it is.

1 Like

Where can I find it?

In the boot partition.

@nickrout, mind sharing the exact location? I can’t find it.

I had the same issue and it was driving me crazy… After searching online and in here, I was able to resolve it. To edit config.txt, I shut down my pi and pulled the SD card and opened it up on my PC. From there I was able to open config.txt and at the bottom of the file I simply added

## poe_fan_temp
##    temp0 is lower speed fan, temp1 is high fan speed.
##    Current setting is fan turns on at 70C, turns off when it comes back down to 65C.
##    If the temperature reaches 75C it will go full blast until it drops back down to 70C. 
dtparam=poe_fan_temp0=70000,poe_fan_temp0_hyst=5000
dtparam=poe_fan_temp1=75000,poe_fan_temp1_hyst=5000

The fan hasn’t kicked on since I powered the unit back up about an hour ago… but I’ll probably play around with these settings slightly after monitoring the temp for a while.

1 Like

Thanks for the help!

I managed to edit the config.txt - it turned out that my linux machine wasn’t mounting the fat32 boot partition so I had to fire up a windows machine.

After running for close to 48 hours and not having the fan kick on… I decided to drop my setpoints down a bit. My high temp was 67.4C and overnight it hovered around 56C so I went with

## poe_fan_temp
##    temp0 is lower speed fan, temp1 is high fan speed.
##    Current setting is fan turns on at 63C, turns off when it comes back down to 60C.
##    If the temperature reaches 66C it will go full blast until it drops back down to 63C. 
dtparam=poe_fan_temp0=63000,poe_fan_temp0_hyst=3000
dtparam=poe_fan_temp1=66000,poe_fan_temp1_hyst=3000

Since updating to HassOS 3.13, I’ve noticed that the fan on the POE HAT seems to be ignoring the dtparam’s as shown above.

Anyone else noticing this?

EDIT: I’ve just looked through the release notes and can only assume that something changed in the latest RPi kernel.

@thatguy_za I’ve noticed the same thing - have you found a fix?

After a fair amount of trial and error, the only thing that worked was having three poe_fan_temp’s. Unfortunately I can’t remember my exact temps but these should help:

dtparam=poe_fan_temp0=63000,poe_fan_temp0_hyst=3000
dtparam=poe_fan_temp1=66000,poe_fan_temp1_hyst=3000
dtparam=poe_fan_temp2=75000,poe_fan_temp2_hyst=3000

Actually 4 lines of code are needed and basically what you input is the curve of how the fan reacts to temperature in a proportional way. More info can be found here:
RaspBerry Pi GitHub
And here:
HASS OS GitHub
Please check that the following line of code is present in config.txt.

dtoverlay=rpi-poe

and append these lines at the end of config.txt

dtparam=poe_fan_temp0=10000,poe_fan_temp0_hyst=1000
dtparam=poe_fan_temp1=55000,poe_fan_temp1_hyst=5000
dtparam=poe_fan_temp2=60000,poe_fan_temp2_hyst=5000
dtparam=poe_fan_temp3=65000,poe_fan_temp3_hyst=5000

My fan is now constantly on but at low speed and will speed up when needed (CPU load up -> temp up -> fan RPM up). A constantly switching fan is not preferred over one that is constantly on (at low speed).

4 Likes

This doesn’t work for me. i am using the latest HA version and a branc new PoE hat but the fan never spins, only briefly at boot time. Any idea how to solve this?

Hello and welcome to the forums.
Can you be more specific about what you have tried so I can help you in a better way.

Hello,

I have the latest 64 bit version of HA and have tried to edit the config.txt file with all the different values mentioned above. No luck.

I edited my earlier post (Link) and suggest to check if dtoverlay=rpi-poe Is present in config.txt

The piece of code below can be found in the latest rPi documentation. I hope this points you in the right direction.


Name:   rpi-poe
Info:   Raspberry Pi PoE HAT fan
Load:   dtoverlay=rpi-poe,<param>[=<val>]
Params: poe_fan_temp0           Temperature (in millicelcius) at which the fan
                                turns on (default 40000)
        poe_fan_temp0_hyst      Temperature delta (in millicelcius) at which
                                the fan turns off (default 2000)
        poe_fan_temp1           Temperature (in millicelcius) at which the fan
                                speeds up (default 45000)
        poe_fan_temp1_hyst      Temperature delta (in millicelcius) at which
                                the fan slows down (default 2000)
        poe_fan_temp2           Temperature (in millicelcius) at which the fan
                                speeds up (default 50000)
        poe_fan_temp2_hyst      Temperature delta (in millicelcius) at which
                                the fan slows down (default 2000)
        poe_fan_temp3           Temperature (in millicelcius) at which the fan
                                speeds up (default 55000)
        poe_fan_temp3_hyst      Temperature delta (in millicelcius) at which
                                the fan slows down (default 5000)

This post has fixed my PoE fan issue, thank you to everyone. In the end I learned that you need the dtoverlay, and 4 poe_fan_temp entries!

This is what I had before but it doesn’t work. Cannot believe so simple functionality needs that much tweaking and it is not added by default in HA raspberry edition.

dtoverlay=rpi-poe
dtparam=poe_fan_temp0=10000,poe_fan_temp0_hyst=1000
dtparam=poe_fan_temp1=55000,poe_fan_temp1_hyst=5000
dtparam=poe_fan_temp2=60000,poe_fan_temp2_hyst=5000
dtparam=poe_fan_temp3=65000,poe_fan_temp3_hyst=5000

Could you please check below configuration, it worked for me!

PoE Hat Fan Speeds

dtoverlay=rpi-poe
dtparam=poe_fan_temp0=65000,poe_fan_temp0_hyst=5000
dtparam=poe_fan_temp1=67000,poe_fan_temp1_hyst=2000

I could get mine to work with any of the above suggestions.
Then I found this article instead.
https://www.raspberrypi.org/forums/viewtopic.php?t=316908

So using “dtoverlay=rpi-poe-plus” instead of “dtoverlay=rpi-poe” worked for me.

So I simply powered off my HASSIO, move my SSD to the computer, and at the end of the config.exe (Using Notepad++) added the 6 lines. The # is just a commenting line, but I kept it there.

# PoE+ FAN TEMPERATURE CONTROL
dtoverlay=rpi-poe-plus
dtparam=poe_fan_temp0=45000,dtparam=poe_fan_temp0_hyst=3000
dtparam=poe_fan_temp1=50000,dtparam=poe_fan_temp1_hyst=3000
dtparam=poe_fan_temp2=62000,dtparam=poe_fan_temp2_hyst=4000
dtparam=poe_fan_temp3=70000,dtparam=poe_fan_temp3_hyst=5000

3 Likes