Automated Heating Control - Controller Code