diskiller's domain

energyscraper

A command-line tool for querying Tesla Energy systems using the Fleet API and the Powerwall device protocol, exposing telemetry Tesla's public apps don't normally show.

The problem

A Powerwall 3 installation with four solar orientations (north, south, east, and west) raises an obvious question: how does each array actually perform through the day and across the seasons? Tesla's apps provide excellent high-level information, but they intentionally hide much of the underlying telemetry, including the per-string voltage, current, and power values the hardware already measures.

energyscraper exposes that data using the documented Fleet API where possible and the Powerwall's own protocols where appropriate. It began as a simple way to collect Powerwall metrics for Prometheus and has grown into a toolkit for site power flows, battery telemetry, and per-MPPT PV string readings.

What it does

Technical details

Python CLI. Cloud data comes from the Tesla Fleet API using OAuth authorization-code login; the refresh token is stored locally with file mode 0600 and the client secret is never persisted. Per-string data comes from the gateway's TEDAPI over an RSA-signed channel, with pair and unpair commands to register and revoke the key. A raw gateway gRPC device-command escape hatch is included for protocol investigation, and an optional pypowerwall-based local mode supports older gateway setups.

The exporter publishes gauges for per-string voltage, current, and power, DC and AC-coupled solar totals, site power flows, and Powerwall charge. PV strings are read locally on every scrape, while cloud values are cached so fast scrape intervals don't hit rate limits.

On the roadmap: a continuous daemon mode for high-resolution history, follower-inverter support on multi-inverter sites, remote string reads relayed through the Fleet API, and per-string labels such as roof orientation.

Source

github.com/mminkus/energyscraper