Skip to content

UC-004: Room Cleaner Access

Actor: Room Cleaner (service provider) Priority: Should Status: Implemented (protocol + firmware allow-list evaluation)

Summary

A room cleaner enters the space on a fixed weekly schedule to clean, with anomaly reporting for out-of-schedule access attempts.

Preconditions

  • Admin has registered the cleaner with a weekly scheduled access rule
  • Schedule: Wednesday and Friday, 08:00–11:00
  • NOTIFY_ON_ANOMALY flag is set to detect unusual access patterns

Main Flow

  1. Cleaner arrives Wednesday at 08:30
  2. Scans NFC card at the terminal
  3. ESP32 finds entry: SCHEDULED, time slot matches (Wed, 08:00–11:00)
  4. Access granted, door unlocks

Alternative Flows

A1: Cleaner runs late

  1. Cleaner finishes at 11:20, leaves and space shutdown happens at 11:25
  2. At 11:35, cleaner realizes a mop was left inside
  3. Grace period (15 min) counts from shutdown (11:25), so grace runs until 11:40 — access granted with GRANTED_GRACE
  4. Grace period resets from this re-entry (11:35), new window until 11:50
  5. If the cleaner had come back at 11:45 instead (20 min after shutdown, past original grace but within reset), still granted
  6. Anomaly notification is queued (NOTIFY_ON_ANOMALY)

A2: Cleaner tries outside schedule

  1. Cleaner scans card on Monday
  2. Day mask does not include Monday
  3. Access denied
  4. Anomaly notification is queued (NOTIFY_ON_ANOMALY + NOTIFY_ON_DENY)
  5. Admin is alerted to the unusual access attempt

Error Flows

E1: Contract ended

  1. Admin sets valid_until to the contract end date
  2. Cleaner scans card after the date — access denied
  3. Card can be reclaimed

Postconditions

  • Door unlocks during the scheduled cleaning window
  • Any out-of-schedule usage generates an anomaly notification to the admin

Access Rule

  • Access type: SCHEDULED
  • Time slots: Slot 1: Wed 08:00–11:00, Slot 2: Fri 08:00–11:00
  • Notifications: NOTIFY_ON_ANOMALY | NOTIFY_ON_DENY
  • Grace period: 15 minutes
  • valid_until: Contract end date

Notes

  • The combination of NOTIFY_ON_ANOMALY and NOTIFY_ON_DENY gives admins visibility into both successful out-of-hours access (grace period) and denied attempts.
  • The cleaner can always lock the door when leaving, even after the window closes. Note: the cleaner typically does not perform space shutdown — they lock the door on their way out, but a keyholder is responsible for the overall space state.