 
 volatile bool bac_timer_mode = false;
 volatile bool bhaveData = false;
-unsigned long timerMillis;
+unsigned long timerMillis = 0;
+bool btimerFirst = true;
 
 String clientName;
 String payload;

        {
          digitalClockDisplay();
          displayTimermode();

          if (!Rtc.IsDateTimeValid())
          {
            lcd.setCursor(18, 0);

  if ( receivedpayload == "{\"CHECKING\":\"1\"}")
  {
    String check_payload = "ac status: ";
    if (bac_timer_mode)
    {
      if (data_curr.ac_mode == 0)
      {
        check_payload += "timer:off";
      }
      else
      {
        check_payload += "timer:on";
      }
    }
    else
    {
      if (data_curr.ac_mode == 0)
      {
        check_payload += "off";
      }
      else
      {
        check_payload += "on";
      }      
    }
    check_payload += "\r\n";
    check_payload += "ac temp set : ";
