diff --git a/000 daily/Daily Notes and To Do.md b/000 daily/Daily Notes and To Do.md index b21907a..db18a3b 100644 --- a/000 daily/Daily Notes and To Do.md +++ b/000 daily/Daily Notes and To Do.md @@ -81,3 +81,42 @@ tags: - Weekend - garden and gym. - Finish logging trees with NFC. Use new WIKI ? Mulch front yard , move out trailers. . + +--- + +## Voice / ESP32 — firmware fix (found 2026-10-14) + +The house voice was **dead for two days** (Oct 13 → Oct 14) and nothing reported it. + +Two independent faults, **the same class of bug**: + +**1. `voice_bridge` was silently deaf — FIXED 2026-10-14.** +It subscribed to MQTT **once, at startup**, with no `on_connect` handler. When the +shared `.13` broker restarted (internet-use-control added the 8883 TLS listener on +Oct 13), the bridge reconnected but **never re-subscribed** — a live TCP socket with +no subscription, no error, no log. Added an `on_connect` handler that re-subscribes. +Verified: `[bridge] subscribed voice/audio_stream + voice/status`. +Source: `/home/sam/voice_bridge/mqtt_audio_bridge.py` + +Note: the bridge's compose reads `MQTT_USER`/`MQTT_PASS` from the **shell**, so a +rebuild needs `set -a; . ~/.config/environment.d/10-secrets.conf; set +a` first or +the container starts with no credentials. + +**2. ESP32 firmware — SAME BUG, still to do.** +The unit showed a **green LED** (Wi-Fi joined) but published nothing to +`voice/audio_stream`. A power-cycle fixed it. Green = Wi-Fi, not MQTT. Misleading. + +### TO DO — ESP32 firmware (repo: `sam/voice_assistant`) + +- [ ] **Auto-reconnect MQTT and re-subscribe on every (re)connect** (`on_connect`). + Same fix as the bridge. Without it, every broker restart kills it silently. +- [ ] **Publish a heartbeat** (e.g. every 5 min) so "silence" is a reliable signal. +- [ ] **Show MQTT state on the LED** — green currently means "Wi-Fi only", which + hides the failure. +- [ ] Consider **powering the ESP32 from a smart plug** so it can be power-cycled + remotely when the watchdog sees it go quiet. + +### Related + +- Watchdog: alert (and ideally auto-heal) if `voice/audio_stream` is quiet for N hours. + Needed because outages go unnoticed for days — and we are often away for over a week.