Library Changes
-
feat(tedapi): Powerwall 2 per-Powerwall vitals from the DeviceController msa components. The V2024_06
device_controller_fullrequest now appends 14 more signal names to its unsignedmsaSignalsvariable, after #419'sSYNC_Uptime(PW2_MSA_SIGNAL_NAMES, viaEXTRA_SIGNAL_NAMES; the capture, its signature and itsmsaCompcomponent types are unchanged). They fill PW2 vitals keys that mirror the original/api/devices/vitalsand were hard-codedNone:- on each
TEPINVblock:PINV_EnergyChargedandPINV_EnergyDischarged(lifetime Wh),PINV_HardwareEnableLine,PINV_PllFrequency,PINV_PllLocked,PINV_PowerLimiter,PINV_QoutandPINV_ReadyForGridForming THC_Stateon eachTETHCblockSYNC_ExternallyPoweredandSYNC_SiteSwitchEnabledonTESYNC
Three new keys join each
TEPINVblock:PINV_HeatsinkTemp,PINV_LifetimeEnergyChargedandPINV_LifetimeEnergyDischarged. Values pass through as the gateway delivers them,Noneincluded. TheboolValue/textValuefields are read as well asvalue, so aFalseor an enum is not lost.- The
TETHCandTESYNCvalues join on serial. - The
TEPINVvalues come from the msa component of the battery module, whose serial is not the package serial the block is named by. Nothing in the payload links the two, so_pw2_msa_module_pairing()pairs each package's TETHC with the TEPINV that follows it. Serial-less slots are skipped, even ones carrying a live signal. If the layout is irregular in any way, every module value staysNonerather than risk giving one Powerwall another's counters. - Hardware-validated on 4x Powerwall 2 behind a Backup Gateway 1 (firmware 26.34.0, v1r LAN), and with this request on a second Backup Gateway 1 site with 4x Powerwall 2 (firmware 26.18.3, one warranty-replacement unit with different part numbers). The module counters' sum matched the Fleet API cumulative battery discharge to 0.12%. Over 5.9 hours of charging, the charged counters' rise matched the gateway's own battery meter, integrated, to 0.07%. The component order was identical in every read over 46 hours, and again after a gateway restart (no firmware change).
temps(),/temps,msaCompand every existing key are unchanged.SYNC_ExternallyPowered/SYNC_SiteSwitchEnabledalso fill on Powerwall 3 sites that report a SYNC device (esCan.bus.SYNCwith a serial, e.g. behind a Backup Gateway 2): they wereNonethere and now carry the gateway's value (Falseon 2x PW3, firmware 26.26.11, over WiFi TEDAPI and v1r), matching the original/api/devices/vitals. Nothing else in Powerwall 3 vitals changes: the other 12 names come backnullon PW3 and are not read there (hardware-checked by @jasonacox). TheTEPODPOD_*placeholders stayNone, because they need TEPOD inmsaComp. Under V2026_06 the signed DeviceControllerQuery can't carry extras, so these keys stayNonethere. Thanks @jcl-bit (#416, #409).
- on each
-
feat(tedapi):
/api/system_statusmax_charge_power,max_discharge_powerandmax_apparent_powerare filled (they were alwaysnull) the way the gateway's local API reports them: the site's nominal system power from the gateway config (site_info.nominal_system_power_ac, in kW, converted to W), capped at the inverters' usable power where the inverters report it. A site whose wiring derates its Powerwalls below nameplate reports the derated value, as its local API does (2x Powerwall 2 at 4600 W each on single-phase wiring: 9200, not the 10000 nameplate). Powerwall 3 reports the nameplate, since it has no per-inverter values here. Cloud and FleetAPI report the nameplate. Thanks @erikgieseler (#423). -
feat(tedapi):
/api/system_statusinverter_nominal_usable_poweris filled (it was hard-coded0) with the sum of the active inverters'esCan.bus.PINV[].PINV_PowerCapability.PINV_Pnom, matching the local API. It stays0when no inverter reports one (Powerwall 3) (#423). -
feat(proxy): new
PW_FAILOVERsetting (defaultyes) exposes the library'sfailoveroption (#395) in the proxy. SetPW_FAILOVER=noto pin the configured transports: the v1r leader stays on the wired LAN instead of switching toPW_WIFI_HOST, a failed request returns no data instead of being rerouted, and the proxy never falls back from local to FleetAPI or Cloud mode (at startup it retries the configured mode until it connects). Onlynoturns it off./statsreports it underconfig, and/healthshowsfailoverper transport. Requested by @BJReplay (#427, #402). -
fix: TEDAPI recovery no longer gets stuck on Tesla cloud after a gateway outage. With failover on (the default) and cloud credentials available, the proxy's recovery
connect()could succeed by falling back to cloud. The proxy counted that as recovered (cloud answersversion()too), then stopped probing becausepw.tedapiwas off, and stayed on cloud with no TEDAPI data until restart. NowPowerwall.connect()always starts from the mode set at construction, as its docstring says, instead of where an earlier failover left it, and a successful cloud or FleetAPI connect clears any TEDAPI state left from an earlier failover to local. The proxy counts recovery only when the connection is back in TEDAPI mode, and treats a connection that has left TEDAPI mode as a failed probe. Cloud data keeps flowing while recovery runs. (#425, #424) -
docs: README, proxy README and AGENTS.md say which TEDAPI query set to use. Keep the default
V2024_06unless you need bearer mode: both sets are pre-signed query payloads, but onlyV2024_06takes its signal names as unsigned variables, so it is the only set pypowerwall can extend, and PW3 temperatures, fans and battery health and the gateway uptime arenullunderV2026_06.V2026_06stays for bearer mode on solar-only gateways. The docs now describeV2026_06as a pre-signed query set rather than a Tesla-signed or Tesla-provided one. (#422) -
docs: README v1r key registration covers the Powerwall 2 physical proof (one unit's On/Off switch off for about 15 seconds). (#416)
-
tests: new
test_pw2_msa_signals.py, with a redacted raw PW2 device-controller response (tests/tedapi/fixtures/pw2_device_controller_full.json, made with this request). It covers the request (signature andmsaCompunchanged, names appended), value fields, the pairing rule and its failure cases, the vitals fills, ambiguous pairing, and that every other vitals key is unchanged.test_pw3_fans.pyandtest_pw3_temperatures.pyno longer assume the device-controller request is the untouched capture object. (#416) -
Library version bumped to
0.21.0
Proxy t107
- Upgraded to pyPowerwall v0.21.0 - see the library release notes. Proxy-visible changes:
/vitalsand/pw/vitals: Powerwall 2 per-Powerwall values that werenull(lifetime charged/discharged energy, inverter state and heatsink temperature on eachTEPINV--block,THC_StateonTETHC--, andSYNC_ExternallyPowered/SYNC_SiteSwitchEnabledonTESYNC--). Powerwall 3 sites with a SYNC device report those twoTESYNC--values too (falseinstead ofnull). (#416)/api/system_statusin TEDAPI mode:max_charge_power,max_discharge_powerandmax_apparent_powerare filled the way the gateway's local API reports them (the site nameplate, capped at the inverters' usable power), andinverter_nominal_usable_powerreports the inverters' usable power instead of0where the inverters report it. (#423)
- New
PW_FAILOVERsetting (defaultyes). SetPW_FAILOVER=noto pin the configured transports: the v1r leader stays on the wired LAN instead of switching toPW_WIFI_HOST, a failed request returns no data instead of being rerouted, and the proxy never falls back from local to FleetAPI or Cloud mode. Reported in/statsunderconfig. Requested by @BJReplay (#427, #402). - TEDAPI recovery no longer gets stuck on Tesla cloud after a gateway outage: with cloud credentials present, recovery could fall back to cloud, report "recovered" and stop probing until restart. It now counts recovery only when the connection is back in TEDAPI mode (#425, #424).
Upgrade
pip install --upgrade pypowerwall==0.21.0PyPI: https://pypi.org/project/pypowerwall/0.21.0/
Docker proxy image: jasonacox/pypowerwall:0.21.0t107 (also tagged :latest), built for linux/amd64, arm64, arm/v7 and arm/v8.
docker pull jasonacox/pypowerwall:0.21.0t107Changes in this Release
- #416 — Powerwall 2 per-unit vitals (msa signals)
- #423 —
/api/system_statusbattery power limits (max_*,inverter_nominal_usable_power) - #427 — proxy
PW_FAILOVERsetting (server counterpart jasonacox/pypowerwall-server#160 still in review) - #425 — TEDAPI recovery fix (#424)
- #422 — query-set documentation
- #426 — housekeeping
Test Hardware
Validated on 2x Powerwall 3 + Backup Gateway 2, no expansion packs.
Contributors
Thanks to the community members who made this release possible:
- @jcl-bit — #416 Powerwall 2 msa signals, plus hardware validation on two Powerwall 2 sites and the restart check (#409)
- @erikgieseler — #423 PINV discovery, and the local, cloud and TEDAPI captures that settled the semantics
- @BJReplay — requested
PW_FAILOVER(#402) - @jasonacox-sam — review and PW3 hardware testing on #423 and #416