 
 // Elapsed Time Control
 elapsedMillis timeElapsed;
+elapsedMillis resendTimer;
 
 /**
  *  Setup

        if(((float) currentTemp) < ((float) TEMP_LOW) && currentRh <= RH_LOW)
        {
          daikin_all_off();
          timeElapsed = 0;  // reset mode-switch timer
        }
        else if(((float) currentTemp) < ((float) TEMP_LOW) && currentRh > RH_LOW)
        {
          daikin_dehumidifier_on();
          timeElapsed = 0;  // reset mode-switch timer
        }
      }

// avoid frequent ON-OFF mode switch
#define KEEP_ONOFF_TIMER      45
#define RESEND_ATTEMPS        3
#define RESEND_CMD_TIMER      30

#define MODE_OFF              0
#define MODE_COOLING          1
