Skip to content
smart charging

Tesla Powerwall (Fleet API)

This page shows the nightly version. Switch to the release version.

Tesla offers an official, but paid Fleet API. For private use, you can create a Tesla Developer Account at developer.tesla.com and receive a monthly API credit of $10.

The myteslamate.com guide explains the process and generates a free Access and Refresh Token. With this token pair and your Client ID created in the Tesla Developer Account, evcc can directly communicate with the Tesla Fleet API.

Supported features

  • Battery control: External control of home battery charging and discharging via evcc.

Usage areas

  • Battery

Parameters

NameDescriptionValueLevel
hostIP address or hostname
Example: 192.0.2.2
optional
passwordPassword

Password of the user "customer". By default this is the last 5 characters of password stated on the Tesla Gateway.

optional
clientIdClient IDoptional
accessTokenAccess tokenoptional
refreshTokenRefresh tokenoptional
siteIdSite ID

optional product identifier of the energy site, use to override autodetection

optional
minsoc [%]Minimum charge

Backup reserve evcc restores in normal operation

Default: 20
Example: 25
advanced
Configuration example for evcc.yaml

If you don't want to configure via the UI, you can alternatively use this YAML block.

meters:
- name: my_battery
type: template
template: tesla-powerwall-fleet
usage: battery
host: 192.0.2.2 # IP address or hostname
password: # Password, Password of the user "customer". By default this is the last 5 characters of password stated on the Tesla Gateway.
clientId: # Client ID, from [developer.tesla.com](https://developer.tesla.com/dashboard).
accessToken: # Access token, from [myteslamate.com](https://app.myteslamate.com/).
refreshToken: # Refresh token, from [myteslamate.com](https://app.myteslamate.com/).
siteId: # Site ID, optional product identifier of the energy site, use to override autodetection (optional)
minsoc: 20 # Minimum charge (%), Backup reserve evcc restores in normal operation (optional)