AUDIO

Listen to this page

0:00
Chapters

    The client (Flutter app)

    client/ — voice-first client for the holai core: phones (Android/iOS) and web. Sub-page for hub specifics: hub; the REST it consumes is documented in api.

    Flow

    Setup → login (or guest) → home. The setup screen probes for a holai core signature before anything is trusted as a holai backend.

    Capabilities

    Feature Where / how
    Dashboard tab the main screen has TWO pages: the chat and the home's widget dashboard. Swipe left on the feed — or tap the dashboard icon (first among the app-bar actions, next to the search/history icons) — and the page slides over with an animation; on the dashboard the SAME spot in the app bar shows a chat icon to go back (the swap is cross-faded). The tab loads the user's saved arrangement (GET /dashboard/layout) and renders every plugin widget as its own browser page inside the phone — the same widget HTML the admin SPA embeds, authenticated with ?token= (the core accepts it on every route, like the events WebSocket) and carrying the tile's saved ?s= settings; the dashboard-native core widgets are skipped, tiles keep their span-based heights, pull-to-refresh reloads the arrangement. Through the remote-access hub the tab shows an honest note instead — browser pages cannot ride the encrypted tunnel frames. The feed-search app-bar icon appears only on the chat page. The phone has its OWN layout editor (client-side only): the pencil button opens a flat list where a tile drags to reorder, the size button cycles its spans (half width ⇄ full width, height 1–3) and ✕ removes it — an add sheet puts widgets back; the first open adopts the admin’s server layout, then edits persist locally per house and never touch the admin arrangement.
    Quick tour on the very first start (once per install) the main screen shows a 10-step onboarding tour: a blurred overlay with a cutout around the element being explained — microphone (tap / hold), dictation pill, quick commands, the feed (long-press = voice replay), feed search, chat history, the dashboard toggle (swipe left / tap) and settings; Back/Next/Skip at every step, the flag lives in SharedPreferences (tour_done), so a reinstall or app-data wipe replays it
    Voice commands record → .wav (16 kHz PCM, mono) → POST /voice; the reply audio plays automatically ("play always / mute" setting — muted users just read)
    Dictation long voice recording (minutes to hours) that is DATA, not an AI command: the small pill button under the mic ("Dictation") opens a target sheet — Conversation (transcript + full recording as a feed card), Google Docs (appended to a document) or Obsidian (appended to a note). While recording a timer runs and ~2-minute wav chunks upload to POST /dictation in the background (transcribed server-side while you keep talking); stop ends the session and the dictation card appears in the feed (transcript scrollable inside the card, minutes + target shown, a play button replays the full recording). Long-pressing a dictation card deliberately does NOT speak it — a 40-minute transcript is not TTS material. Via the hub tunnel the chunks ride JSON (audioBase64)
    Chat POST /chat with text; the pipeline language can be switched with the spoken "change language" command (see agent-and-language)
    Chat attachments gallery pick, camera photo, record video — sent as multipart media with the text; the core stores the file under data/media/ and the agent sees an attachment note
    AI context every open chat is sent as history with POST /chat, so models see the recent conversation turns, not only the last message
    Conversation feed the main screen is a chat-style feed grouped by dates: commands are bubbles on the right, home replies on the left, and events (e.g. camera detections) are ordinary left bubbles with a small "event" caption — they are appended to the end of the feed, not replacing the answer. Long-press any message to hear it spoken; home replies also have a small play button. Search opens from the icon next to history and covers the whole chat history: matches are highlighted inside the messages, the feed shows them one by one, the counter reads n/m, the ✕ resets. After the last reply there is a green new-chat button; the chat history is available through the back icon next to the gear in the app bar
    Chat history (sessions) every “new chat” opens a session; sessions persist on-device per house (last 40 sessions, 200 lines each). The history screen lists them as collapsible blocks — tap the title to fold/unfold the messages inside; tapping a session opens it on the home screen; a long-press (or trash button) deletes a session after a modal confirmation. History is keyed by the HOME IDENTITY (homeId — carried by the QR twin and latched by the LAN twin from the core's /health), so the LAN and hub profiles of the same house see ONE chat history; legacy url-keyed sessions migrate to homeId keys once
    Audit log (privileged) for admins (or any role granted the audit:read scope) the app bar shows a receipt icon → the audit screen: a paged list (100 per page, loading on scroll) of who ran what, when and with which result; every entry unfolds into the user, the stored request args and the response. Filtered by tool, user, a From/To date range (calendar pickers) and a free-text search over the stored JSON; the interface strings are translated in all seven languages
    Event priorities events pushed by the home can carry a priority — rules are set manually in the dashboard (events only happen in the future): moderate shows a local notification on the phone (a person on camera), alarm raises a high-importance notification AND plays a bundled two-tone siren on the phone in a loop — even when the app is in the background — until the user taps the red "stop alarm" bar on the home screen; a rule matches the event type, source and/or a text fragment, first match wins. The alarm is meant for immediate-reaction dangers (fire, gas, water)
    AI permission dialog the AI permission gate (architecture "AI permissions & consent") pauses an actuating tool call or an external provider call until the user answers: a consent.request event opens a modal on the home screen — Allow once / Always allow (upgrades the subject's mode) / Deny; no answer within ~45 s counts as a denial. Requests are the asking user's own; an admin's app also sees (and can answer) other users' pending asks
    Mode switching a house can exist as a LAN profile AND a hub profile — both usable at any time from settings. When the LAN transport dies mid-use (left Wi-Fi, core rebooting), the app silently fails over to the saved hub twin of the same house and retries the operation once (login, chat, voice — timeouts included); switching back to the LAN happens by itself: while the home rides the hub tunnel the app quietly probes the LAN core, and once it answers again it silently switches over — same token, no user action. The hub twin needs no QR scan: while in LAN an admin client fetches the hub connection code (GET /relay/status) and saves the twin itself. A saved token survives transport failures (only a 401/403 wipes it), so the switch plus the lent token returns straight to the home screen. While NOT authenticated the client also sweeps ALL saved houses every 5 s in this order: the LAN URI of the active house first, then its hub twin (remote access), then the other saved houses — LAN ones before remote ones; the first transport that answers becomes active (tokens are reused, the switch is seamless). When NOTHING answers, the login form is replaced by an offline screen — login and guest are both pointless while there is no way in; the sweep keeps running and returns the UI to login/home automatically (back in the LAN range, core rebooted, hub online)
    Interface languages all the languages the deployment ships (en de es pl ru fr nl right now). The language is picked in settings (default: system locale when supported)
    Remote access client settings → paste the holai://connect?… code or Scan (mobile camera via mobile_scanner); the code comes from the admin dashboard's Remote access screen; calls then ride the hub tunnel
    Push (remote) a receive-only second hub listen socket delivers chat/media/notify events; payloads are small pointers, media rides on demand through the tunnel
    Look & feel the home color paints the whole main screen; text sitting on it flips between bright and dark ink automatically (no black-on-dark unreadable pairs). Typing opens with a long-press on the microphone (the same bottom sheet as the attachments flow)

    Last updated: November 2026