Raspberry Pi Thermostat & Relay control
This simple Python applicaiton uses Python3 to poll a temperature sensor and calculate the average temperature over a period of time. If the temperature rises above the threshold it will turn a relay on which powers a fan.