Look for the thermal overload flag in the gwq status message in the hashfast driver and send it a shutdown followed by an attempted reset.