evcc icon indicating copy to clipboard operation
evcc copied to clipboard

grünstromindex Error 429 oo Many Requests - again (new issue)

Open silent-pc opened this issue 1 year ago • 8 comments

Describe the bug

planner: tariff not available: cannot create tariff type 'grünstromindex': unexpected status: 429 (Too Many Requests)

after update from v0.200.9 to v0.203.1

grünstromindex fail again. Log-Requests to grünstromindex are every 30 seconds (more as 1000, so blocked). with v0.200.9 whas whis fine. what changed between?

i actualy only use the config file evcc.yaml

any hints?

Steps to reproduce

only update from v0.200.9 to v0.203.1 apt update apt dist-upgrade

Configuration details

on a raspberry-pi 400 
ubuntu server (minimized) 24.02.2 installation

evcc.yaml:


# open evcc at http://evcc.local:7070

# LASTMANAGEMENT:
circuits:
  - name: main # eindeutiger Name, wird als Referenz für andere Circuits verwendet
    title: Hauptstromkreis # Anzeige in der UI (später)
    maxCurrent: 20         # 16A (optional)
    maxPower: 13080        # 11040 = 11,040kW (optional)
    meter: grid1           # optional

interval: 30s # control cycle interval

vehicles:
  - name: guest_vehicle
    type: template # generic
    template: offline
    title: 'Gast Fahrzeug'
    phases: 3      # Standardmäßig 3-phasiges Laden
    mincurrent: 6  # minimale Lade-Stromstärke in Ampere  ( 6 A * 1 Phase  * 230 V =  1,380 kW)
    maxCurrent: 20 # maximaler Lade-Stromstärke in Ampere (20 A * 3 Phasen * 230 V = 13,800 kW)

  - name: ora_03
    title: 'ORA 03 300 Pro'
    type: template # generic
    template: offline
    capacity: 47.8 # Brutto - Akkukapazität in kWh (45.4 Netto)
    phases: 3      # Anzahl der Phasen
    mincurrent: 6  # minimale Lade-Stromstärke in Ampere  ( 6 A * 1 Phase  * 230 V =  1,380 kW)
    maxCurrent: 16 # maximaler Lade-Stromstärke in Ampere (16 A * 3 Phasen * 230 V = 11,040 kW)
    icon: car

#   Geht bei unbekannten 'offline' Fahrzeugen nicht - oder hier ungültig (bei vehicles).
#    range: 230     # Reichweite in km
#    maxSoc: 100    # 100 %
#    powerLimit: 11 # Maximaler LadeLeistungswert in (kW)

tariffs:
  co2:
    type: grünstromindex # Grünstromindex
    zip: '07768'  # PLZ

  currency: EUR
  grid:
    type: fixed
    price: 0.2662 # Euro/kWh - Preis vom Netzanbieter (bis 23.03.2025, 0,2227, ab dem 24.03.2025 0,2662)
  feedin:
    type: fixed
    price: 0.2443 # Euro/kWh - Preis für die Einspeisung

  solar:
    type: template
    template: forecast-solar # alternativ: open-meteo (https://open-meteo.com)
    lat: 50.8090 # Latitude (Breitengrad)
    lon: 11.5854 # Longtitude (Längengrad)
    dec: 38 # Winkel
    az: 0 # -180 = north, -90 = east, 0 = south, 90 = west, 180 = north
    kwp: 11.03
#    intervall: 1h       # Geht aktuell nicht (nicht aktivieren)! Geht vielleicht nur mit open-meteo.
#    apikey: # optional  # Kostenpflichtiger API-Key (nach Plan) - nicht aktivieren.
#    Hinweis: Für open-meteo gäbe es noch weitere Optionen siehe Doku: https://docs.evcc.io/docs/tariffs

network:
  schema: http
  host: 0.0.0.0 # evcc.local (Standard/geändert in 0.0.0.0 Zugriff von überall aus dem Netz) .local suffix announces the hostname on MDNS
  port: 7070

log: debug
levels:
  cache: error

# unique installation id
plant: 59ef282c7d50b82bXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX3ebf18671


meters:
- type: template
  template: victron-energy 
  usage: grid  
  host: 192.168.0.30  
  port: 502  
  meterid: 30  
  name: grid1

