Fan controlled by raspberries temp

What is the problem?
There is a fan for cooling my octoprint system which has touch screen relay for controlling printer psu etc. but I am anoyed by its noise
I connected it to printers relay this way it is working when printer gets on since there is psu which is powered with 220v also 220v inlet and outlet while printer is working temp goes up but today I noticed passive cooling isnt enough box was hot
so I want to control one of my relays according to raspberries temp
like if temp >40 activate the relay
if temp < 35 deactivate the relay
I know its possible but I dont know how to code it

What did you already try to solve it?
I found few articles on the web but I didnt manage to make them work

If it were me, I think I'd visit the Enclosure plugin, read the README and see if it does this.

There is a temperature trigger mode but you need a temperature sensor for it

If you're a coder then you could in theory write something to do this.

I personally like NodeJS and have written raspi-temp, a module for JavaScript.

I'm sure there are clever ways of querying this from Python directly or doing something similar to the pi_support plugin or the NavBar Temp plugin.

Personally I would just buy a silent fan in this case :smiley:


Well this is kind of a solution too
And this will going to be my second plan :smiley:

I have Noctua Fans on my RPis. There is almost no noise.

1 Like