       };
     case CLOSING:
       if (!is_moving) {
-        const char msg[] = "Door is closed.";
+        char msg[256];
+        snprintf(msg, sizeof(msg), "[%s] Door is closed.", pname);
         Serial.println(msg);
         client.publish(log_topic, msg);
         doorstate = CLOSED;

    return;
  };

  snprintf(buff, sizeof(buff), "Cannot parse reply <%s>[len=%d, payload len=%d] or denied access.",
           buff, l, length);

  client.publish(log_topic, buff);
  Serial.println(buff);

  Serial.println("SPI init");
  spirfid.begin(MFRC522_SCK, MFRC522_MISO, MFRC522_MOSI, MFRC522_SS);

  Serial.printf("MFRC522 init SPI = %p spi = %p setting = %d / %d / %d\n", &SPI, &spirfid, spiSettings._clock, spiSettings._bitOrder, spiSettings._dataMode);
  mfrc522.PCD_Init();   // Init MFRC522

  Serial.println("MFRC522 dump version");
