Loading page...Загружаем страницу...正在加载页面...
AtlasRepo

Three years of a hot tub lying to Home Assistant — and the 200 lines that finally shut it up

说明与用途

Balboa BWA Wi‑Fi 模块经常失去响应,导致 Home Assistant 超时、内存泄漏和实体状态变旧。通过添加心跳检测、僵尸套接字拒绝和指数退避的连接管理器,消除了崩溃,失效状态在30秒内恢复,自动化变得可靠。

问题

The Balboa BWA Wi‑Fi Module (50350) in a hot tub frequently became unresponsive, causing Home Assistant to experience timeouts, memory leaks, and stale entity states for up to 104 minutes, leading to automation failures and system restarts.

结果

The new connection manager reduced module downtime impact, prevented memory leaks, and restored reliable automations, though the module firmware remains flaky.

工作流

  • 1. Measure module reliability with a Python harness using the same connection.py as HA.
  • 2. Identify that the module stops sending data after ~30s, leaving sockets open.
  • 3. Design a supervised connection: (a) heartbeat loop to detect silence > stale_after, (b) reject connections that do not deliver a first frame within connect_timeout, (c) apply exponential backoff with cap for reconnection attempts.
  • 4. Wrap pybalboa in SpaConnectionManager and modify HA integration to use it.
  • 5. Deploy and observe improved stability: no crashes, timely Unavailable state, and reliable automations.

证据

Effective uptime 33.85 %

来源

No more crashes / memory leaks

来源

Entity states flip to Unavailable within 30 seconds of the module going silent

来源

  • 记录日期: 2026-09-07T23:52:45.574Z