Using RPi as additional GPIO


Dear Octoprint Community,
I am using an XYZ Davinci 2.0A with Repetier. My printer has no part cooling fan, but i would like to add one. I thought if it would be possible to use the RPi for this so I can keep my settings on my printer. I heard of the enclosure plugin but you need the special gcode to set the GPIO. Is there an plugin for this?

If not should I just ran the fan on PWM with an fixed value?

Thank you for your help.