Skip to content

M8 Local Powerwall, part A: client, commands and PowerwallEnergySite - #39

Merged
Bre77 merged 8 commits into
milestone/m6a-ble-corefrom
milestone/m8a-powerwall
Nov 2, 2026
Merged

Bre77 merged 8 commits into
milestone/m6a-ble-corefrom
milestone/m8a-powerwall

Conversation

@Bre77

@Bre77 Bre77 commented Nov 2, 2026

Copy link
Copy Markdown
Member

Local Powerwall v1r client, ported from Python's tesla_fleet_api/tesla/powerwall/. Stacked on milestone/m4b-energy.

Nothing reaches consumers yet. ./powerwall is not in tsdown.config.ts or package.json exports; PW-17 adds it after the read-only live run. Nothing here has run against a real gateway: every test targets test/helpers/fakegateway.ts, an independent HTTPS gateway that verifies RSA signatures itself.

Issue State
ENG-53 PW-4 exceptions, transport, fake gateway Done. All acceptance items pass.
ENG-57 PW-5 client reads and helpers Done. Digests and golden envelopes match. The compile-time field reference is client.ts and transport.ts themselves, which use no any on protobuf types.
ENG-60 PW-6 component helpers, battery_units Done. Every test_components.py case passes on the same fixture.
ENG-61 PW-7 config writes Done.
ENG-62 PW-8 TEG commands Done.
ENG-67 PW-9 island commands Done.
ENG-73 PW-10 PowerwallEnergySite Partial. EnergySiteRouter does not exist on this base (RTR-1), so the type test uses document 02's Routed types against PowerwallEnergySite | TeslemetryEnergySite. tsconfig.json excludes test/, so CI does not typecheck it; it passed once with a scratch tsconfig.

Golden differences, both asserted in test/powerwall/golden.test.ts and both expected by the docs: reconnect_grid omits force = false, and the config.json write has JSON.stringify spacing, so that one case compares decoded fields instead of bytes.

Only one changeset: LiveStatusResponse allows null, the one change a consumer can see. PW-17's changeset should announce the client.

🤖 Generated with Claude Code

Bre77 and others added 7 commits November 2, 2026 13:41
…53 / PW-4)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…/ PW-8)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…67 / PW-9)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Nov 2, 2026 •

Copy link
Copy Markdown

Warning

Review limit reached

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

  • Ask an admin to enable usage-based reviews

Open in CodeRabbit

Reviews can continue after your included limit without a manual trigger. An admin must approve usage-based billing.

Next included review available in 56 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available. Your 89 included PR review attempts over the past 7 days set your current allowance at 1 review per hour.

Learn how review limits work.

Review configuration:

Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Central YAML; Path: .coderabbit.yaml
  • Review profile: CHILL
  • Plan: Team
  • Run ID: 3ccc0c60-59fd-4a07-b98b-c6b48af1a1df
Commits

Reviewing files that changed from the base of the PR and between 5ab503e and 1156684.

Files selected for processing: 28
  • .changeset/live-status-nullable.md
  • AGENTS.md
  • src/powerwall/client.ts
  • src/powerwall/components.ts
  • src/powerwall/energysite.ts
  • src/powerwall/exceptions.ts
  • src/powerwall/index.ts
  • src/powerwall/models.ts
  • src/powerwall/queries.ts
  • src/powerwall/transport.ts
  • src/types/live_status.ts
  • test/fixtures/components_pw3_two_expansions.json
  • test/fixtures/powerwall-envelopes.json
  • test/fixtures/powerwall.ts
  • test/helpers/fakegateway.ts
  • test/powerwall/client-commands.test.ts
  • test/powerwall/client-config.test.ts
  • test/powerwall/client-island.test.ts
  • test/powerwall/client-reads.test.ts
  • test/powerwall/components.test.ts
  • test/powerwall/energysite.test.ts
  • test/powerwall/exceptions.test.ts
  • test/powerwall/golden.test.ts
  • test/powerwall/protocol-compat.test.ts
  • test/powerwall/queries.test.ts
  • test/powerwall/router-types.test.ts
  • test/powerwall/scaling.test.ts
  • test/powerwall/transport.test.ts
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@Bre77
Bre77 changed the base branch from milestone/m4b-energy to milestone/m6a-ble-core November 2, 2026 04:28
@Bre77
Bre77 added this pull request to stack #43 November 2, 2026 04:29
@Bre77
Bre77 merged commit 115dde8 into main Nov 2, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant