|
1 | 1 | # Tab5 Home Controller — Low-Fi Wireframes (AI Source of Truth) |
2 | 2 |
|
3 | | -Target device: **M5Stack Tab5** (landscape 1280×720). |
4 | | -UI framework: **LVGL**. |
| 3 | +Target device: **M5Stack Tab5** (landscape 1280×720). |
| 4 | +UI framework: **LVGL**. |
5 | 5 | Primary integration: **Home Assistant (MQTT + Assist)**, **Frigate**. |
6 | 6 |
|
7 | | -## Design Tokens (names AI should reuse) |
| 7 | +## Design tokens (names AI should reuse) |
| 8 | + |
8 | 9 | - Spacing: `space-4=4px`, `space-8=8px`, `space-16=16px`, `space-24=24px`, `space-32=32px` |
9 | 10 | - Radii: `radius-20=20px` (cards), `radius-12=12px` (chips) |
10 | 11 | - Elevation: `elev-1` (small), `elev-2` (medium) |
11 | | -- Colors: `surface-1=#0E1216`, `surface-2=#151B22`, `text=#E6EDF3`, `muted=#9AA6B2`, `accent=#22C55E`, `warn=#F59E0B`, `alert=#EF4444` |
| 12 | +- Colors: `surface-1=#0E1216`, `surface-2=#151B22`, `text=#E6EDF3`, `muted=#9AA6B2`, `accent=#22C55E`, |
| 13 | + `warn=#F59E0B`, `alert=#EF4444` |
12 | 14 | - Typography: `title-lg`, `title-md`, `body`, `caption` |
13 | 15 | - Motion: `dur-fast=90ms`, `dur-med=200ms`, `dur-slow=300ms`, `ease-out` |
14 | 16 | - Touch targets: **min 56×56 px** |
15 | 17 |
|
16 | | -> **Rule:** Prefer **RGB565** assets sized for on-screen use; avoid per-frame allocations; cap ambient animations to 30 FPS; interaction animations target 60 FPS. |
| 18 | +> **Rule:** Prefer **RGB565** assets sized for on-screen use; avoid per-frame allocations; cap ambient |
| 19 | +> animations to 30 FPS; interaction animations target 60 FPS. |
17 | 20 |
|
18 | 21 | --- |
19 | 22 |
|
20 | | -## Global Structure (Navigation) |
21 | | -- Tabs: **Home**, **Rooms**, **Security**, **Climate** (optional **Media**) |
22 | | -- Left-side **nav rail** (implemented) with icon+label buttons for ESP32P4 demo, Rooms, Frigate Security, Local Climate Station, and TV Controls |
23 | | -- Full-bleed background uses a warm gradient (`linear-gradient(90deg, #fcff9e 0%, #c67700 100%)`) on custom pages |
24 | | -- **Control Center** opens as modal sheet (swipe down from header or tap status icons) |
| 23 | +## Global structure (navigation) |
| 24 | + |
| 25 | +- Left-side **nav rail** holds icon+label buttons for **ESP32P4**, **Rooms**, **Frigate Security**, |
| 26 | + **Local Climate**, **Media**, and **Settings**. |
| 27 | +- Rail is hidden by default; a left-edge drag reveals it, and releasing past one-third of the travel |
| 28 | + keeps it open. Nav buttons close the rail after changing screens. |
| 29 | +- A translucent scrim covers content while the rail is open; tapping the scrim or swiping the rail |
| 30 | + left hides navigation and restores touch to the page. |
| 31 | +- Wallpapered backgrounds remain visible beneath the scrim so the reveal feels attached to the |
| 32 | + surface layer. |
25 | 33 |
|
26 | 34 | ```mermaid |
27 | 35 | flowchart TD |
28 | | - Root[Tab Rail] --> Home |
29 | | - Root --> Rooms |
30 | | - Root --> Security |
31 | | - Root --> Climate |
32 | | - Root --> Media |
33 | | -
|
34 | | - Home --> CC[Control Center Sheet] |
35 | | - Security --> CamLive[Live View] |
36 | | - Security --> Events[Event Timeline] |
37 | | - Rooms --> RoomList |
38 | | - Rooms --> RoomDetail |
| 36 | + Rail[Nav rail] --> ESP32P4 |
| 37 | + Rail --> Rooms |
| 38 | + Rail --> Frigate |
| 39 | + Rail --> Climate |
| 40 | + Rail --> Media |
| 41 | + Rail --> Settings |
39 | 42 | ``` |
40 | 43 |
|
41 | | -## Screen 1 — Home |
| 44 | +## Screen 1 — Rooms |
42 | 45 |
|
43 | | -### Layout |
| 46 | +### Layout — Rooms |
44 | 47 |
|
45 | | -``` |
46 | | -Screen 1 — Home |
47 | | --------------------------------------------------------- y=0 |
48 | | -| Time 10:24 | Weather 26°C | Battery 78% | Wi-Fi -53dB | Header (56px) |
49 | | --------------------------------------------------------- y=56 |
50 | | -| [Alarm: Armed] [Doors: 1 Open] [Cams: OK] [Presence: 2]| Status Chips row (56px) |
51 | | --------------------------------------------------------- y=112 |
52 | | -| [ Lights ] [ Climate ] [ Security Snapshot ] | 3 Cards @ equal width |
53 | | -| - toggle - setpoint - last event thumb | |
54 | | -| - dimmer - humidity - Live button | |
55 | | --------------------------------------------------------- y=424 |
56 | | -| Quick Actions: [Goodnight] [I'm Home] [Away Mode] | QA row (72px) |
57 | | --------------------------------------------------------- y=496 |
58 | | -| ( content spacer ) | |
59 | | --------------------------------------------------------- y=664 |
60 | | -| Home | Rooms | Security | Climate | Media | Right-edge tab rail in code; shown here as bottom bar |
61 | | --------------------------------------------------------- y=720 |
| 48 | +```text |
| 49 | +Screen 1 — Rooms |
| 50 | ++------------------------------------------------------+ |
| 51 | +| Rooms | |
| 52 | ++------------------------------------------------------+ |
| 53 | +| [Bakery] [Bedroom] [Living Room] | |
| 54 | +| toggle toggle toggle | |
| 55 | +| temp/humidity badges update per room | |
| 56 | ++------------------------------------------------------+ |
62 | 57 | ``` |
63 | 58 |
|
64 | | -### Interactions |
| 59 | +### Interactions — Rooms |
65 | 60 |
|
66 | | -- Tap card → expand to detail; animate scale 0.98 then expand (`dur-med`). |
67 | | -- Long-press Quick Action → confirm sheet (show list of changes). |
68 | | -- Status chip with anomaly uses `accent`/`warn`/`alert` tokens and navigates to source screen. |
| 61 | +- Tap the toggle on any card to fire the room power signal with haptic-style feedback. |
| 62 | +- Long-press anywhere on a card to request the detailed sheet for that room/entity pair. |
| 63 | +- On first entry, toolbar and cards animate into place (slide/fade, 40 ms stagger). |
69 | 64 |
|
70 | | -### Acceptance |
| 65 | +### Acceptance — Rooms |
71 | 66 |
|
72 | | -- From idle, key info readable in under 2 seconds. |
73 | | -- All primary controls reachable with no more than two taps. |
| 67 | +- Three featured rooms remain above the fold with no scrolling. |
| 68 | +- Climate badges stay legible even when MQTT updates arrive every second. |
74 | 69 |
|
75 | | -## Screen 2 — Rooms |
| 70 | +## Screen 2 — Frigate Security |
76 | 71 |
|
77 | | -### Layout |
| 72 | +### Layout — Frigate Security |
78 | 73 |
|
79 | | -``` |
80 | | -Screen 2 — Rooms |
81 | | -+------------------+------------------------------------+ |
82 | | -| Rooms | Living Room | |
83 | | -| [Living Room] ● | [Group Lights Dimmer 0—100%] | |
84 | | -| [Bedroom] | [Light 1][Light 2][Lamp][Strip] | |
85 | | -| [Kitchen] | [Fan: 0 1 2 3] [Osc ⟳] | |
86 | | -| [Office] | Sensors: T 24.1° H 48% Lux 120 | |
87 | | -| [Patio] | Scenes: [Movie][Bright][Night] | |
88 | | -+------------------+------------------------------------+ |
| 74 | +```text |
| 75 | +Screen 2 — Frigate Security |
| 76 | ++------------------------------------------------------+ |
| 77 | +| Frigate Security | |
| 78 | +| [◀ Prev] Camera 2 of 6 [Next ▶] [Quality ▾] [🔈 Mute] |
| 79 | ++------------------------------------------------------+ |
| 80 | +| Card: Backyard Camera | |
| 81 | +| • Live feed placeholder fills card body | |
| 82 | +| • Status line: "Streaming · 1080p60" | |
| 83 | ++------------------------------------------------------+ |
| 84 | +| Event cards row (wraps): | |
| 85 | +| [Front Door · Person] [Garage · Motion] ... | |
| 86 | ++------------------------------------------------------+ |
| 87 | +| Actions row: [Open Gate] [Talk] [Snapshot] [Timeline] |
| 88 | ++------------------------------------------------------+ |
89 | 89 | ``` |
90 | 90 |
|
91 | | -### Interactions |
| 91 | +### Interactions — Frigate Security |
92 | 92 |
|
93 | | -- Tap room → updates detail pane. |
94 | | -- Two-finger swipe left/right → next/previous room. |
95 | | -- Long-press a light → opens per-entity details. |
| 93 | +- Prev/Next camera buttons are styled primary controls, ready to bind camera cycling. |
| 94 | +- Event cards hide toggles and reserve space for timestamps; tapping can route to clip playback. |
| 95 | +- Action buttons ship as large pills so gloves can trigger automations. |
96 | 96 |
|
97 | | -### Acceptance |
| 97 | +### Acceptance — Frigate Security |
98 | 98 |
|
99 | | -- Room switch provides visible response within 150 ms. |
100 | | -- All per-room entities visible without scrolling for up to 8 devices; overflow uses wrap chips. |
| 99 | +- Live feed container supports 280 px tall video without layout shifts. |
| 100 | +- Four quick actions stay visible at 48 px minimum tap targets. |
101 | 101 |
|
102 | | -## Screen 3 — Security (Frigate) |
| 102 | +## Screen 3 — Local Climate |
103 | 103 |
|
104 | | -### Layout |
| 104 | +### Layout — Local Climate |
105 | 105 |
|
| 106 | +```text |
| 107 | +Screen 3 — Local Climate |
| 108 | ++------------------------------------------------------+ |
| 109 | +| Local Climate Station | |
| 110 | ++------------------------------------------------------+ |
| 111 | +| Card: Living Room Climate | |
| 112 | +| Indoor temperature / humidity / HVAC mode stack | |
| 113 | ++------------------------------------------------------+ |
| 114 | +| Card: Outdoor Sensors | |
| 115 | +| sensor.tab5_temperature / sensor.tab5_humidity | |
| 116 | ++------------------------------------------------------+ |
| 117 | +| Forecast label + three-day chip row | |
| 118 | ++------------------------------------------------------+ |
106 | 119 | ``` |
107 | | -Screen 3 — Security (Frigate) |
108 | | -Top Bar: [◀] Camera 2/4 [▶] [Quality: Auto] [Mute] |
109 | 120 |
|
110 | | -+----------------------------------------------+ |
111 | | -| Live Video | (auto preview; tap to go live) |
112 | | -| (PIP shows if navigating away) | |
113 | | -+----------------------------------------------+ |
| 121 | +### Interactions — Local Climate |
114 | 122 |
|
115 | | -Recent Events (horizontal scroll): |
116 | | -[Person@Door 2m] [Vehicle@Drive 8m] [Motion Back 12m] [...] |
| 123 | +- Cards are informational; toggles and spec rows are hidden to keep data dense. |
| 124 | +- Forecast chips flex to fill the row and respond to theme color shifts. |
117 | 125 |
|
118 | | -Action row: |
119 | | -[Open Gate] [Talk] [Snapshot] [Timeline ▾] |
120 | | -``` |
| 126 | +### Acceptance — Local Climate |
121 | 127 |
|
122 | | -### Interactions |
| 128 | +- Both indoor and outdoor cards stay readable without scrolling. |
| 129 | +- Forecast row maintains equal spacing on 1280 px landscape. |
123 | 130 |
|
124 | | -- Event chip → opens clip viewer (PiP if live running). |
125 | | -- Alert mode (priority Home Assistant event): whole screen frames in `warn`/`alert`, auto focus, haptic tick (audible click). |
| 131 | +## Screen 4 — Media |
126 | 132 |
|
127 | | -### Acceptance |
128 | | - |
129 | | -- Live start under 1.5 seconds on local network (fallback from HLS → MJPEG → snapshot). |
130 | | -- Loss of stream shows “Low bandwidth” badge and retry call-to-action. |
131 | | - |
132 | | -## Screen 4 — Control Center (Modal Sheet) |
133 | | - |
134 | | -### Layout |
| 133 | +### Layout — Media |
135 | 134 |
|
| 135 | +```text |
| 136 | +Screen 4 — Media |
| 137 | ++------------------------------------------------------+ |
| 138 | +| Card: Now Playing | |
| 139 | +| [240×240 album art] Track title / artist / source | |
| 140 | +| Transport row: [Prev][Play/Pause][Next] [Volume ▬▬] | |
| 141 | ++------------------------------------------------------+ |
| 142 | +| Card: Quick Scenes | |
| 143 | +| [Morning] [Movie] [Night] [Party] | |
| 144 | ++------------------------------------------------------+ |
136 | 145 | ``` |
137 | | -Screen 4 — Control Center (Modal Sheet) |
138 | | -------------------------------------------- |
139 | | -| Control Center | |
140 | | -| Brightness [====------] 60% | |
141 | | -| Volume [===-------] 30% [Mute] | |
142 | | -| Toggles: [Do Not Disturb] [Auto Bright]| |
143 | | -| Network: MyWiFi_5G RSSI -53 dB | |
144 | | -| Power: [Sleep Now] [Restart UI] | |
145 | | -------------------------------------------- |
| 146 | + |
| 147 | +### Interactions — Media |
| 148 | + |
| 149 | +- Transport buttons use accent styling and stretch to equal widths for reliable taps. |
| 150 | +- Volume slider tracks 0–100 with immediate value updates. |
| 151 | +- Scene chips are pill buttons sized for one-thumb access. |
| 152 | + |
| 153 | +### Acceptance — Media |
| 154 | + |
| 155 | +- Album art and metadata remain side-by-side without overlap at 48 px padding. |
| 156 | +- All transport controls sit within a single row to avoid reach shifts. |
| 157 | + |
| 158 | +## Screen 5 — Settings |
| 159 | + |
| 160 | +### Layout — Settings |
| 161 | + |
| 162 | +```text |
| 163 | +Screen 5 — Settings |
| 164 | ++------------------------------------------------------+ |
| 165 | +| Connectivity card: Wi-Fi / Home Assistant / Cloud | |
| 166 | +| • Each tester button with status pill | |
| 167 | ++------------------------------------------------------+ |
| 168 | +| Theme & Display card: dark mode switch, palette | |
| 169 | +| dropdown, brightness slider with value label | |
| 170 | ++------------------------------------------------------+ |
| 171 | +| Network & Time card: Wi-Fi settings / Sync clock / | |
| 172 | +| Display tools buttons (two-column layout) | |
| 173 | ++------------------------------------------------------+ |
| 174 | +| Updates card: status label + (Check updates / Start | |
| 175 | +| OTA) buttons | |
| 176 | ++------------------------------------------------------+ |
| 177 | +| Diagnostics card: Run diagnostics / Export logs | |
| 178 | ++------------------------------------------------------+ |
| 179 | +| Backup & Restore card: Backup now / Restore backup | |
| 180 | ++------------------------------------------------------+ |
146 | 181 | ``` |
147 | 182 |
|
148 | | -### Interactions |
| 183 | +### Interactions — Settings |
149 | 184 |
|
150 | | -- Sheet appears via swipe-down from header or status tap; dismiss via swipe-down or background tap. |
151 | | -- Brightness and volume sliders use `dur-fast` easing for thumb feedback; Mute toggles instantly. |
| 185 | +- Connection tester buttons fire async callbacks and surface status through colored pills. |
| 186 | +- Dark mode switch, palette dropdown, and brightness slider emit events only when users interact |
| 187 | + (not during state sync). |
| 188 | +- Action buttons are grouped per card and reuse the same callback dispatcher for analytics. |
152 | 189 |
|
153 | | -### Acceptance |
| 190 | +### Acceptance — Settings |
154 | 191 |
|
155 | | -- Controls remain operable without leaving current tab context. |
156 | | -- Critical toggles accessible within one gesture from any screen. |
| 192 | +- Every control maintains ≥45 px touch height despite dense cards. |
| 193 | +- Status labels update asynchronously without tearing hidden cards into view. |
0 commit comments