- type: template
  template: victron-energy 
  usage: battery  
  host: 192.168.0.30  
  port: 502  
  meterid: 512  
  name: battery3
  capacity: 16.872 # Akku Netto
  minsoc: 10 # Untere Grenze beim Entladen der Batterie (normaler Betrieb). (optional)

# Shelly Shelly Pro EM 50 - nur erster Messpunkt - nur Phase 1 wird genutzt.
- name: pv1
  type: custom
  power:
    source: http
    uri: http://192.168.0.31/rpc/Shelly.GetStatus
    jq: '.["em1:0"].act_power * -1'
  energy:
    source: http
    uri: http://192.168.0.31/rpc/Shelly.GetStatus
    jq: '.["em1data:0"].total_act_energy'
    scale: 0.001
  capacity: 5035  # 5,035 kWp-Anlage

chargers:
- type: template
  template: tinkerforge-warp3 
  host: 192.168.0.37  
  port: 1883  
  topic: warp3/2cJv  
  timeout: 30s  
  name: wallbox6

loadpoints:
- title: Wallbox
  charger: wallbox6
  mode: off # off = Laden standardmäßig deaktiviert, now = sofort ladem mit, maximaler Leistung, minpv = sofort laden mit minimaler Leistung, schneller nur wenn genug PV-Überschuss, pv = nur mit PV-Überschuss laden
#  maxCurrent: 20 # Hier den maximalen Ladestrom in A setzen (deprecated)
  vehicle: ora_03 # Standard-Fahrzeug hier festlegen.

site:
  title: Zuhause
  meters:
    grid: grid1           # Netzzähler
    pv: 
    - pv1                 # PV Shelly Shelly Pro EM 50 (nur Dach/SMA)
    battery:
    - battery3            # Akku (Batteriespeicher)
  residualPower: 0 # <<-- Mindestleistung in W die nicht für das Laden verwendet wird.
                   # Wenn man verhindern will, dass EVCC den gesamten PV-Überschuss nutzt und kurzfristige Schwankungen (z. B. Kühlschrank oder Wärmepumpe) eine Netz-Einspeisung verursachen.
                   # Da die Victron-Anlage reagiert extrem schnell (im Millisekunden-Bereich) auf Laständerungen.
                   # Und Überschüsse werden nicht ins Netz eingespeist werden, sondern von deinem Batteriespeicher aufgenommen werden.
                   # Und Mehrbedarf ebenfalls direkt aus der Batterie gedeckt, nicht also aus dem Netz bezogen wird hier den Wert auf 0 setzen.
                   # Hier daher 0, Sonst sind Werte von 100-200 Sinnvoll.

Log details

...
[site  ] DEBUG 2025/04/22 10:37:52 ----
[site  ] WARN 2025/04/22 10:37:52 planner: tariff not available: cannot create tariff type 'grünstromindex': unexpected status: 429 (Too Many Requests)
[lp-1  ] DEBUG 2025/04/22 10:37:52 charge power: 0W
[lp-1  ] DEBUG 2025/04/22 10:37:52 charge currents: [0 0 0]A
[site  ] DEBUG 2025/04/22 10:37:52 battery 1 power: -1039W
[site  ] DEBUG 2025/04/22 10:37:52 pv 1 power: 730W
[site  ] DEBUG 2025/04/22 10:37:52 grid power: 10W
[site  ] DEBUG 2025/04/22 10:37:52 battery 1 soc: 76%
[site  ] DEBUG 2025/04/22 10:37:52 grid currents: [2.3 -1.1 -1.3]A
[site  ] DEBUG 2025/04/22 10:37:52 site power: -1029W
[lp-1  ] DEBUG 2025/04/22 10:37:52 charge total import: 284.970kWh
[lp-1  ] DEBUG 2025/04/22 10:37:52 charger status: A
[site  ] DEBUG 2025/04/22 10:37:52 solar forecast: accumulated 1.469kWh, produced 0.000kWh, scale 0.000
[site  ] DEBUG 2025/04/22 10:38:22 ----
[site  ] WARN 2025/04/22 10:38:22 planner: tariff not available: cannot create tariff type 'grünstromindex': unexpected status: 429 (Too Many Requests)
[lp-1  ] DEBUG 2025/04/22 10:38:22 charge power: 0W
[lp-1  ] DEBUG 2025/04/22 10:38:22 charge currents: [0 0 0]A
[site  ] DEBUG 2025/04/22 10:38:22 battery 1 power: -1014W
[site  ] DEBUG 2025/04/22 10:38:22 grid power: 3W
[site  ] DEBUG 2025/04/22 10:38:22 pv 1 power: 718W
[site  ] DEBUG 2025/04/22 10:38:22 battery 1 soc: 76%
[site  ] DEBUG 2025/04/22 10:38:22 grid currents: [2.4 -1.1 -1.3]A
[site  ] DEBUG 2025/04/22 10:38:22 site power: -1011W
[lp-1  ] DEBUG 2025/04/22 10:38:22 charge total import: 284.970kWh
[lp-1  ] DEBUG 2025/04/22 10:38:22 charger status: A
[site  ] DEBUG 2025/04/22 10:38:22 solar forecast: accumulated 1.486kWh, produced 0.000kWh, scale 0.000
[site  ] DEBUG 2025/04/22 10:38:52 ----
[site  ] WARN 2025/04/22 10:38:52 planner: tariff not available: cannot create tariff type 'grünstromindex': unexpected status: 429 (Too Many Requests)
[lp-1  ] DEBUG 2025/04/22 10:38:52 charge power: 0W
[lp-1  ] DEBUG 2025/04/22 10:38:52 charge currents: [0 0 0]A
[site  ] DEBUG 2025/04/22 10:38:52 battery 1 power: -984W
[site  ] DEBUG 2025/04/22 10:38:52 pv 1 power: 695W
[site  ] DEBUG 2025/04/22 10:38:52 grid power: -15W
[site  ] DEBUG 2025/04/22 10:38:52 battery 1 soc: 76%
[site  ] DEBUG 2025/04/22 10:38:52 grid currents: [2.2 -1.1 -1.3]A
[site  ] DEBUG 2025/04/22 10:38:52 site power: -999W
[lp-1  ] DEBUG 2025/04/22 10:38:52 charge total import: 284.970kWh
[lp-1  ] DEBUG 2025/04/22 10:38:52 charger status: A
[site  ] DEBUG 2025/04/22 10:38:52 solar forecast: accumulated 1.503kWh, produced 0.000kWh, scale 0.000
[site  ] DEBUG 2025/04/22 10:39:22 ----
[site  ] WARN 2025/04/22 10:39:22 planner: tariff not available: cannot create tariff type 'grünstromindex': unexpected status: 429 (Too Many Requests)
[lp-1  ] DEBUG 2025/04/22 10:39:22 charge power: 0W
[lp-1  ] DEBUG 2025/04/22 10:39:22 charge currents: [0 0 0]A
[site  ] DEBUG 2025/04/22 10:39:22 battery 1 power: -944W
[site  ] DEBUG 2025/04/22 10:39:22 pv 1 power: 675W
[site  ] DEBUG 2025/04/22 10:39:22 grid power: 10W
[site  ] DEBUG 2025/04/22 10:39:22 battery 1 soc: 76%
[site  ] DEBUG 2025/04/22 10:39:22 grid currents: [2.1 -1.1 -1.3]A
[site  ] DEBUG 2025/04/22 10:39:22 site power: -934W
[lp-1  ] DEBUG 2025/04/22 10:39:22 charge total import: 284.970kWh
[lp-1  ] DEBUG 2025/04/22 10:39:22 charger status: A
[site  ] DEBUG 2025/04/22 10:39:22 solar forecast: accumulated 1.520kWh, produced 0.000kWh, scale 0.000
[site  ] DEBUG 2025/04/22 10:39:52 ----
[site  ] WARN 2025/04/22 10:39:52 planner: tariff not available: cannot create tariff type 'grünstromindex': unexpected status: 429 (Too Many Requests)
[lp-1  ] DEBUG 2025/04/22 10:39:52 charge power: 0W
[lp-1  ] DEBUG 2025/04/22 10:39:52 charge currents: [0 0 0]A
[site  ] DEBUG 2025/04/22 10:39:52 battery 1 power: -914W
[site  ] DEBUG 2025/04/22 10:39:52 pv 1 power: 658W
[site  ] DEBUG 2025/04/22 10:39:52 grid power: 1W
[site  ] DEBUG 2025/04/22 10:39:52 battery 1 soc: 76%
[site  ] DEBUG 2025/04/22 10:39:52 grid currents: [2.1 -1.1 -1.3]A
[site  ] DEBUG 2025/04/22 10:39:52 site power: -913W
[lp-1  ] DEBUG 2025/04/22 10:39:52 charge total import: 284.970kWh
[lp-1  ] DEBUG 2025/04/22 10:39:52 charger status: A
[site  ] DEBUG 2025/04/22 10:39:52 solar forecast: accumulated 1.537kWh, produced 0.000kWh, scale 0.000
...

