This is a lightweight plugin dedicated for controlling a fan via Raspberry Pi GPIO pin. This plugin has the following features:
Install via the bundled Plugin Manager or manually using this URL:
https://github.com/z4gunn/OctoPrint-GpioFanController/archive/master.zip
This plugin is only intended to drive an external brushless DC FAN via MOSFET driver circuit. A MOSFET must be used to drive the FAN since the PI is not capable of providing adequate current to the FAN.
It is a also a good idea to use a separate power supply to drive the FAN since the PI power supply might not have adequate current to drive the PI + FAN. The following diagram is an example of how to interface to a 12V DC FAN.