 
 void loop()
 {
+#ifdef AARTLED_GPIO
+  // Slow on/off 1 second pattern if we are alive. Very fast flash if we've lost a 
+  // network connectionm and a quickish flash while we think the door is open.
+  //
   {
     static unsigned long aart = 0;
     unsigned long del = 1000;

      client.disconnect();
  }

  {
    static doorstate_t lastdoorstate = CLOSED;
    switch (doorstate) {
      case CHECKINGCARD:
        if (millis() - last_doorstatechange > 1500 && caching && checkCache(uid)) {
          char msg[255];
          snprintf(msg, sizeof(msg), "[%s] Allowing door to open based on cached information.", pname);
          Serial.println(msg);
          client.publish(log_topic, msg);
          openDoor();
        }
        break;
      case OPEN:
      case CLOSED:
      default:
        break;
    };

    if (lastdoorstate != doorstate) {
      lastdoorstate = doorstate;
      last_doorstatechange = millis();
    }
  }
  // catch any logic errors or strange cases where the door is open while we think
  // we are not doing anything.
  //
  if ((millis() - last_doorstatechange > 10 * DOOR_OPEN_DELAY) && ((doorstate != CLOSED) || (!isClosed()))) {
    closeDoor();
    char msg[256];
    snprintf(msg, sizeof(msg), "[%s] Door in an odd state-forcing close.", pname);
    Serial.println(msg);
    client.publish(log_topic, msg);
    cnt_fails ++;
  }

  {
    static unsigned long tock = 0;
    if (millis() - tock > REPORTING_PERIOD) {
      cnt_minutes += ((millis() - tock) + 500) / 1000 / 60;
      reportStats();
      tock = millis();
    }

{
  switch (event) {
    case SYSTEM_EVENT_ETH_START:
      Serial.println("ETH Started" + ETH.macAddress());
      ETH.setHostname(pname);
      break;
    case SYSTEM_EVENT_ETH_CONNECTED:
      Serial.println("ETH Connected " + ETH.macAddress());
      break;
    case SYSTEM_EVENT_ETH_GOT_IP:
    case SYSTEM_EVENT_STA_GOT_IP:
