Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

UI: Anzeige Ladestand "---" durch "vehicle soc: timeout" weil API (veraltete) Daten liefert #13899

Closed
An-Wi opened this issue May 14, 2024 · 4 comments
Labels
wontfix This will not be worked on

Comments

@An-Wi
Copy link

An-Wi commented May 14, 2024

Describe the bug

Das eigentliche Problem scheint zu sein, dass die NISSAN-API gern mal abends (ab ca. 18:00:00Z) keine aktuellen Daten mehr liefert.
Da mein evcc-Server 1x pro Woche (montags, 22:00 Uhr) per Taskplaner neu startet, entsteht dabei folgende Situation:
evcc-UI zeigt danach keinen Ladestand ("---") und keine Reichweite mehr an.

Theoretisch soweit korrekt, allerdings etwas verwirrend, da ohne Neustart das "Problem" nicht sichtbar geworden wäre.
Momentan habe ich aber auch keine richtige Idee, wie evcc damit anders umgehen sollte, es schien nur so (bevor ich die Logs studiert hatte) als wäre die NISSAN-API gar nicht mehr erreichbar gewesen, was hin und wieder durch das mehrfach notwendige Login auch gelegentlich auftritt (eine Eigenart der API, die bereits im Code ausreichend gut behandelt ist).

Vielleicht sollte generell ein "veralteter" SOC-Wert visualisiert werden, wenn sein timestamp eine bestimmte Zeitgrenze überschreitet?

Steps to reproduce

  1. Logs checken, bis "timestamp" von "[nissan] TRACE" einfriert
  2. evcc neu starten
  3. UI zeigt "---" beim Ladestand an

Configuration details

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

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: evcc.local
  # port is the listening port for UI and api
  # evcc will listen on all available interfaces
  port: 7070

interval: 20s   #25s #30s # control cycle interval

[...]

# 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: ev1
    type: template
    #template: nissan 
    template: nissan-ariya
    title: Ariya 
    capacity: 87  # kWh
    cache: 5m   #default: 15m

[...]

Log details

[site  ] DEBUG 2024/05/12 06:49:44 ----
[lp-1  ] DEBUG 2024/05/12 06:49:44 charge power: 4048W
[lp-1  ] DEBUG 2024/05/12 06:49:44 charge currents: [5.72 5.7 5.73]A
[site  ] DEBUG 2024/05/12 06:49:44 pv power: 533W
[site  ] DEBUG 2024/05/12 06:49:44 grid meter: 3660W
[site  ] DEBUG 2024/05/12 06:49:44 grid currents: [5.21 5.11 5.29]A
[site  ] DEBUG 2024/05/12 06:49:44 site power: 3560W
[lp-1  ] DEBUG 2024/05/12 06:49:44 detected active phases: 3p
[lp-1  ] DEBUG 2024/05/12 06:49:44 charge total import: 4556.084kWh
[lp-1  ] DEBUG 2024/05/12 06:49:44 charger status: C
[nissan] TRACE 2024/05/12 06:49:44 GET https://alliance-platform-caradapter-prod.apps.eu2.kamereon.io/car-adapter/v2/cars/***/battery-status
[nissan] TRACE 2024/05/12 06:49:45 {"id":"***","timestamp":"2024-05-11T17:41:31Z","batteryLevel":31,"batteryAutonomy":164,"batteryCapacity":87,"batteryAvailableEnergy":28,"plugStatus":1,"chargingStatus":0.0,"chargingRemainingTime":2046}
[lp-1  ] WARN 2024/05/12 06:49:45 vehicle soc: timeout (ignored by estimator)
[lp-1  ] DEBUG 2024/05/12 06:49:45 soc estimated: 32.14% (vehicle: 31.00%)
[lp-1  ] DEBUG 2024/05/12 06:49:45 vehicle soc: 32%
[lp-1  ] ERROR 2024/05/12 06:49:45 vehicle range: timeout
[lp-1  ] DEBUG 2024/05/12 06:49:45 plan: charge 12h20m30s between 2024-05-12 06:49:45 +0200 CEST until 2024-05-12 19:10:00 +0200 CEST (overruns by 15s, power: 4140W, avg cost: 0.280)
[site  ] DEBUG 2024/05/12 06:50:04 ---- 

