 
 //milliseconds to leave the fan on when the target temp has been reached
 //this evacuates the heat or the cold air from vents
-#define END_OF_CYCLE_TIMEOUT 1000
+// MY HVAC DOES THIS AUTOMATICALLY - so I have no need for this cycle
+#define END_OF_CYCLE_TIMEOUT 0
 elapsedMillis endOfCycleTimer;
 
 //minimum number of milliseconds to leave the heating element on
 // to protect on-off on the fan and the heating element
-#define MINIMUM_ON_TIMEOUT 5000
+#define MINIMUM_ON_TIMEOUT 180000
 elapsedMillis minimumOnTimer;
+
+//minimum number of milliseconds to leave the system in idle state
+// to protect the fan and the heating/cooling elements
+#define MINIMUM_IDLE_TIMEOUT 180000
+elapsedMillis minimumIdleTimer;
 
 /*******************************************************************************
  IO mapping

  //publish readings
  Particle.publish(APP_NAME, "Home temperature: " + currentTempString, 60, PRIVATE);
  Particle.publish(APP_NAME, "Home humidity: " + currentHumidityString, 60, PRIVATE);

  return 0;
}

  //set it on only if it was off and fanStatus changed to true
  if ( fanStatus == true and fanOutput == LOW ) {
    myDigitalWrite(fan, HIGH);
  }

  //is minimum time up?
  if (minimumIdleTimer < MINIMUM_IDLE_TIMEOUT) {
    //not yet, so get out of here
    return;
  }

  if ( currentTemp <= (targetTemp - margin) ) {