What type of operating system or environment does evcc run on?

Linux

External automation

  • [x] I have made sure that no external automation like HomeAssistant or Node-RED is active or accessing any of the mentioned devices when this issue occurs.

Nightly build

  • [x] I have verified that the issue is reproducible with the latest nightly build

Version

evcc version 0.203.1

silent-pc avatar Apr 22 '25 08:04 silent-pc

Unfortunately your report is missing a detailed log file. Without log, we don‘t have the information for diagnosing the issue described. See https://docs.evcc.io/docs/faq#wie-kann-ich-ein-logfile-zur-fehleranalyse-erstellen.

andig avatar Apr 22 '25 08:04 andig

Log-Requests to grünstromindex are every 30 seconds

Can you please share the Log showing this?

andig avatar Apr 22 '25 08:04 andig

to info: i have roll back to version v0.200.9 and there are all fine. i have mad no other changes on the config.

only: apt update apt dist-upgrade

... cause the error in the new version v0.203.1 versions beteen v0.200.9 and v 0.203.1 (jet currenr) i havent tested.

i made always backups bevor i update. so i can send you logs with new version if you wish. i switch always between the versions (backup and live) with 2 microsd cards so that i can return to other versions. and also i held som images on pc.

the new version works (i think), but the error:

planner: tariff not available: cannot create tariff type 'grünstromindex': unexpected status: 429 (Too Many Requests)

... repeats every 30 secons and in the gui was the warning icon (to the logs).

im short away.

silent-pc avatar Apr 22 '25 09:04 silent-pc

It just repeats the error but does not make additional requests.

andig avatar Apr 22 '25 09:04 andig

I just wanted to create logfiles with the new v0.203.1 and realized that everything works now. The exact cause is not clear to me. I have definitely restarted the server on which evcc is running and I would actually rule out browser caches (although that would also be possible). The evcc system hangs behind a normal vdsl-router which has no other large firewall or similar. Are the requests to grünstromindex marked somehow during the request? I had started an old version for a short time before for test reasons. Did this possibly block my access? I suspect that was the reason. That the blockade lasted a little longer.

It seems to be working now and I would like to thank you for your work. The thread can be marked as solved if I don't get back to you in the next 1-2 days.

Translated with DeepL.com (free version)

silent-pc avatar Apr 22 '25 11:04 silent-pc

Maybe not fully related, but in the response they say that without token it is deprecated:

{"err":true,"message":"invalid zipcode","input":{},"provisioning":{"warning":"Deprecation of usage without token! Get your token at https://console.corrently.io/ .","source":"CloudFlare-IP","license":"CC BY-NC-SA 4.0 ( https://creativecommons.org/licenses/by-nc-sa/4.0/legalcode.en )","tier":"authenticated","info":"Anonmous access"}}

(result when fetching from https://api.corrently.io/v2.0/gsi/prediction, sure, you can also give a zip code (e.g. https://api.corrently.io/v2.0/gsi/prediction?zip=10178), then you also get this warning)

When calling the address in the browser I get a reply, but with this deprecation warning. But in evcc it told me that it is always error 503 (service not available). I have added for now the free token, it is working fine for now. But the free token is only valid for two months. I don't want to change the token every 2 months...

Maybe the doc should be updated, that the token is no longer optional.

sicheste avatar Apr 26 '25 11:04 sicheste

We are using a token…

andig avatar Apr 26 '25 14:04 andig

What do you mean with we? The development team or evcc as software? In the config the token is optional. I have not checked the code, whether the software is fetching a token which is used later.

sicheste avatar Apr 28 '25 05:04 sicheste