Evaporative Cooler Control

Hi, I’m setting up a TEC-based glycol chiller with a water block heat sink. I’ll be using a 5-gallon bucket for the heat sink reservoir and want to use an evaporative cooling tower to cool off the heat sink water. In order to gain a bit more efficiency, though, I’d like to base the blower power off of the difference between the wet bulb globe temperature and water temperature (since the WBGT is what is theoretically achievable through evaporative cooling).

I can use a BME/BMP280 sensor (temp/humidity/pressure) in the air and a DS18B20 in the water reservoir to get the required information, but I don’t know how to add the calculations and responses to the BrewPi code.

Where should I begin?