feat(notifier): push state events to Smart Home Tablet overlay

Adds a thin HTTP bridge so the tablet at https://tablet.digital-home.site
shows a Siri-style overlay reflecting the current assistant state
(wake / command / response / idle / error). Non-fatal: if the tablet
is offline or TABLET_URL/VOICE_API_KEY are unset, events are silently
skipped and the assistant keeps working.

- satellite/notifier.py — POST /api/voice/event with bearer token,
  reused requests.Session for keep-alive, 1.5s timeout
- satellite/modes.py — emits wake on activation, command after STT,
  response after LLM, idle on timeout
- satellite/llm.py — emits error on gateway connection/timeout/HTTP
- .env.example documents TABLET_URL and VOICE_API_KEY

Tablet side (separate repo smart-home-tablet, commit 51c3d60) exposes
POST /api/voice/event + GET /api/voice/stream (SSE) and renders a
full-screen overlay in components/VoiceOverlay.tsx.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
Cosmo
2026-04-23 12:39:13 +00:00
parent a9001aef92
commit e4e7529063
4 changed files with 78 additions and 0 deletions

View File

@@ -47,3 +47,10 @@ LOG_FILE=errors.log
COSMO_SESSION_KEY=agent:voice:voice:home
LUSYA_SESSION_KEY=agent:wife:voice:home
# Smart Home Tablet integration (опционально)
# Если настроено — скрипт шлёт события состояния (wake/command/response/idle/error)
# на планшет, который показывает оверлей с Siri-blob + распознанным текстом.
# Если не настроено, просто пропускается, ассистент работает как раньше.
TABLET_URL=https://tablet.digital-home.site
VOICE_API_KEY=your_voice_api_key_here