 #define SOLENOID_ENGAGED  (HIGH)
 
 #define AARTLED_GPIO      (16)
+
+// #define WIRECHECK_GPIO	  (0)
+// #define WIRECHECK_REDLED  (HIGH)
 
 #define DOOR_OPEN_DELAY         (5*1000)   //  10 seconds -- how long to hold the relay engaged; in milli seconds.
 #define CACHE_FALLBACK_TIMEOUT  (500)       // 0.5 second  -- how long to wait for a reply before checking the cache.

  mfrc522.PCD_WriteRegister(mfrc522.ComIrqReg, 0x7F);
}



static long lastReconnectAttempt = 0;

boolean reconnect() {

      mfrc522.PCD_Reset();
      if (!mfrc522.PCD_PerformSelfTest()) {
        cnt_failed_rfid++;

        char msg[256];
        snprintf(msg, sizeof(msg), "[%s] RFID selftest failed (%d times since boot%s).", 
		pname, cnt_failed_rfid, 
		(cnt_failed_rfid == 3) ? " and will reboot on next fail." : "");
        Serial.println(msg);
        client.publish(log_topic, msg);

        if (cnt_failed_rfid > 3)
          ESP.restart();
      };
      mfrc522.PCD_Reset();
