# One code, every lock on the unit

> A unit is rarely one door. Here is why a single time-boxed code has to reach the gate and the mailbox too, and what happens when a lock is offline.

- Canonical: https://myremotely.ai/blog/one-code-every-lock-on-the-unit/
- Author: The MyRemotely.ai team — Product and operations
- Published: 2026-06-23
- Updated: 2026-08-11
- Tags: access-control, operations

---

A visitor gets one code, and that code is written to every lock the unit has —
front door, gate, mailbox. It starts when the tour window opens and stops when
the window closes. Handing out three codes for three locks is how a self-guided
tour turns into a phone call.

## Why is a unit more than one door?

Because almost none of them are. A garden building has a gate before it has a
front door. A mailbox has its own lock, and a walkthrough that cannot open it is
a walkthrough that ends with a question. Add a package room or a side entrance
and a single "the code is 4826" text stops being enough.

The failure is not dramatic. The visitor stands at the gate at 8pm with a code
for the apartment door, and calls the number on the listing. Somebody answers,
or nobody does.

## What does one code actually mean?

It means the code is a property of the tour, not of a lock. When the tour is
booked and the visitor's identity checks out, the same value is written to every
lock attached to that unit — currently TTLock and Sifely hardware, plus
lockboxes. The visitor learns one number, uses it wherever they meet a lock, and
never has to know which brand is on which door.

It also means revocation is one action. A cancelled tour removes one code from
every lock at once, rather than leaving whichever one somebody forgot.

## What happens when a lock is offline?

Smart locks lose their connection. A basement gate with no signal is normal, not
exceptional, and an access system that assumes a live connection fails exactly
where the building is hardest to reach.

Offline locks get a daily fallback code instead. It is narrower than a live code
— a day rather than a tour window — but it is a code that was computed rather
than fetched, so it works with nothing listening. A unit with a dead spot is
still tourable.

## Why does the window close on its own?

Because an access code that has to be removed by hand is an access code that
stays. The end of the tour window is the end of the code, and nothing has to
remember to clean it up.

This is the part that separates a time-boxed code from a lockbox. A lockbox
combination is shared, permanent until somebody changes it, and unattributable:
the person who used it last is the person who used it forever. A code that
expires answers the question a lockbox cannot — who, exactly, and when.

## What does the log hold?

Every code that ever touched a lock, with its timestamp, scoped to the
organisation that owns the unit. Created, used, expired.

That record is the reason the whole mechanism is worth building rather than
working around. An owner asking who was in unit 4B on Tuesday gets an answer
from the system instead of an answer from somebody's memory.
