           Serial.println(getResetInfo);
         }
       }
-    } else {
-      client.publish(willTopic, "1", true);
-      client.publish(hellotopic, (char*) getResetInfo.c_str());
-      client.subscribe(subtopic);
-      if (DEBUG_PRINT) {
-        Serial.print("Sending payload: ");
-        Serial.println(getResetInfo);
-      }
-    }
-  }
-*/
+    }
+  */
   //
   if (DEBUG_PRINT) {
     Serial.println("Starting UDP");

  delay(30);
  */
  digitalWrite(RELAYPIN, relaystatus);
  //oldrelaystatus = relaystatus ;
  if (EVENT_PRINT) {
    Serial.print(" => ");
    Serial.println("changing relay status");

  getResetInfo = "hello from ESP8266 s02 ";
  getResetInfo += ESP.getResetInfo().substring(0, 30);

  /*
    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, (char*) getResetInfo.c_str());
          client.subscribe(subtopic);
          if (DEBUG_PRINT) {
            Serial.print("Sending payload: ");
            Serial.println(getResetInfo);
          }
        }
      } else {
        client.publish(willTopic, "1", true);
        client.publish(hellotopic, (char*) getResetInfo.c_str());
        client.subscribe(subtopic);
