Skip to content

Commit 2246395

Browse files
committed
dashboards
1 parent 99e2884 commit 2246395

1 file changed

Lines changed: 15 additions & 19 deletions

File tree

docs/smart-home/packages/unifi_access.md

Lines changed: 15 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -16,39 +16,38 @@ version: 1.1.0
1616

1717
## Executive Summary
1818
<!-- START_SUMMARY -->
19-
This package provides a comprehensive, unified access control system for the UniFi G4 Doorbell Pro, integrating both Fingerprint and NFC authentication. It abstracts physical credentials (fingerprints/tags) into a single "Unified User" identity, allowing centralized management. Key features include granular access control (enabling/disabling specific credentials per user), a unified weekly schedule for guest access, real-time logging to the cloud entity for security auditing, and automated "auto-learn" functionality for on-boarding new credentials.
19+
The **Unifi Access** package provides a centralized, unified access control system for the UniFi G4 Doorbell Pro. It abstracts the physical credentials (fingerprint and NFC) into a single "Unified User" identity. This allows you to assign a person once, and then enable or disable their specific access methods (Fingerprint or NFC) individually. It includes a unified weekly schedule for Guest access, auto-learning for new credentials, and comprehensive logging to the cloud entity.
2020
<!-- END_SUMMARY -->
2121

2222
## Process Description (Non-Technical)
2323
<!-- START_DETAILED -->
24-
1. **Credential Scan**: When a user scans a fingerprint or NFC tag, the system captures the unique ID (`ulp_id`).
25-
2. **Identity Resolution**: The system looks up the "Unified User" assigned to that ID.
26-
* **New ID**: If unknown, it's automatically added to the system as "Unknown" for easy assignment later.
24+
1. **Credential Scan**: When a fingerprint or NFC tag is scanned at the doorbell, the system captures the unique ID (`ulp_id`).
25+
2. **Identity Resolution**: The system resolves this ID to a "Unified User".
26+
* **New ID**: If the ID is unknown, it is automatically added as "Unknown" for easy assignment.
2727
* **Known User**: The system checks the specific access switch for that method (e.g., "FP Access: Dad" or "NFC Access: Mom").
28-
3. **Authorization**:
29-
* **Standard Users**: Access is granted if their specific switch is ON.
30-
* **Guests**: Access is granted ONLY if their switch is ON **AND** the current time/day matches the allowed Guest Schedule.
28+
3. **Authorization Check**:
29+
* **Standard Users**: Access is granted if their specific access switch is ON.
30+
* **Guests**: Access is granted ONLY if their switch is ON **and** the current time matches the Guest Schedule.
3131
4. **Action**: If authorized, the door unlocks, a snapshot is taken, and the event is logged. If denied, a notification is sent.
3232
<!-- END_DETAILED -->
3333

3434
## Integration Dependencies
3535
<!-- START_DEPENDENCIES -->
36-
* **UniFi Protect**: Required for G4 Doorbell Pro fingerprint (`event.front_door_fingerprint`) and NFC (`event.front_door_nfc`) events.
37-
* **MQTT**: Used for persistent state management of User/Access switches (`unifi_access/...` topics).
38-
* **Yale Access**: Provides the physical lock control (`lock.front_door_lock`) and cloud logging entity (`lock.front_door_lock_cloud`).
36+
* **UniFi Protect**: Required for hardware events (`event.front_door_fingerprint`, `event.front_door_nfc`).
37+
* **MQTT**: Uses the definition `unifi_access/...` for state persistence and discovery.
38+
* **Yale Access**: Controls the physical lock (`lock.front_door_lock`).
39+
* **Mobile App**: Targeted for notifications via the `notify.smart_master` script.
3940
<!-- END_DEPENDENCIES -->
4041

4142
## Dashboard Connections
4243
<!-- START_DASHBOARD -->
43-
This package powers the following dashboard views:
44-
45-
* **[Home Access](../dashboards/home-access/home-access-center.md)**: The primary interface for managing users, assignments, and schedules.
46-
* **[Front Door](../dashboards/main/front-door.md)**: Displays the access log and live camera feeds.
44+
* **[Home Access Center](../dashboards/home-access/home_access_center.md)**: The main management interface for assigning users and schedules.
45+
* **[Front Door](../dashboards/main/front_door.md)**: Live view and manual lock control.
4746
<!-- END_DASHBOARD -->
4847

4948
## Architecture Diagram
5049
<!-- START_MERMAID_DESC -->
51-
The diagram illustrates the unified access flow. When a physical credential (fingerprint or NFC) is presented at the G4 Doorbell, an event is triggered in Home Assistant. The `unifi_access` package processes this event by resolving the unique ID (`ulp_id`) to a "Unified User". It then evaluates permissions: checking the specific method's access switch (e.g., NFC Access) and, for "Guest" users, validating the request against the unified weekly schedule. If authorized, the system commands the physical lock to open and logs the entry to the Cloud logging entity for persistent tracking. Both successful entries and denied attempts utilize the `notify.smart_master` service to alert administrators.
50+
The diagram below illustrates the unified access flow. When a physical credential (Fingerprint or NFC) is scanned, it triggers a Hardware Event. The logic resolves this UUID to a shared "Unified User" identity via MQTT persistence. The system then checks the specific permission switch for that method (FP vs NFC). If the user is a "Guest", it additionally validates against the global Guest Schedule. Authorized attempts command the Z-Wave lock to open and log to the cloud entity; unauthorized attempts trigger security notifications.
5251
<!-- END_MERMAID_DESC -->
5352

5453
<!-- START_MERMAID -->
@@ -59,8 +58,7 @@ sequenceDiagram
5958
participant HA as Home Assistant
6059
participant Logic as Access Logic
6160
participant MQTT as MQTT Broker
62-
participant Lock as Physical Lock
63-
participant Log as Cloud Log
61+
participant Lock as Yale Lock
6462
participant Notify as Notification Svc
6563
6664
User->>G4: Scans Fingerprint / NFC
@@ -86,10 +84,8 @@ sequenceDiagram
8684
8785
alt Access Granted
8886
Logic->>Lock: Unlock Command
89-
Logic->>Log: Log Entry (User + Method)
9087
Logic->>Notify: Send "Unlocked" Snapshot
9188
else Access Denied
92-
Logic->>Log: Log Denial Reason
9389
Logic->>Notify: Send Critical Alert
9490
end
9591
end

0 commit comments

Comments
 (0)