 
   if (client.publish(topictosend, p, msg_length, 1)) {
     /*
-      if (DEBUG_PRINT) {
       syslogPayload = topictosend;
       syslogPayload += " - ";
       syslogPayload += payload;
       syslogPayload += " : Publish ok";
       sendUdpSyslog(syslogPayload);
-      }
     */
     free(p);
   } else {
-    if (DEBUG_PRINT) {
-      syslogPayload = topictosend;
-      syslogPayload += " - ";
-      syslogPayload += payload;
-      syslogPayload += " : Publish fail";
-      sendUdpSyslog(syslogPayload);
-    }
+    syslogPayload = topictosend;
+    syslogPayload += " - ";
+    syslogPayload += payload;
+    syslogPayload += " : Publish fail";
+    sendUdpSyslog(syslogPayload);
     free(p);
   }
   client.loop();

    receivedpayload += (char)inpayload[i];
  }

  if (DEBUG_PRINT) {
    syslogPayload = intopic;
    syslogPayload += " ====> ";
    syslogPayload += receivedpayload;
    sendUdpSyslog(syslogPayload);
  }

  if ( receivedpayload == "{\"DOOR\":\"CHECKING\"}") {


    }

    if (!client.connected()) {
      syslogPayload = "failed, rc= ";
      syslogPayload += client.state();
      sendUdpSyslog(syslogPayload);


      unsigned long now = millis();
      if (now - lastReconnectAttempt > 200) {
        lastReconnectAttempt = now;