[site  ] DEBUG 2024/05/12 10:29:44 ----
[lp-1  ] DEBUG 2024/05/12 10:29:44 charge power: 4869W
[lp-1  ] DEBUG 2024/05/12 10:29:44 charge currents: [6.92 6.86 6.88]A
[site  ] DEBUG 2024/05/12 10:29:44 pv power: 5716W
[site  ] DEBUG 2024/05/12 10:29:44 grid meter: -389W
[site  ] DEBUG 2024/05/12 10:29:44 grid currents: [1.15 1.31 1.38]A
[site  ] DEBUG 2024/05/12 10:29:44 site power: -489W
[lp-1  ] DEBUG 2024/05/12 10:29:44 detected active phases: 3p
[lp-1  ] DEBUG 2024/05/12 10:29:44 charge total import: 4571.628kWh
[lp-1  ] DEBUG 2024/05/12 10:29:44 charger status: C
[nissan] TRACE 2024/05/12 10:29:44 GET https://alliance-platform-caradapter-prod.apps.eu2.kamereon.io/car-adapter/v2/cars/***/battery-status
[nissan] TRACE 2024/05/12 10:29:45 {"id":"***","timestamp":"2024-05-12T08:28:33Z","batteryLevel":49,"batteryAutonomy":164,"batteryCapacity":87,"batteryAvailableEnergy":40,"plugStatus":1,"chargingStatus":1.0,"chargingRemainingTime":2046}
[lp-1  ] DEBUG 2024/05/12 10:29:45 vehicle status: B
[lp-1  ] DEBUG 2024/05/12 10:29:45 vehicle soc: 49%
[lp-1  ] DEBUG 2024/05/12 10:29:45 vehicle range: 164km
[lp-1  ] DEBUG 2024/05/12 10:29:45 pv charge current: 8.45A = 7.74A + 0.708A (-489W @ 3p)
[lp-1  ] DEBUG 2024/05/12 10:29:45 max charge current: 8.45A
[site  ] DEBUG 2024/05/12 10:30:04 ---- 

[...]

[site  ] DEBUG 2024/05/13 06:39:02 ----
[lp-1  ] DEBUG 2024/05/13 06:39:02 charge power: 0W
[lp-1  ] DEBUG 2024/05/13 06:39:02 charge currents: [0 0 0]A
[site  ] DEBUG 2024/05/13 06:39:02 pv power: 406W
[site  ] DEBUG 2024/05/13 06:39:02 grid meter: -159W
[site  ] DEBUG 2024/05/13 06:39:02 grid currents: [0.583 0.397 0.743]A
[site  ] DEBUG 2024/05/13 06:39:02 site power: -259W
[lp-1  ] DEBUG 2024/05/13 06:39:02 charge total import: 4605.671kWh
[lp-1  ] DEBUG 2024/05/13 06:39:02 charger status: A
[nissan] TRACE 2024/05/13 06:39:02 GET https://alliance-platform-caradapter-prod.apps.eu2.kamereon.io/car-adapter/v2/cars/***/battery-status
[nissan] TRACE 2024/05/13 06:39:02 {"id":"***","timestamp":"2024-05-12T18:14:48Z","batteryLevel":82,"batteryAutonomy":437,"batteryCapacity":87,"batteryAvailableEnergy":70,"plugStatus":0,"chargingStatus":0.0,"chargingRemainingTime":821}
[lp-1  ] WARN 2024/05/13 06:39:02 vehicle soc: timeout (ignored by estimator)
[lp-1  ] DEBUG 2024/05/13 06:39:02 soc estimated: 82.00% (vehicle: 82.00%)
[lp-1  ] DEBUG 2024/05/13 06:39:02 vehicle soc: 82%
[lp-1  ] ERROR 2024/05/13 06:39:02 vehicle range: timeout
[site  ] DEBUG 2024/05/13 06:39:22 ---- 

