An industrial DIN rail mounting controller that is used in conjunction with and external roof mounting rain sensor. The controller closes the roof ventilation in large buildings when the sensor detects rain, an internal timer user adjustable is provide to delay the opening after the rain has stopped. The rain sensor incorporates a heater to prevent condensation in foggy weather.