 
   if (lastdoorstate != doorstate) {
     char msg[255];
-    snprintf(msg, sizeof(msg), "Change from state %s(%d) to (%s)%d\n",
+    snprintf(msg, sizeof(msg), "Change from state %s(%d) to %s(%d)",
              doorstates_names[lastdoorstate], lastdoorstate, doorstates_names[doorstate], doorstate);
     Serial.println(msg);
 #ifndef LOCALMQTT

#include <ArduinoOTA.h>
#include <ESP32Ticker.h>
#include <PubSubClient.h>
#include <MFRC522.h>    // Requires modifed MFRC522 (see pull rq) or the -master branch as of late DEC 2017.
// https://github.com/miguelbalboa/rfid.git




  {
    static unsigned long tock = 0;
    if (millis() - tock > REPORTING_PERIOD) {
      static unsigned long last_min = 0;
      unsigned long delta = millis() - last_min;
      unsigned int mins = delta / 60 / 1000;
      if (mins > 0) {
        cnt_minutes += mins;
        last_min += mins * 60 * 1000;
      }
      reportStats();
      tock = millis();
    }
