v0.16.4 - TEDAPI Auto-Recovery Wedge Fix
Library Fix
- fix:
Powerwall.connect()now restorestedapi/tedapi_modealong withmode/cloudmode/fleetapiwhen all connection modes fail. Previously a fully-failedconnect(retry=False)lefttedapi=Falsebehind (the local-mode fallback handler zeroes it), which permanently wedged the proxy's TEDAPI auto-recovery thread — itspw.tedapigate short-circuited every iteration, so no further recovery attempt was ever made until restart. (#366)
Proxy Hardening (t98 → t99)
- fix: The TEDAPI recovery loop now checks fallback state before the
pw.tedapigate. Once in fallback, recovery can never be short-circuited by a falsypw.tedapi, making this class of wedge structurally impossible even if some future path corrupts the attribute again. Healthy-path behavior is unchanged (non-TEDAPI modes still skip probing). - feat:
/healthand/statsfallback_modeblocks now includenext_attempt_at(timestamp the next recovery attempt is due) andrecovery_thread_alive(Thread.is_alive()of the recovery thread), so a stalled recovery is directly visible instead of inferred from a frozen counter. - fix:
next_attempt_atis now floored byTEDAPI_PROBE_INTERVAL— the recovery loop always sleeps the probe interval before attempting, so the real due time ismax(recovery_interval, TEDAPI_PROBE_INTERVAL).
Docs
- docs(proxy): Maintenance-mode deprecation notice for
pypowerwall-server. The proxy is not being removed and keeps receiving critical/security fixes, but new feature development (multi-gateway naming, MQTT, etc.) is moving to pypowerwall-server. (#368)
Tests
356 passed (pytest -m "not live"). Library restore regression, recovery-loop gate regression, next_attempt_at scheduling, and healthy-gate preservation tests added. Live wedge test validated against an isolated container — forced route-loss reproduced the #366 sequence (fallback → fully-failed attempt #1 → route restored → attempt #2 fired and recovered).
Contributors
Thanks to the community members who made this release possible:
- @dthorndyke — reported and diagnosed the TEDAPI auto-recovery wedge with an exceptional bug report (#366): nine tracked events with timestamps,
/healthfield values, and a root-cause hypothesis that turned out to be exactly right - @jasonacox — authored and merged the library fix, proxy hardening, observability improvements (#367), and the maintenance-mode deprecation notice (#368)
— Sam ⚡