UC-007: Emergency Access (Landlord / Fire Department)¶
Actor: Landlord, Fire Department, or other authorized emergency contact Priority: Must Status: Implemented (protocol + firmware allow-list evaluation)
Summary¶
An emergency keyholder (landlord, fire department) can enter the space at any time, with immediate notification sent to the hackerspace board.
Preconditions¶
- Emergency keyholder is registered with access type EMERGENCY
- Allow-list header has the HAS_EMERGENCY flag set
- Board members have push notifications enabled
Main Flow¶
- Landlord scans emergency NFC card at the terminal
- ESP32 finds entry: EMERGENCY
- Access granted immediately (no time or schedule restrictions)
- Door unlocks, green LED + distinct buzzer pattern (different from normal access)
- ESP32 immediately connects to the network (breaks normal sync schedule)
- Emergency access event sent to backend:
{"event": "emergency_access", "uid": "...", "timestamp": ...} - Backend pushes alert notification to all board members
- Network disconnects, BLE resumes (WiFi only)
Alternative Flows¶
A1: Network unavailable for notification¶
- At step 5, network connection fails
- Access was already granted at step 3 (offline-first: never block emergency access)
- Emergency event queued in notification queue
- Event sent during next successful sync
A2: Stale allow-list¶
- Allow-list has expired (valid_until passed)
- EMERGENCY entries are still honored even with stale data
- Access granted, notification queued
Error Flows¶
E1: Emergency card not in list¶
- Card UID is not found in the allow-list
- Access denied — even emergency access requires a registered card
- Red LED + denial buzzer
Postconditions¶
- Door unlocks immediately
- Board is notified as soon as possible (immediately if network available, next sync otherwise)
- Full audit trail of emergency access
Access Rule¶
- Access type: EMERGENCY
- Time slots: None (24/7)
- Notifications: NOTIFY_ON_USE (always, by definition)
- Grace period: N/A
Notes¶
- Emergency access is never blocked by time restrictions, expired allow-lists, or stale data. Safety takes priority over security policy.
- The distinct buzzer pattern (compared to normal access) alerts anyone inside that an emergency key was used.
- Board notification is best-effort but not a gate — the door opens regardless.
- Number of emergency keys should be kept to a minimum and reviewed regularly.