jpmschweitzerandClaude Fable 5 b8974ec84f
Test, Build and Push / test-gateway (push) Successful in 10s
Test, Build and Push / release (push) Skipped
Test, Build and Push / build-gateway (push) Skipped
Wi-Fi data path FIXED: esp_hosted 2.12 on both chips + C6 SDIO auto-OTA
Root cause of the dead data path (assoc/scan/RPC fine, zero data
frames): esp-hosted 1.4.x is formally incompatible with IDF 5.5
(esp-hosted-mcu#47) and the factory C6 slave firmware was ancient
(couldn't even answer a version RPC). Waveshare's examples pin 1.4.* —
do not follow them.

Fix:
- host: espressif/esp_hosted ^2.12 (+ esp_wifi_remote 1.6)
- slave: 2.12.11 network_adapter.bin embedded in the app (c6_ota.c
  streams it to the C6 over the SDIO RPC channel at boot when the
  reported version is < 2.x; ~10s, no wires, idempotent)
- RAM diet for hosted 2.x's footprint (MEMPOOL_PREFER_SPIRAM,
  reduced WIFI_RMT buffers) — without it internal SRAM famine
  boot-loops in xTaskCreateStaticPinnedToCore before app_main
- conservative 20MHz SDIO clock for first verified data path

Verified on hardware: DHCP lease (even that healed), 8/8 pings to
router and tower-of-joy at 1-5ms, WebSocket to the gateway connected,
device registered at /devices as desklock-p4 with fw version.

Also: wifi_diag.c L1 SoftAP diagnostic mode (DESKLOCK-DIAG) with
review fixes, boot ping ladder in net.c, static-IP fallback,
face_status() line, docs for the whole failure taxonomy.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-15 00:26:28 +02:00

DeskLock

A living-room visual/audio endpoint for Tatlock, the homelab butler. DeskLock gives Tatlock a face and a voice on a Waveshare round touch display: you talk to it, it listens, thinks, and answers — the first line of contact with the butler backend running on tower-of-joy.

Hardware

Waveshare ESP32-P4-WIFI6-Touch-LCD-3.4C

Component Details
SoC ESP32-P4NRW32 — dual-core RISC-V @ 400 MHz + LP core
Memory 32 MB PSRAM (in-package), 32 MB NOR flash
Display 3.4" round IPS, 800×800, MIPI-DSI 2-lane, capacitive touch
Radio ESP32-C6-MINI-1 (Wi-Fi 6 + BLE 5) over SDIO via ESP-Hosted
Audio in Dual onboard microphones + ES7210 echo-cancellation ADC
Audio out ES8311 codec, PH2.0 2-pin speaker connector (8Ω 2W recommended)
Flashing USB-C (hold BOOT during reset for download mode)

The device is currently connected over USB-C directly to tower-of-joy, so build/flash happens on this server.

Architecture

┌──────────────────────┐  WebSocket: PCM audio + JSON events
│  DeskLock device     │◄───────────────────────────────────┐
│  (ESP32-P4)          │                                    │
│  • LVGL face         │     ┌──────────────────────────────┴───────────┐
│  • touch / wake word │     │  DeskLock Gateway  (container, :8600)    │
│  • mic capture + AEC │     │  thin orchestrator — no ML dependencies  │
│  • TTS playback      │     └───────┬──────────────────┬───────────────┘
└──────────────────────┘             │                  │  OpenAI-format HTTP
                                     │                  ▼
                          HTTP (LAN) │       ┌─────────────────────────────┐
                                     ▼       │  Speaches  (container, GPU) │
                     ┌────────────────────┐  │  • STT: faster-whisper      │
                     │  Tatlock (butler)  │  │  • TTS: Kokoro / Piper      │
                     │  tatlock.schweitz. │  │  also usable by Open WebUI, │
                     │  internal :8000    │  │  Home Assistant, …          │
                     └────────────────────┘  └─────────────────────────────┘

Tatlock stays a text-only brain. The gateway orchestrates speech-to-text, chat, and text-to-speech; the Speaches container owns the actual STT/TTS models on the GPU, shared homelab-wide. The device firmware stays thin: audio transport, wake word, and face rendering only. Everything runs on the LAN — no cloud in the voice path.

See docs/architecture.md for the full design.

Repository layout

  • firmware/ — ESP-IDF (C, LVGL 9) application for the ESP32-P4
  • gateway/ — Python FastAPI voice gateway, deployed as a container on tower-of-joy
  • sim/face/ — browser simulator of the face (design source of truth; serve with python3 -m http.server and open index.html, or use ?state=…&nochrome=1 for screenshots)
  • docs/ — architecture and design notes

Roadmap

  1. Bring-up — display, touch, audio, 200 MHz PSRAM, cathedral gong
  2. Face + voice loop (in hardware test) — full LVGL face (7 states, rain, orbit, power ladder), Wi-Fi, WebSocket, touch-to-talk
  3. Voice (touch-to-talk) — tap to talk → gateway → Tatlock → spoken reply
  4. Wake word — esp-sr WakeNet on-device, echo cancellation, barge-in
  5. Polish — Tatlock-initiated notifications, presence, OTA updates

References

S
Description
No description provided
Readme
10 MiB
2026-07-19 12:32:13 +02:00
Languages
C 87.2%
C++ 8.5%
M4 1.6%
CMake 1%
Python 0.8%
Other 0.9%