[site  ] DEBUG 2024/05/13 07:39:02 ----
[lp-1  ] DEBUG 2024/05/13 07:39:02 charge power: 0W
[lp-1  ] DEBUG 2024/05/13 07:39:02 charge currents: [0 0 0]A
[site  ] DEBUG 2024/05/13 07:39:02 pv power: 879W
[site  ] DEBUG 2024/05/13 07:39:03 grid meter: 34W
[site  ] DEBUG 2024/05/13 07:39:03 grid currents: [1.14 0.913 1.92]A
[site  ] DEBUG 2024/05/13 07:39:03 site power: -66W
[lp-1  ] DEBUG 2024/05/13 07:39:03 charge total import: 4605.671kWh
[lp-1  ] DEBUG 2024/05/13 07:39:03 charger status: A
[nissan] TRACE 2024/05/13 07:39:03 GET https://alliance-platform-caradapter-prod.apps.eu2.kamereon.io/car-adapter/v2/cars/***/battery-status
[nissan] TRACE 2024/05/13 07:39:03 {"id":"***","timestamp":"2024-05-13T05:38:53Z","batteryLevel":78,"batteryAutonomy":423,"batteryCapacity":87,"batteryAvailableEnergy":70,"plugStatus":0,"chargingStatus":0.0,"chargingRemainingTime":181}
[lp-1  ] DEBUG 2024/05/13 07:39:03 vehicle status: A
[lp-1  ] DEBUG 2024/05/13 07:39:03 vehicle soc: 78%
[lp-1  ] DEBUG 2024/05/13 07:39:03 vehicle range: 423km
[site  ] DEBUG 2024/05/13 07:39:22 ---- 

[...]

[site  ] DEBUG 2024/05/14 07:06:05 ----
[lp-1  ] DEBUG 2024/05/14 07:06:05 charge power: 0W
[lp-1  ] DEBUG 2024/05/14 07:06:05 charge currents: [0 0 0]A
[site  ] DEBUG 2024/05/14 07:06:05 pv power: 632W
[site  ] DEBUG 2024/05/14 07:06:06 grid meter: -452W
[site  ] DEBUG 2024/05/14 07:06:06 grid currents: [0.677 0.831 0.862]A
[site  ] DEBUG 2024/05/14 07:06:06 site power: -552W
[lp-1  ] DEBUG 2024/05/14 07:06:06 charge total import: 4605.671kWh
[lp-1  ] DEBUG 2024/05/14 07:06:06 charger status: A
[nissan] TRACE 2024/05/14 07:06:06 GET https://alliance-platform-caradapter-prod.apps.eu2.kamereon.io/car-adapter/v2/cars/***/battery-status
[nissan] TRACE 2024/05/14 07:06:06 {"id":"***","timestamp":"2024-05-13T18:45:05Z","batteryLevel":58,"batteryAutonomy":320,"batteryCapacity":87,"batteryAvailableEnergy":50,"plugStatus":0,"chargingStatus":0.0,"chargingRemainingTime":324}
[site  ] DEBUG 2024/05/14 07:06:25 ----
[lp-1  ] DEBUG 2024/05/14 07:06:25 charge power: 0W
[lp-1  ] DEBUG 2024/05/14 07:06:25 charge currents: [0 0 0]A
[site  ] DEBUG 2024/05/14 07:06:25 pv power: 632W
[site  ] DEBUG 2024/05/14 07:06:26 grid meter: -455W
[site  ] DEBUG 2024/05/14 07:06:26 grid currents: [0.729 0.869 0.884]A
[site  ] DEBUG 2024/05/14 07:06:26 site power: -555W
[lp-1  ] DEBUG 2024/05/14 07:06:26 charge total import: 4605.671kWh
[lp-1  ] DEBUG 2024/05/14 07:06:26 charger status: A
[nissan] TRACE 2024/05/14 07:06:26 GET https://alliance-platform-caradapter-prod.apps.eu2.kamereon.io/car-adapter/v2/cars/***/battery-status
[nissan] TRACE 2024/05/14 07:06:26 {"id":"***","timestamp":"2024-05-13T18:45:05Z","batteryLevel":58,"batteryAutonomy":320,"batteryCapacity":87,"batteryAvailableEnergy":50,"plugStatus":0,"chargingStatus":0.0,"chargingRemainingTime":324}
[lp-1  ] ERROR 2024/05/14 07:06:26 vehicle soc: timeout
[site  ] DEBUG 2024/05/14 07:06:45 ----
[lp-1  ] DEBUG 2024/05/14 07:06:45 charge power: 0W
[lp-1  ] DEBUG 2024/05/14 07:06:45 charge currents: [0 0 0]A
[site  ] DEBUG 2024/05/14 07:06:45 pv power: 636W
[site  ] DEBUG 2024/05/14 07:06:46 grid meter: -464W
[site  ] DEBUG 2024/05/14 07:06:46 grid currents: [0.747 0.872 0.88]A
[site  ] DEBUG 2024/05/14 07:06:46 site power: -564W
[lp-1  ] DEBUG 2024/05/14 07:06:46 charge total import: 4605.671kWh
[lp-1  ] DEBUG 2024/05/14 07:06:46 charger status: A
[lp-1  ] DEBUG 2024/05/14 07:06:46 next soc poll remaining time: 59m39s
[site  ] DEBUG 2024/05/14 07:07:05 ----

