Skip to content

v0.17.3 - PW3 v1r Islanding Commands

Latest

Choose a tag to compare

@jasonacox-sam jasonacox-sam released this 08 Sep 02:07

Grid island control on PW3 v1r (#379):

  • Powerwall.go_off_grid(confirm=True) and Powerwall.reconnect_grid() now work through the PW3 v1r/TEDAPI backend: Tesla's signed legacy setIslandMode command is sent directly — no public API change, no proxy/FleetAPI/config-write behavior changes. Hardware-validated on a live Powerwall 3 in both directions of the contactor (GridStatus 1→0→1, grid flow to zero and back, home carried by solar + battery while islanded), on both the original hand-encoded implementation and the final vendored-proto form
  • TEGAPISetIslandModeRequest/TEGAPISetIslandModeResponse added to the vendored tedapi_combined.proto (legacy TEG oneof fields 3/4), pb2 regenerated via the canonical tools/gen_proto.sh toolchain — the islanding command now flows through the existing send_teg_message() path, and the generated encoder produces byte-identical wire output to the hardware-validated hand encoding, pinned by unit tests. The vendored .proto files are the single source of truth for the TEDAPI wire schema — policy now written into AGENTS.md, with a new pypowerwall/tedapi/protobuf/README.md covering which proto set a change belongs in (V2024_06 vs V2026_06), the dual-toolchain regeneration, and the byte-pinning-test convention
  • A non-1 setIslandMode result now logs a warning ("1 is the observed success value") instead of passing silently; missing result returns None with the same warning
  • Docs & safety: API.md documents the v1r islanding path (new in 0.17.3) with an extreme-care warning — these commands physically operate the grid contactor, an islanded home with a depleted battery loses power, don't automate without handling the failure modes, and always verify grid status after commanding instead of assuming success. README function list and facade docstrings (go_off_grid/reconnect_grid) carry the same warning
  • fix(tools): gen_proto.sh — GNU-only sed -i -E replaced with portable perl -pi -e (BSD/macOS sed misparses -i -E, which corrupted the V2026_06 pb2 import rewrite on Mac, including via the pre-commit hook)

Tests: full non-live suite 643 passed, pylint 9.95/10. Wire bytes verified byte-identical on every path: off-grid (mode 6 + force), reconnect (mode 1, force omitted), missing-result → result: None + warning, transport failure → None, bad mode → ValueError.

Proxy container: jasonacox/pypowerwall:0.17.3t101 — proxy requirement pin updated to pypowerwall==0.17.3; library version bumped to 0.17.3

Full changelog: v0.17.2...v0.17.3


Contributors

Thanks to the community members who made this release possible:

  • @mcmahonl19 — the entire capability: discovered the setIslandMode command, did the TEGMessage field-number archaeology to get it onto the wire, implemented the signed-command path with non-actuating unit tests, and validated islanding on live Powerwall 3 hardware in both contactor directions (#379). His byte-assertion tests now pin the generated encoder to the hardware-validated bytes
  • @jasonacox — moved the encoder onto the vendored proto with byte-parity proven, the portable gen_proto.sh fix, the safety documentation, review, merge and release packaging