 
 #define DEF_NOTIF_INTERVAL    20000
 #define MAX_NOTIF_ACTIVE_TIME 360000
+#define CATCH_QUERY_DURATION  2000
 
 #define MATCHED 0
 

int req_read(char* pMsg, int iLen) {
  dat_resetLiveNotif();
  sys_setState(BUSY);
  Serial.println(" RREAD:OK;");
  delay(250);
  Serial.println(" RDSTA:OK;"); 
  
  return STATUS_OK;
}

  return STATUS_OK;
}

int dat_respSensor() {
    char aBaseStr[32];
    char aValStr[10];
    
    memset(aBaseStr, 0, sizeof(aBaseStr));
    memset(aValStr, 0, sizeof(aValStr));

//    float dVal = 14.0 * (random(20, 80) / 100.0);

    int iAdcVal = analogRead(PH_SENSOR_PIN);
    float dVoltage = (iAdcVal * 5.0) / 1024;
    float dVal = dVoltage;
    //float dVal = dVoltage * 2.2570 + 2.6675;

    dtostrf(dVal, 5, 2, aValStr);
    
    strcpy(aBaseStr, " RDATA:pH=");
    strcat(aBaseStr, aValStr);
    strcat(aBaseStr, ";");
    
    Serial.println(aBaseStr);
}

int dat_liveNotif() {
  /* If the current time since our last notif is greater than
    DEF_NOTIF_INTERVAL, then send out a reading */
  if ( (_lLastNotif + DEF_NOTIF_INTERVAL) < millis() ) {
    dat_respSensor();
    _lLastNotif = millis();
  }