[site  ] DEBUG 2024/05/14 07:34:25 ----
[lp-1  ] DEBUG 2024/05/14 07:34:25 charge power: 0W
[lp-1  ] DEBUG 2024/05/14 07:34:25 charge currents: [0 0 0]A
[site  ] DEBUG 2024/05/14 07:34:25 pv power: 855W
[site  ] DEBUG 2024/05/14 07:34:26 grid meter: -433W
[site  ] DEBUG 2024/05/14 07:34:26 grid currents: [1.07 0.671 1.09]A
[site  ] DEBUG 2024/05/14 07:34:26 site power: -533W
[lp-1  ] DEBUG 2024/05/14 07:34:26 charge total import: 4605.671kWh
[lp-1  ] DEBUG 2024/05/14 07:34:26 charger status: A
[lp-1  ] DEBUG 2024/05/14 07:34:26 next soc poll remaining time: 31m59s
[site  ] DEBUG 2024/05/14 07:34:45 ----
[lp-1  ] DEBUG 2024/05/14 07:34:45 charge power: 0W
[lp-1  ] DEBUG 2024/05/14 07:34:45 charge currents: [0 0 0]A
[site  ] DEBUG 2024/05/14 07:34:45 pv power: 854W
[site  ] DEBUG 2024/05/14 07:34:46 grid meter: -414W
[site  ] DEBUG 2024/05/14 07:34:46 grid currents: [1.04 0.649 1.05]A
[site  ] DEBUG 2024/05/14 07:34:46 site power: -514W
[lp-1  ] DEBUG 2024/05/14 07:34:46 charge total import: 4605.671kWh
[lp-1  ] DEBUG 2024/05/14 07:34:46 charger status: A
[lp-1  ] DEBUG 2024/05/14 07:34:46 next soc poll remaining time: 31m40s
[nissan] TRACE 2024/05/14 07:34:58 GET https://alliance-platform-caradapter-prod.apps.eu2.kamereon.io/car-adapter/v2/cars/***/battery-status
[nissan] TRACE 2024/05/14 07:34:58 {"id":"***","timestamp":"2024-05-14T05:34:49Z","batteryLevel":57,"batteryAutonomy":306,"batteryCapacity":87,"batteryAvailableEnergy":50,"plugStatus":0,"chargingStatus":0.0,"chargingRemainingTime":330}
[site  ] DEBUG 2024/05/14 07:35:05 ----
[lp-1  ] DEBUG 2024/05/14 07:35:05 charge power: 0W
[lp-1  ] DEBUG 2024/05/14 07:35:05 charge currents: [0 0 0]A
[site  ] DEBUG 2024/05/14 07:35:05 pv power: 854W
[site  ] DEBUG 2024/05/14 07:35:06 grid meter: -403W
[site  ] DEBUG 2024/05/14 07:35:06 grid currents: [1.04 0.669 1.05]A
[site  ] DEBUG 2024/05/14 07:35:06 site power: -503W
[lp-1  ] DEBUG 2024/05/14 07:35:06 charge total import: 4605.671kWh
[lp-1  ] DEBUG 2024/05/14 07:35:06 charger status: A
[lp-1  ] DEBUG 2024/05/14 07:35:06 next soc poll remaining time: 31m20s
[site  ] DEBUG 2024/05/14 07:35:25 ----

