Fehlermeldung nach Umstellung Tesla API
Describe the bug
Hi, ich bekomme immer folgende beim einbinden meine Autos im EVCC.
[main ] ERROR 2025/01/20 12:52:20 creating vehicle Tesla_Model_Y failed: cannot create vehicle type 'template': cannot create vehicle type 'tesla': cannot get vehicles: 403 Forbidden [main ] ERROR 2025/01/20 12:52:20 creating vehicle Tesla_Model_3 failed: cannot create vehicle type 'template': cannot create vehicle type 'tesla': cannot get vehicles: 403 Forbidden [site ] WARN 2025/01/20 12:52:21 vehicle 'Tesla Model 3' does not support automatic detection [site ] WARN 2025/01/20 12:52:21 vehicle 'Tesla Model Y' does not support automatic detection
Mit der alten Konfig geht es ohne Probleme. Hat da jemand eine Lösung ? Ich habe alles wie unter https://docs.evcc.io/blog/2025/01/20/tesla-api-update beschrieben eingerichtet. Schlüssel habe ich in den Autos auch eingerichtet. Sollte also normal funktionieren.
Was mir auch aufgefallen ist das ich beim Neustarten von EVCC immer diesen Fehler habe. Bekommt man den weg ? [site ] ERROR 2025/01/20 12:53:08 pv 1 power: API call to https://192.168.178.9/api/login/Basic returned unexpected status code 429 ("{"code":429,"error":"Api Limit reached for this endpoint","message":"API Limit Reached"}")
Steps to reproduce
Ich habe es mehrfach versucht das hinzubekommen. Wenn man nur 1 Auto nimmt scheint es ab und an zu funktionieren. Warum auch immer.
Configuration details
network:
# schema is the HTTP schema
# setting to `https` does not enable https, it only changes the way URLs are generated
schema: http
# host is the hostname or IP address
# if the host name contains a `.local` suffix, the name will be announced on MDNS
# docker: MDNS announcements don't work. host must be set to the docker host's name.
host: xxx
# port is the listening port for UI and api
# evcc will listen on all available interfaces
port: 7070
interval: 30s # control cycle interval. Interval <30s can lead to unexpected behavior, see https://docs.evcc.io/docs/reference/configuration/interval
# database configuration for persisting charge sessions and settings
# database:
# type: sqlite
# dsn: <path-to-db-file>
# sponsor token enables optional features (request at https://sponsor.evcc.io)
sponsortoken: xxx
# telemetry enables aggregated statistics
#
# Telemetry allows collecting usage data (grid and green energy, charge power).
# Data is aggregated, no individual charging sessions are tracked. The collected,
# anonymous data can be retrieved using https://api.evcc.io.
#
# See https://github.com/evcc-io/evcc/pull/4343 or details.
#
# For time being, this is only available to sponsors, hence data is associated with
# the sponsor token's identity.
#
# telemetry: true
# log settings
log: info
levels:
site: debug
lp-1: debug
lp-2: debug
cache: error
db: error
# modbus proxy for allowing external programs to reuse the evcc modbus connection
# each entry will start a proxy instance at the given port speaking Modbus TCP and
# relaying to the given modbus downstream device (either TCP or RTU, RS485 or TCP)
modbusproxy:
# - port: 5200
# uri: solar-edge:502
# # rtu: true
# # readonly: true # use `deny` to raise modbus errors
# meter definitions
# name can be freely chosen and is used as reference when assigning meters to site and loadpoints
# for documentation see https://docs.evcc.io/docs/devices/meters
meters:
- name: my_grid
type: template
template: tesla-powerwall
usage: grid
host: xxx # IP-Adresse oder Hostname
password: xxx # Passwort des Benutzers "Kunde". Default sind die letzten 5 Zeichen des auf dem Tesla Gateway genannten Passworts.
refreshToken: xxx (optional)
siteId: # optionale Product ID dieser Energy Site, zum Übersteuern der automatischen Erkennung (optional)
- name: my_pv
type: template
template: tesla-powerwall
usage: pv
host: xxx # IP-Adresse oder Hostname
password: xxx # Passwort des Benutzers "Kunde". Default sind die letzten 5 Zeichen des auf dem Tesla Gateway genannten Passworts.
refreshToken: xxx (optional)
siteId: # optionale Product ID dieser Energy Site, zum Übersteuern der automatischen Erkennung (optional)
- name: my_battery
type: template
template: tesla-powerwall
usage: battery
host: xxx # IP-Adresse oder Hostname
password: xxx # Passwort des Benutzers "Kunde". Default sind die letzten 5 Zeichen des auf dem Tesla Gateway genannten Passworts.
refreshToken: xxx (optional)
siteId: # optionale Product ID dieser Energy Site, zum Übersteuern der automatischen Erkennung (optional)
minSoc: 20
maxSoc: 100
# charger definitions
# name can be freely chosen and is used as reference when assigning charger to vehicle
# for documentation see https://docs.evcc.io/docs/devices/chargers
chargers:
- name: Wallbox_Garage
type: template
template: twc3
host: xxx # IP-Adresse oder Hostname
- name: Wallbox_Gartenhaus
type: template
template: twc3
host: xxx # IP-Adresse oder Hostname
# vehicle definitions
# name can be freely chosen and is used as reference when assigning vehicle to loadpoint
# for documentation see https://docs.evcc.io/docs/devices/vehicles
vehicles:
- name: Tesla_Model_3
type: template
# template: tesla-command
template: tesla
title: Tesla Model 3 # Wird in der Benutzeroberfläche angezeigt (optional)
clientId: xxx # von developer.tesla.com
accessToken: xxx # von myteslamate.com
refreshToken: xxx # von myteslamate.com
proxyToken: xxx # von myteslamate.com
# accessToken: xxx # Siehe https://docs.evcc.io/docs/devices/vehicles#tesla
# refreshToken: xxx # Siehe https://docs.evcc.io/docs/devices/vehicles#tesla
vin: xxx # Erforderlich, wenn mehrere Fahrzeuge des Herstellers vorhanden sind (optional)
capacity: 62 # Akkukapazität in kWh (optional)
control: true # Notwendig für Tesla Wall Connector. Der Virtual Key für evcc muss eingerichtet sein. Siehe https://tesla.evcc.io (optional)
commandProxy: https://api.myteslamate.com
- name: Tesla_Model_Y
type: template
# template: tesla-command
template: tesla
title: Tesla Model Y # Wird in der Benutzeroberfläche angezeigt (optional)
clientId: xxx # von developer.tesla.com
accessToken: xxx # von myteslamate.com
refreshToken: xxx # von myteslamate.com
proxyToken: xxx # von myteslamate.com
# accessToken: xxx # Siehe https://docs.evcc.io/docs/devices/vehicles#tesla
# refreshToken: xxx # Siehe https://docs.evcc.io/docs/devices/vehicles#tesla
vin: xxx # Erforderlich, wenn mehrere Fahrzeuge des Herstellers vorhanden sind (optional)
capacity: 79 # Akkukapazität in kWh (optional)
control: true # Notwendig für Tesla Wall Connector. Der Virtual Key für evcc muss eingerichtet sein. Siehe https://tesla.evcc.io (optional) c
commandProxy: https://api.myteslamate.com
# site describes the EVU connection, PV and home battery
site:
title: Home # display name for UI
meters:
grid: my_grid # grid meter
pv: my_pv # list of pv inverters/ meters
battery: my_battery # list of battery meters
# aux:
# - aux # list of auxiliary meters for adjusting grid operating point
residualPower: 100 # additional household usage margin
# maxGridSupplyWhileBatteryCharging: 100 # ignore battery charging if AC consumption is above this value
# loadpoint describes the charger, charge meter and connected vehicle
loadpoints:
- title: Wallbox Garage # display name for UI
charger: Wallbox_Garage # Wallbox Referenz
mode: now # charge mode (off, now, minpv, pv)
- title: Wallbox Gartenhaus # display name for UI
charger: Wallbox_Gartenhaus # Wallbox Referenz
mode: now # charge mode (off, now, minpv, pv)
# remaining settings are experts-only and best left at default values
priority: 0 # relative priority for concurrent charging in PV mode with multiple loadpoints (higher values have higher priority)
soc:
# polling defines usage of the vehicle APIs
# Modifying the default settings it NOT recommended. It MAY deplete your vehicle's battery
# or lead to vehicle manufacturer banning you from API use. USE AT YOUR OWN RISK.
poll:
# poll mode defines under which condition the vehicle API is called:
# charging: update vehicle ONLY when charging (this is the recommended default)
# connected: update vehicle when connected (not only charging), interval defines how often
# always: always update vehicle regardless of connection state, interval defines how often (only supported for single vehicle)
mode: charging
# poll interval defines how often the vehicle API may be polled if NOT charging
interval: 60m
estimate: true # set false to disable interpolating between api updates (not recommended)
enable: # pv mode enable behavior
delay: 1m # threshold must be exceeded for this long
threshold: 0 # grid power threshold (in Watts, negative=export). If zero, export must exceed minimum charge power to enable
disable: # pv mode disable behavior
delay: 3m # threshold must be exceeded for this long
threshold: 0 # maximum import power (W)
# tariffs are the fixed or variable tariffs
tariffs:
currency: EUR # three letter ISO-4217 currency code (default EUR)
grid:
# either static grid price (or price zones)
#type: fixed
#price: 0.294 # EUR/kWh
#zones:
# - days: Mon-Fri
# hours: 2-5
# price: 0.2 # EUR/kWh
# - days: Sat,Sun
# price: 0.15 # EUR/kWh
# or variable tariffs
type: tibber
token: xxx # access token
# homeid: xxx # optional if multiple homes associated to account
# type: awattar
# region: de # optional, choose at for Austria
# charges: # optional, additional charges per kWh
# tax: # optional, additional tax (0.1 for 10%)
# type: octopusenergy
# tariff: AGILE-FLEX-22-11-25 # Tariff code
# region: A # optional
# type: elering # Nordpool
# region: ee # or lt, lv, fi
# charges: # optional, additional charges per kWh
# tax: # optional, additional tax (0.1 for 10%)
# type: energinet # Energinet using the price in DKK
# region: dk1 # or dk2
# charges: # optional, additional charges per kWh
# tax: # optional, additional tax (0.1 for 10%)
# type: entsoe # Entso-E european market data
# domain: BZN|DE-LU # https://transparency.entsoe.eu/content/static_content/Static%20content/web%20api/Guide.html#_areas
# securitytoken: # api token
# charges: # optional, additional charges per kWh
# tax: # optional, additional tax (0.1 for 10%)
# type: custom # price from a plugin source; see https://docs.evcc.io/docs/reference/plugins
# price:
# source: http
# uri: https://example.org/price.json
# jq: .price.current
feedin:
# rate for feeding excess (pv) energy to the grid
type: fixed
price: 0.146 # EUR/kWh
# type: octopusenergy
# tariff: AGILE-FLEX-22-11-25 # Tariff code
# region: A # optional
co2:
# co2 tariff provides co2 intensity forecast and is for co2-optimized target charging if no variable grid tariff is specified
# type: grünstromindex # GrünStromIndex (Germany only)
# zip: <zip>
# type: electricitymaps # https://app.electricitymaps.com/map
# uri: <uri>
# token: <token> # needs to be a token with forecast (not in the free tier)
# zone: DE
# type: ngeso # National Grid Electricity System Operator data (United Kingdom only) https://carbonintensity.org.uk/
# provides national data if both region and postcode are omitted - do not supply both at the same time!
# region: 1 # optional, coarser than using a postcode - see https://api.carbonintensity.org.uk/ for full list
# postcode: SW1A1AA # optional
# mqtt message broker
mqtt:
# broker: localhost:1883
# topic: evcc # root topic for publishing, set empty to disable
# user:
# password:
# influx database
influx:
# url: http://localhost:8086
# database: evcc
# user:
# password:
# eebus credentials
eebus:
# uri: # :4712
# interfaces: # limit eebus to specific network interfaces
# - en0
# certificate: # local signed certificate, required, can be generated via `evcc eebus-cert`
# public: # public key
# private: # private key
# push messages
messaging:
events:
start: # charge start event
title: Charge started
msg: Started charging in "${mode}" mode
stop: # charge stop event
title: Charge finished
msg: Finished charging ${chargedEnergy:%.1fk}kWh in ${chargeDuration}.
connect: # vehicle connect event
title: Car connected
msg: "Car connected at ${pvPower:%.1fk}kW PV"
disconnect: # vehicle connected event
title: Car disconnected
msg: Car disconnected after ${connectedDuration}
soc: # vehicle soc update event
title: Soc updated
msg: Battery charged to ${vehicleSoc:%.0f}%
guest: # vehicle could not be identified
title: Unknown vehicle
msg: Unknown vehicle, guest connected?
services:
# - type: pushover
# app: # app id
# recipients:
# - # list of recipient ids
# - type: telegram
# token: # bot id
# chats:
# - # list of chat ids
# - type: email
# uri: smtp://<user>:<password>@<host>:<port>/?fromAddress=<from>&toAddresses=<to>
# - type: ntfy
# uri: https://<host>/<topics>
# priority: <priority>
# tags: <tags>
Log details
Using config file: /config/evcc.yaml
starting evcc: 'EVCC_DATABASE_DSN=/data/evcc.db evcc --config /config/evcc.yaml'
[main ] INFO 2025/01/20 12:52:17 evcc 0.133.0
[main ] INFO 2025/01/20 12:52:17 using config file: /config/evcc.yaml
[main ] INFO 2025/01/20 12:52:17 listening at :7070
[main ] ERROR 2025/01/20 12:52:20 creating vehicle Tesla_Model_Y failed: cannot create vehicle type 'template': cannot create vehicle type 'tesla': cannot get vehicles: 403 Forbidden
[main ] ERROR 2025/01/20 12:52:20 creating vehicle Tesla_Model_3 failed: cannot create vehicle type 'template': cannot create vehicle type 'tesla': cannot get vehicles: 403 Forbidden
[site ] WARN 2025/01/20 12:52:21 vehicle 'Tesla Model 3' does not support automatic detection
[site ] WARN 2025/01/20 12:52:21 vehicle 'Tesla Model Y' does not support automatic detection
[site ] INFO 2025/01/20 12:52:21 site config:
[site ] INFO 2025/01/20 12:52:21 meters: grid ✓ pv ✓ battery ✓
[site ] INFO 2025/01/20 12:52:21 grid: power ✓ energy ✗ currents ✗
[site ] INFO 2025/01/20 12:52:21 pv 1: power ✓ energy ✓ currents ✗
[site ] INFO 2025/01/20 12:52:21 battery 1: power ✓ energy ✗ currents ✗ soc ✓ capacity ✓
[site ] INFO 2025/01/20 12:52:21 vehicles:
[site ] INFO 2025/01/20 12:52:21 vehicle 1: range ✗ finish ✗ status ✗ climate ✗ wakeup ✗
[site ] INFO 2025/01/20 12:52:21 vehicle 2: range ✗ finish ✗ status ✗ climate ✗ wakeup ✗
[lp-1 ] INFO 2025/01/20 12:52:21 loadpoint 1:
[lp-1 ] INFO 2025/01/20 12:52:21 mode: now
[lp-1 ] INFO 2025/01/20 12:52:21 charger: power ✓ energy ✗ currents ✓ phases ✗ wakeup ✗
[lp-1 ] INFO 2025/01/20 12:52:21 meters: charge ✓
[lp-1 ] INFO 2025/01/20 12:52:21 charge: power ✓ energy ✗ currents ✓
[lp-2 ] INFO 2025/01/20 12:52:21 loadpoint 2:
[lp-2 ] INFO 2025/01/20 12:52:21 mode: now
[lp-2 ] INFO 2025/01/20 12:52:21 charger: power ✓ energy ✗ currents ✓ phases ✗ wakeup ✗
[lp-2 ] INFO 2025/01/20 12:52:21 meters: charge ✓
[lp-2 ] INFO 2025/01/20 12:52:21 charge: power ✓ energy ✗ currents ✓
[site ] DEBUG 2025/01/20 12:52:21 set buffer soc: 100
[site ] DEBUG 2025/01/20 12:52:21 set buffer start soc: 0
[site ] DEBUG 2025/01/20 12:52:21 set priority soc: 100
[site ] DEBUG 2025/01/20 12:52:21 set battery discharge control: false
[site ] DEBUG 2025/01/20 12:52:21 set grid charge limit: 0.3
[lp-1 ] DEBUG 2025/01/20 12:52:21 set smart cost limit: 0.2
[lp-1 ] DEBUG 2025/01/20 12:52:21 phase timer inactive
[lp-1 ] DEBUG 2025/01/20 12:52:21 pv timer inactive
[lp-2 ] DEBUG 2025/01/20 12:52:21 set smart cost limit: 0.2
[lp-2 ] DEBUG 2025/01/20 12:52:21 phase timer inactive
[lp-2 ] DEBUG 2025/01/20 12:52:21 pv timer inactive
[site ] DEBUG 2025/01/20 12:52:21 ----
[lp-2 ] DEBUG 2025/01/20 12:52:21 charge power: 0W
[lp-2 ] DEBUG 2025/01/20 12:52:21 charge currents: [0.2 0 0.2]A
[lp-1 ] DEBUG 2025/01/20 12:52:21 charge power: 0W
[lp-1 ] DEBUG 2025/01/20 12:52:21 charge currents: [0.4 0.1 0.5]A
[site ] DEBUG 2025/01/20 12:52:21 battery 1 power: 0W
[site ] DEBUG 2025/01/20 12:52:21 battery 1 soc: 100%
[site ] DEBUG 2025/01/20 12:52:21 pv 1 power: 2000W
[site ] ERROR 2025/01/20 12:52:21 grid power: API call to https://xxx/api/login/Basic returned unexpected status code 429 ("{\"code\":429,\"error\":\"Api Limit reached for this endpoint\",\"message\":\"API Limit Reached\"}")
[site ] DEBUG 2025/01/20 12:52:51 ----
[lp-1 ] DEBUG 2025/01/20 12:52:51 charge power: 0W
[lp-1 ] DEBUG 2025/01/20 12:52:51 charge currents: [0.4 0.1 0.5]A
[lp-2 ] DEBUG 2025/01/20 12:52:51 charge power: 0W
[lp-2 ] DEBUG 2025/01/20 12:52:51 charge currents: [0.2 0 0.2]A
[site ] DEBUG 2025/01/20 12:52:52 battery 1 power: 10W
[site ] DEBUG 2025/01/20 12:52:52 pv 1 power: 1963W
[site ] DEBUG 2025/01/20 12:52:52 battery 1 soc: 100%
[site ] DEBUG 2025/01/20 12:52:52 grid power: -1428W
[site ] DEBUG 2025/01/20 12:52:52 site power: -1318W
[lp-2 ] DEBUG 2025/01/20 12:52:52 charge voltages: [2 0 4.6]V
[lp-2 ] DEBUG 2025/01/20 12:52:52 charger status: A
[lp-2 ] INFO 2025/01/20 12:52:52 car disconnected
[lp-2 ] DEBUG 2025/01/20 12:52:52 set battery boost: false
[lp-2 ] DEBUG 2025/01/20 12:52:52 set session soc limit: 0
[lp-2 ] DEBUG 2025/01/20 12:52:52 set session energy limit: 0
What type of operating system or environment does evcc run on?
HomeAssistant Add-on
Nightly build
- [x] I have verified that the issue is reproducible with the latest nightly build
Version
No response
API Limit Reached
Die Meldung spricht für sich selbst.
Bekommt man den weg
Einfach warten. Bzgl. Tesla fehlt ein trace log.
Reicht das Trace so aus ?
[tesla ] TRACE 2025/01/20 14:10:52 GET https://fleet-api.prd.na.vn.cloud.tesla.com/api/1/users/region [tesla ] TRACE 2025/01/20 14:10:52 GET https://fleet-api.prd.na.vn.cloud.tesla.com/api/1/users/region [tesla ] TRACE 2025/01/20 14:10:53 {"response":{"region":"eu","fleet_api_base_url":"https://fleet-api.prd.eu.vn.cloud.tesla.com"}} [tesla ] TRACE 2025/01/20 14:10:53 GET https://fleet-api.prd.eu.vn.cloud.tesla.com/api/1/vehicles [tesla ] TRACE 2025/01/20 14:10:53 {"response":{"region":"eu","fleet_api_base_url":"https://fleet-api.prd.eu.vn.cloud.tesla.com"}} [tesla ] TRACE 2025/01/20 14:10:53 GET https://fleet-api.prd.eu.vn.cloud.tesla.com/api/1/vehicles [tesla ] TRACE 2025/01/20 14:10:53 {"response":null,"error":"Unauthorized missing scopes","error_description":"","txid":"xxx"} [tesla ] TRACE 2025/01/20 14:10:53 {"response":null,"error":"Unauthorized missing scopes","error_description":"","txid":"xxx"}
Fehlermeldung lesen und verstehen:
Unauthorized missing scopes
Das ist eindeutig.
Hallo, ich habe auch die Fehlermeldung Unauthorized missing scopes. Für was ist das eindeutig? Ich habe mich auch an die Anleitung gehalten. Danke für einen Hinweis.
Es fehlen Scopes- da hast du nixht alle notwendigen ausgewählt.
Ich hab es heute nicht getestet. Aber es sieht so aus also ob es einen Tag dauert bis es sauber synchronisiert ist. Sieht zumindest heute anders aus und ich hab mehr zur Auswahl bei den Funktionen. Ich teste es morgen nochmal.
So, heute funktioniert's nun. Danke an alle für die hilfreichen Informationen.
Am 21.01.2025 um 20:41 schrieb Dragonkit @.***>:
Ich hab es heute nicht getestet. Aber es sieht so aus also ob es einen Tag dauert bis es sauber synchronisiert ist. Sieht zumindest heute anders aus und ich hab mehr zur Auswahl bei den Funktionen. Ich teste es morgen nochmal.
— Reply to this email directly, view it on GitHub https://github.com/evcc-io/evcc/issues/18309#issuecomment-2605589606, or unsubscribe https://github.com/notifications/unsubscribe-auth/AXLBLP6S6MNCHXFO5XIECJT2L2PGJAVCNFSM6AAAAABVQHDBM2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDMMBVGU4DSNRQGY. You are receiving this because you commented.
Bei mir gehts heute auch mit den Autos. Muss ich bei der Powerwall auch was umstellen oder kann das so bleiben wie es war ? Finde da nichts neues in der Doku. Würde es also erstmal so lassen wie es ist und funktioniert.