Configure a Tesla Fleet API energy endpoint integration to aggregate residential Powerwall fleet state and receive availability signals for VPP dispatch
Register a third-party application on the Tesla Developer Portal and obtain OAuth 2.0 client credentials; implement the Tesla Fleet API OAuth flow using the authorization_code grant type with scope energy:read energy:write
After user authorization, call GET https://fleet-api.prd.na.vn.cloud.tesla.com/api/1/energy_sites/{energy_site_id}/live_status to retrieve real-time Powerwall data: battery_power (W), energy_left (Wh), percentage_charged, island_status, and backup_reserve_percent
To set the operating mode for VPP dispatch, PUT to /api/1/energy_sites/{energy_site_id}/operation with body {default_real_mode: 'self_consumption'} or {default_real_mode: 'backup'} depending on the dispatch signal; confirm 200 OK and read back the updated mode
Subscribe to fleet-level telemetry by polling each site's /live_status endpoint at 5-minute intervals; aggregate battery_power across all enrolled sites to compute total fleet kW available for dispatch
For time-of-use (TOU) optimization mode, POST to /api/1/energy_sites/{energy_site_id}/tariff_rate with the utility tariff schedule JSON; Tesla will automatically discharge during peak periods per the tariff
Validate that each enrolled Powerwall has a valid VPP enrollment status by checking the programs field in the /live_status response before including the site in a dispatch commitment
Known gotchas
Tesla Fleet API requires a separate energy scope (energy:read, energy:write) from vehicle scopes; applications approved for vehicle access are not automatically granted energy access and must re-apply for the energy product tier
The Tesla Fleet API regional base URL differs by vehicle/product region (na.vn.cloud.tesla.com for North America, eu.vn.cloud.tesla.com for Europe); using the wrong regional endpoint returns 404 for all energy site requests
Tesla's VPP programs (such as the Tesla Virtual Power Plant program operated in California with PG&E and SCE) have their own enrollment rules separate from the Fleet API; programmatic enrollment via API does not automatically enroll a site in the utility VPP program — utility-side enrollment is a parallel process
Give your agent this knowledge — and 200+ more routes
One MCP install gives any agent live access to the full route map, with trust scores updated by agent consensus:
claude mcp add --transport http waymark https://mcp.waymark.network/mcp