What type of operating system are you running?

Windows

Version

0.126.2

@An-Wi An-Wi changed the title "vehicle soc: timeout" obwohl API (veraltete) Daten liefert UI: Anzeige Ladestand "---" durch "vehicle soc: timeout" weil API (veraltete) Daten liefert May 14, 2024
@andig
Copy link
Member

andig commented May 15, 2024

Wenns zur Laufzeit passiert sollte es zumindest einen Fehler im Log geben. Stattdessen „—„ zu setzen scheint auch keine gute Alternative zu sein. Daher wontfix?

@andig andig closed this as completed May 15, 2024
@andig andig added the wontfix This will not be worked on label May 15, 2024
@An-Wi
Copy link
Author

An-Wi commented May 17, 2024

Ok, wollte es eigentlich nicht weiter ausdehnen, da deine Einschätzung für mich ok war, aber es hat sich gestern eine neue Situation gegeben.
Die Nissan-API verweigert seit gestern früh den Zugriff (ggf. mache ich dazu noch ein eigenes Issue auf, wenn ich es nicht nur temporär sein sollte).

Durch den fehlenden Zugriff auf die Vehicle-API ist der angezeigt Akkustand von 70% bei mir über 24h alt!
Habe 1x stündliches Aktualisieren hinterlegt:
loadpoints:
soc:
poll:
mode: always
interval: 60m

Heute früh vor Ladebeginn waren es real 17%:
photo_2024-05-17_07-56-19
Beim Laden dann irgendwann etwa 25% (laut NissanConnect-App). evcc zeigte weiterhin konstant 70% an:
photo_2024-05-17_07-56-24
...mit vorausgesagter Fehlermeldung im Log (oben schön sichtbar beim Ausrufezeichen):
[lp-1 ] ERROR 2024/05/17 07:49:35 vehicle soc: Post "https://alliance-platform-caradapter-prod.apps.eu2.kamereon.io/car-adapter/v1/cars/JN***88/actions/refresh-battery-status": oauth2: "invalid_client" "Client authentication failed"

Nach Abstecken steht nun aktuell beim Ladestand "--".
Den Zustand jetzt finde ich wieder ok, aber beim Laden und davor den sehr veralteten Akkustand anzuzeigen ohne dass man erkennt, dass er gar nicht mehr passen kann, finde ich unglücklich:
"Ausgrauen", "kursiver Text", "Tooltip-Info", "Wert in Klammer setzen" oder "Disconnect-Symbol dahinter" könnten da hilfreich sein.

Das kein "estimate" beim Laden in dieser Situation erfolgt ist, finde ich gut - sollte so bleiben.

@andig
Copy link
Member

andig commented May 17, 2024

mit vorausgesagter Fehlermeldung im Log

Genau.

Den Zustand jetzt finde ich wieder ok, aber beim Laden und davor den sehr veralteten Akkustand anzuzeigen ohne dass man erkennt, dass er gar nicht mehr passen kann, finde ich unglücklich:

Jetzt wäre die Frage, ob wir den Soc bei jedem Abfragefehler wieder "nuken" sollen? Die Konsequenz wäre dann, dass z.B. Fahrzeuge mit konfiguriertem minSoc sofort wieder anfangen zu laden...

@An-Wi
Copy link
Author

An-Wi commented May 17, 2024

"nuken" musste ich erstmal nachschlagen 🤣

Den SOC würde ich nicht sofort beim 1. Abfragefehler "nuken" - denke hier sollte ein vernünftiges timeout definiert werden (1h?). Solange wir noch in diesem Intervall bleiben, soll alles laufen wie bisher.
Danach würde ich SOC als "outdated" betrachten und dann auch nur "visuell" hinweisen.

minSOC ist vermutlich hier nochmal ein Thema für sich. Wenn der veraltete SOC-Wert sehr niedrig ist und nicht mehr aktualisiert wird, dann würde die Mindestladung permanent weiterlaufen, oder?
Denke mal, dass im Status "SOC outdated" auch die Mindestladung pausieren oder gar nicht erst anfangen sollte.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
wontfix This will not be worked on
Projects
None yet
Development

No branches or pull requests

2 participants