   delay(100);
   if (client.connect((char*) clientName.c_str(), willTopic, 0, true, willMessage)) {
     Serial.println("-----> mqtt connected");
-    //client.publish(hellotopic, "hello again 1 from ESP8266 s20");
     client.publish(willTopic, "1", true);
+    if ( ResetInfo == LOW) {
+      client.publish(hellotopic, (char*) getResetInfo.c_str());
+      ResetInfo = HIGH;
+    } else {
+      client.publish(hellotopic, "hello again 1 from ESP8266 s20");
+    }
   } else {
     Serial.print("-----------------> failed, rc=");
     Serial.println(client.state());

  Serial.print("---------------------------------> IP address: ");
  Serial.println(WiFi.localIP());

  /*
    //
    //Serial.println("Starting UDP");
    udp.begin(localPort);
    //Serial.print("Local port: ");
    //Serial.println(udp.localPort());
    delay(5000);
    setSyncProvider(getNtpTime);

    if (timeStatus() == timeNotSet) {
      Serial.println("waiting for sync message");
    }
  */

  /*
    //startMills = millis();

    if (WiFi.status() == WL_CONNECTED) {
      if (!client.connected()) {
        if (client.connect((char*) clientName.c_str(), willTopic, 0, true, willMessage)) {
          client.publish(willTopic, "1", true);
          //client.publish(hellotopic, "hello again wifi and mqtt from ESP8266 s20");
          Serial.println("reconnecting wifi and mqtt");
        } else {
          Serial.println("mqtt publish fail after wifi reconnect");
        }
      } else {
        client.publish(hellotopic, "hello again wifi from ESP8266 s20");
      }
    }
  */
}

boolean reconnect() {

#define _IS_MY_HOME
// wifi
#ifdef _IS_MY_HOME
#include "/usr/local/src/ap_setting.h"
#else
#include "ap_setting.h"
#endif
