nachdem deaktivieren eines Ladepunktes bekomme ich eine Fehlermeldung
Description
Nachdem deaktivieren eines Ladepunktes und dem dann erfolgten Neustart sind ALLE Ladpunkte unter der Konfiguration verschwunden. In der Hauptansicht sind sie allerdings noch vorhanden.
Ich bekomme folgenden Fehlermeldung oben rechts angezeigt:
decoding failed due to the following error(s): 'loadpoint.StaticConfig' has invalid keys: mode. GET http://evcc/api/config/loadpoints
Steps to Reproduce
- in der WebUI einen Ladepunkt deaktivieren
- einen Neustart durchführen
⚠️ RETURN TO EVCC TAB → COPY STEP 2 → PASTE HERE
Version
v0.314.0
System
linux/amd64, CEST +02:00
Configuration (UI)
{
"charger": [
{"id":9,"name":"db:9","type":"template","config":{"id":180,"template":"phoenix-em-eth","baudrate":9600,"comset":"8N1","host":"192.168.20.151","modbus":"tcpip","port":502},"deviceDisable":true,"deviceProduct":"Phoenix Contact EM-CP-PP-ETH"},
{"id":16,"name":"db:16","type":"template","config":{"id":1,"template":"e3dc-rscp","host":"192.168.20.150","key":"***","password":"***","port":"5033","user":"***"},"deviceProduct":"E3/DC Multi Connect II Wallbox"},
{"id":4,"name":"db:4","type":"template","config":{"id":"0","template":"e3dc-rscp","host":"192.168.20.150","key":"***","password":"***","port":"5033","user":"***"},"deviceProduct":"E3/DC Multi Connect II Wallbox"}
],
"experimental": true,
"influx": {"database":"","insecure":false,"org":"","password":"","token":"","url":"","user":""},
"interval": 15,
"messenger": [],
"meter": [
{"id":11,"name":"db:11","type":"custom","config":{"yaml":"## E3DC CanBus Zähler ID 104 (Wärmepumpe)
## Modbus Register Adressen -1 (für 40144 muss 40133 eingetragen werden)
power: # current power
source: calc
add:
- source: modbus
uri: 192.168.20.150
id: 1
register:
address: 40161
type: holding
decode: int32s
- source: modbus
uri: 192.168.20.150
id: 1
register:
address: 40163
type: holding
decode: int32s
- source: modbus
uri: 192.168.20.150
id: 1
register:
address: 40165
type: holding
decode: int32s"},"deviceIcon":"waterheater","deviceTitle":"Wärmepumpe"},
{"id":6,"name":"db:6","type":"template","config":{"template":"e3dc-rscp","capacity":38,"externalpower":"true","host":"192.168.20.150","key":"***","maxacpower":"0","maxdischargepower":12000,"maxsoc":100,"minsoc":20,"password":"***","port":"5033","usage":"battery","user":"***"},"deviceProduct":"E3/DC","deviceTitle":"Akku E3DC"},
{"id":7,"name":"db:7","type":"template","config":{"template":"e3dc-rscp","externalpower":true,"host":"192.168.20.150","key":"***","maxacpower":"0","password":"***","port":"5033","usage":"pv","user":"***"},"deviceProduct":"E3/DC","deviceTitle":"PV E3DC"},
{"id":8,"name":"db:8","type":"template","config":{"template":"e3dc-rscp","externalpower":"true","host":"192.168.20.150","key":"***","maxacpower":"0","password":"***","port":"5033","usage":"grid","user":"***"},"deviceProduct":"E3/DC"}
],
"mqtt": {"broker":"wss://mqtt.evcc-crowdscience.de","caCert":"","clientCert":"","clientID":"","clientKey":"","insecure":false,"password":"","topic":"evcc/019d7bfc-09d6-7000-a7bb-b243c0e844f7","user":""},
"residualPower": 100,
"shm": {"deviceId":"","deviceSerial":"","vendorId":""},
"site": {"aux":null,"battery":["db:6"],"consumer":null,"ext":["db:11"],"grid":"db:8","pv":["db:7"],"title":"M. Heinrich - Ostlandstraße"},
"tariff": [
{"id":20,"name":"db:20","type":"template","config":{"template":"grünstromindex","zip":"***"},"deviceProduct":"Grünstromindex"},
{"id":19,"name":"db:19","type":"template","config":{"template":"dwd-temperature","interval":"1h","lat":"***","lon":"***"},"deviceProduct":"DWD (Bright Sky) Temperature"}
],
"tariffRefs": {"co2":"db:20","feedIn":"","grid":"","planner":"","solar":[],"temperature":"db:19"},
"vehicle": [
{"id":15,"name":"db:15","type":"template","config":{"template":"offline","capacity":21,"coarsecurrent":true,"icon":"car","identifiers":["042BCD5ABA4880"],"phases":"1","priority":0,"title":"VW eGolf","welcomecharge":false},"deviceProduct":"Generisches Fahrzeug (ohne API)"},
{"id":18,"name":"db:18","type":"template","config":{"template":"offline","capacity":36,"coarsecurrent":true,"icon":"car","identifiers":["04A0D55ABA4880"],"phases":"2","priority":0,"title":"SEAT Mii electric","welcomecharge":false},"deviceProduct":"Generisches Fahrzeug (ohne API)"}
]
}
Thanks for the detailed report and config dump — that was enough to pin this down.
Root cause: changing the charge mode on the dashboard persists the key mode directly into the loadpoint's stored config (Other map), via the same settings adapter used for the config database. When a loadpoint is disabled and evcc restarts, GET /api/config/loadpoints reads that loadpoint's config by strictly decoding the stored map into loadpoint.StaticConfig/DynamicConfig (core/loadpoint/config.go, server/http_config_loadpoint_handler.go). Neither struct had a field for the stray mode key (only defaultMode), so the decode failed with the exact error you saw. Since the endpoint aborts the whole list on the first error, all loadpoints vanished from the config UI, even though they were unaffected otherwise — that's consistent with the main dashboard still showing them fine (it doesn't go through this decode path).
This is the same class of bug fixed for minSoc in #31819.
Fix: #32880 adds Mode to loadpoint.DynamicConfig so the persisted mode key round-trips correctly instead of leaking into the static config map.
🤖 Generated with Claude Code
"Workaround" until fix released: delete the affected loadpoint via the API and reboot evcc
"Workaround" until fix released: delete the affected loadpoint via the API and reboot evcc
Yes that should work. I have revert to the previous version incl. database restore.