Tesla Powerwall
To use the optional battery control you need to generate a refresh token for communicating with the Tesla API.
The following apps allow to create the token:
Supported features
- Battery control: External control of home battery charging and discharging via evcc.
Usage areas
- Grid meter
- Solar production
- Battery
Parameters
| Name | Description | Value | Level |
|---|---|---|---|
host | IP address or hostname | optional | |
password | Password Password of the user "customer". By default this is the last 5 characters of password stated on the Tesla Gateway. | optional | |
refreshToken | Refresh token | optional | |
siteId | Site ID optional product identifier of the energy site, use to override autodectction | optional | |
minsoc [%] | Minimum charge Lower limit when discharging the battery in normal operation | advanced | |
maxsoc [%] | Maximum charge Upper limit when charging the battery from the grid | advanced | |
maxchargepower [W] | Maximum charge power For forced charging of the battery. | advanced | |
maxdischargepower [W] | Maximum discharge power Maximum discharge power of the storage. | 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_grid type: template template: tesla-powerwall usage: grid 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. refreshToken: # Refresh token, optional siteId: # Site ID, optional product identifier of the energy site, use to override autodectction (optional)meters: - name: my_pv type: template template: tesla-powerwall usage: pv 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. refreshToken: # Refresh token, optional siteId: # Site ID, optional product identifier of the energy site, use to override autodectction (optional)meters: - name: my_battery type: template template: tesla-powerwall 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. refreshToken: # Refresh token, optional siteId: # Site ID, optional product identifier of the energy site, use to override autodectction (optional) minsoc: 25 # Minimum charge (%), Lower limit when discharging the battery in normal operation (optional) maxsoc: 95 # Maximum charge (%), Upper limit when charging the battery from the grid (optional) maxchargepower: # Maximum charge power (W), For forced charging of the battery. (optional) maxdischargepower: # Maximum discharge power (W), Maximum discharge power of the storage. (optional)