Powerwall 2- Developer

Tesla Powerwall 2 – Local Gateway API documentation
https://github.com/vloschiavo/powerwall2
50 forks.
268 stars.
1 open issues.

Recent commits:

Meters / Power output stats Calling the below URLs does not require authentication. Each will return JSON output with key-value pairs. Specify the cacert.pem you grabbed earlier using the Certificate Subject Alt Name.

GET /api/meters/aggregates

request: curl --cacert cacert.pem https://powerwall/api/meters/aggregates

response: see sample response here

This returns the current readings from the meters that measure solar, grid, battery, and home production and usage. Watts, Hz, etc. Watt values can be positive or negative.

  1. “site” corresponds to “Grid” in the Tesla mobile app -Positive numbers indicate power draw from the grid to the system -Negative numbers indicate sending power from the system to the grid
  2. “battery” corresponds to “Powerwall” in the Tesla mobile app – this is an aggregate number if you have more than one Powerwall -Positive numbers indicate power draw from the batteries to the system -Negative numbers indicate sending power from the system to the batteries
  3. “load” corresponds to “Home” in the Tesla mobile app -Positive numbers indicate power draw from the system to the home -Negative numbers should never happen
  4. “solar” corresponds to “Solar” in the Tesla mobile app -Positive numbers indicate power production from solar to the system -Negative numbers indicate sending power from the system to solar – this should never be higher than 100 Watts. On occasion I see +/- -10 at night.
  5. “busway” – Unknown – my numbers show 0 for this.
  6. “frequency” – Unknown – my numbers show 0 for this.
  7. “generator” – Unknown I don’t have a generator – my numbers show 0 for this.

 

State of Charge / State of Energy GET /api/system_status/soe

This returns the aggregate charge state in percent of the powerwall(s).

request: curl --cacert cacert.pem https://powerwall/api/system_status/soe

response: {"percentage":69.1675560298826}

When site master or the Powerwalls are off, the response is: HTTP Status 502

Scroll to Top
Scroll to Top
%d bloggers like this: