Roblox Integration

Remote unlock

An operator can issue a remote-unlock command from the dashboard without anyone touching a reader in-game. Delivery is polling-based:

Dashboard operator clicks "Unlock now" (scope: UNIVERSE / SERVER / PLAYER)
        |
        v
Vestrane creates a PENDING command, expiring in ~45s
        |
        v
RemoteCommandPoller.server.lua polls GET /api/game/commands/poll
every ~5s (Authorization: Bearer <location secret>)
        |
        v
Command is delivered (UNIVERSE/PLAYER: to every polling server;
SERVER: exclusively to whichever server polls first), moves to PUBLISHED
        |
        v
Poller executes it via the registered door callback, then POSTs
/api/game/commands/{id}/ack with the real outcome
        |
        v
Command moves to ACKNOWLEDGED or FAILED; the dashboard's live status
updates without a page refresh

Scopes

  • UNIVERSE - broadcast to every live server currently polling for this location.
  • SERVER- claimed by exactly one poller, whichever server polls first (there's no way to target a specific live server ahead of time).
  • PLAYER - broadcast at the API level, but the poller only acts on it if the target player is actually present in that server; every other server silently ignores it.

Unlock duration

Every command in the poll response includes unlockDurationSeconds, which the poller passes straight through to your door callback without deciding anything about it. Server-side, this is either the access point's own configured default, or a one-off override chosen when the unlock was requested - the Lua SDK doesn't need to know or care which, so no SDK update is required to use this.

Current limitations

  • A command not picked up within its expiry window (default ~45s) is lazily marked EXPIRED the next time anyone reads it - there's no background job.
  • Delivery latency is bounded by the poll interval (default 5s).
  • The poller backs off exponentially (capped at 60s) after consecutive poll failures, so an outage doesn't turn into an aggressive request loop.
  • If a SERVER-scoped command is claimed by a server whose acknowledgement never arrives (e.g. it crashed mid-unlock), it simply expires.