My Rpi 4 is contained in a closed box with printers mb and psu so box get hot enough to thermal throttle pi
What did you already try to solve it?
I have added a 12v 4020 fan in to the box
Fan is normally loud when it contained in a no airflow box it gets louder
WRITE HERE
So what I would like to do is connect fan to one of pwm ports on mb and control it according to rpis heat
Like if temp is higer than 70°C full power
if temp is around 50 %50 power
if temp is around 35 turn off the fan
As far as I know I can do this with rpi gpio and a mosfet but it would be bwtter if some kind of plugin do this
Looking really great
But no one selling this in Turkey and buying it internationally is too expensive for me I rather build the circuit myself
But anyway if I can use gcode
it is going to be better and cheaper
If any of the plugins can do this, it might be the enclosure plugin. Not sure if it will read the RPi temp or not, but it can control fans & stuff.
If it does not, it should not be too difficult to create a plugin for your setup if you would like. If you know how to create a Python script, you could probably make it into a plugin.
I am confused. You have a RPi 4B that needs cooling and you want to control that cooling based on the temperature of the RPi. Why do you need an OctoPrint plugin or gcode?
here is why
the case contain all of the electronics is already a cable mess
And I dont want to add aditional transistor and a mosfet
my mb is capable of driving a pwm fan so it is as easy as hey temp is going up so m106 s255
of course if I cant find this kind of solution than I will use a mosfet like everybody
but this is going to make cooling easier for many others too