 unsigned int teim = timeElapsed / (long) 60000;
 qmoteCmd = "ATBN=0x0A,\"";      // using click combination code 0x0A
 qmoteCmd += isOn;
+qmoteCmd += ",";
 qmoteCmd += teim;
-qmoteCmd += currentRhInt;
-qmoteCmd += ",";
-qmoteCmd += currentTemp;
-qmoteCmd += ",";
-qmoteCmd += currentHeatIndex;
 qmoteCmd += "\"\r\n";
 portOne.write(qmoteCmd.c_str());
 delay(3000);


//  ambient environmental parameters
#define TEMP_SETTING          24          // cooling setting to this temperature
#define TEMP_HIGH             27.8        // restart cooling if temperature reaches this measurement
#define TEMP_LOW              25          // stop cooling or switch to humidifier if temerature reaches this measurement
#define TEMP_TOO_LOW          23          // if temperature reaches this value means humidifier goes too much, turn off everything
#define HEAT_INDEX_TOO_HIGH   29.5        // use Heat Index to check if the ambient condition needs to be changed, if so, KEEP_OFF_TIMER will be ignored
#define RH_HIGH               68          // restart humidifier if Rh reaches to this measurement
#define RH_LOW                60          // stop humidifier if Rh reaches to this measurement

// once the air conditioning is OFF due to the ambient condition reaches the criteria, 
// do not turn it ON for certain amount of time
#define KEEP_ONOFF_TIMER      90

// when Qmote is disconnected, a timer counts the time before it is reconnected back

            daikin_all_off();
          }
          else if((((float) currentTemp) > ((float) TEMP_LOW) && currentRh < RH_LOW) ||   // humidity reaches low but temperature is higher than low
                  ((float) curHeatIndex >= (float) HEAT_INDEX_HIGH))                      // heat index reaches high no matter how much humidity is
          {
            resend = 0;
            resend_attempts = 1;
