 
   if ( relaystatus != oldrelaystatus ) {
     changelight();
+    /*
     sendlightstatus();
+    */
+
+    String lightpayload = "{\"LIGHT\":";
+    lightpayload += relaystatus;
+    lightpayload += "}";
+
+    sendmqttMsg(rslttopic, lightpayload);
+
   }
 
   runTimerDoLightOff();

          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");

  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);
