           g_need_report = true;
           g_lock_status = LOCK_UNLOCKED;
           buzzer(200);
+          g_unlocked_ms = millis();
           Serial.println("unlocked");
         }
       }

      }
      break;
    case LOCK_UNLOCKED:
      if (lock_status_on()) {
        g_lock_status = LOCK_LOCKING;
        g_lock_unlock_step = 0;

static STATUS g_status = STATUS_INVALID;
static LOCK g_lock_status = LOCK_LOCKED;
static int g_lock_unlock_step = 0;
static unsigned long g_unlocked_ms = 0;

static const char *g_gprs_apn = "3gnet";
static const char *g_gprs_username = "";
