History UI: Huge Peaks every night
Description
In History UI I get huge peaks nearly every night (always between 2 am and 3 am). Therefore, also Optimizer is not working. From time to time there are also additional peaks during the day. I'm also having the inverter in Home Assistant, here I don't see any peaks. Furthermore, in the logfile (see also attatched: inverter on trace, site on debug) I also don't see any peaks in the values for pv, battery and grid. These peaks started on the 29th of May, before that date everything was fine.
Further information: I'm using Goodwe Wifi Stick V2 with my inverter. I can't tell the exact date but it was more or less the same time I updated the stick to the newest firmware. But as HomeAssistant and also the Logfile don't show these peaks I'm not sure if this has something to do with the firmware...
Steps to Reproduce
Happens nearly every night between 2 am and 3 am and sometimes also during the day.
Configuration (UI)
{
"charger": [
{"id":1,"name":"db:1","type":"template","config":{"host":"192.168.178.13","template":"go-e-v3"},"deviceProduct":"go-e Charger Gemini"}
],
"experimental": true,
"influx": {"url":"","database":"","token":"","org":"","user":"","password":"","insecure":false},
"interval": 30,
"loadpoints": [
{"id":2,"name":"db:2","batteryBoostLimit":40,"charger":"db:1","defaultMode":"","limitEnergy":0,"limitSoc":0,"maxCurrent":16,"minCurrent":6,"phasesConfigured":0,"planEnergy":0,"planPrecondition":0,"planStrategy":{"continuous":false,"precondition":0},"planTime":"0001-01-01T00:00:00Z","priority":0,"smartCostLimit":null,"smartFeedInPriorityLimit":null,"soc":{"poll":{"mode":"charging","interval":300000000000},"estimate":true},"thresholds":{"enable":{"delay":60000000000,"threshold":0},"disable":{"delay":180000000000,"threshold":0}},"title":"Carport","vehicle":"db:12"}
],
"messenger": [
{"id":13,"name":"db:13","type":"template","config":{"host":"ntfy.sh","priority":"default","tags":["electric_plug"],"template":"ntfy","topics":["evcc_sutixp"]},"deviceProduct":"Ntfy"}
],
"meter": [
{"id":3,"name":"db:3","type":"template","config":{"battery":"1","baudrate":9600,"host":"192.168.178.8","id":247,"maxacpower":10000,"maxchargepower":"10000","maxdischargepower":"10000","maxsoc":"100","minsoc":"10","modbus":"tcpip","template":"goodwe-hybrid","usage":"pv"},"deviceProduct":"GoodWe ET/EH/BH/BT Hybrid Inverter","deviceTitle":"GW_Inverter"},
{"id":5,"name":"db:5","type":"template","config":{"battery":"1","baudrate":9600,"host":"192.168.178.8","id":247,"maxacpower":"0","maxchargepower":"10000","maxdischargepower":"10000","maxsoc":"100","minsoc":"10","modbus":"tcpip","template":"goodwe-hybrid","usage":"grid"},"deviceProduct":"GoodWe ET/EH/BH/BT Hybrid Inverter"},
{"id":4,"name":"db:4","type":"template","config":{"battery":"1","baudrate":9600,"capacity":10.6,"comset":"8N1","host":"192.168.178.8","id":247,"maxacpower":"0","maxchargepower":5000,"maxdischargepower":5000,"maxsoc":80,"minsoc":"10","modbus":"tcpip","port":502,"template":"goodwe-hybrid","usage":"battery"},"deviceProduct":"GoodWe ET/EH/BH/BT Hybrid Inverter","deviceTitle":"PylonH2_Battery"}
],
"mqtt": {"broker":"core-mosquitto:1883","user":"MQTT","password":"***","clientID":"","insecure":false,"caCert":"","clientCert":"","clientKey":"","topic":"evcc"},
"residualPower": 100,
"shm": {"vendorId":"","deviceId":"","deviceSerial":""},
"site": {"title":"Zuhause","grid":"db:5","pv":["db:3"],"battery":["db:4"],"aux":null,"ext":null},
"tariff": [
{"id":19,"name":"db:19","type":"template","config":{"price":0.26239999999999997,"template":"fixed-zones","zones":[{"days":"","hours":"","months":"mar","price":0.26239999999999997}]},"deviceProduct":"Zeitabhängiger Tarif"},
{"id":15,"name":"db:15","type":"template","config":{"price":0.0785,"template":"fixed"},"deviceProduct":"Fester Preis"},
{"id":16,"name":"db:16","type":"template","config":{"clientid":"esp_ManuelSautSutixpEvccwUQptc_001","clientsecret":"***","template":"green-grid-compass","zone":"DE_LU"},"deviceProduct":"Green Grid Compass"},
{"id":17,"name":"db:17","type":"custom","config":{"yaml":"#PV Prognose
tariff: solar
forecast:
source: mqtt
topic: ha2evcc/solcast
"},"deviceTitle":"Solcast-HA"}
],
"tariffRefs": {"grid":"db:19","feedIn":"db:15","co2":"db:16","planner":"","solar":["db:17"]},
"vehicle": [
{"id":8,"name":"db:8","type":"template","config":{"capacity":"","icon":"generic","identifiers":["Gast (grau)"],"maxCurrent":16,"minCurrent":6,"phases":"","template":"offline","title":"Gast"},"deviceProduct":"Generisches Fahrzeug (ohne API)"},
{"id":12,"name":"db:12","type":"template","config":{"capacity":58,"climater":"","icon":"car","identifiers":["Manuel (schwarz)","Jutta (orange)"],"limitSoc":"","maxCurrent":16,"maxPower":10500,"minCurrent":6,"odometer":"sensor.tronity_id_3_odometer","phases":"","range":"sensor.tronity_id_3_range","soc":"sensor.tronity_id_3_level","status":"","streaming":"true","template":"homeassistant","title":"ID.3","uri":"***","wakeup":""},"deviceProduct":"Home Assistant"}
]
}
Version
v0.309.0
System
linux/arm64, CEST +02:00
Sounds like a day production register or similar is currently mapped to the energy measurand.
Same issue here with Huawei Luna (PV production and grid consumption). Data for second plant (FoxEss Avocado) looks fine.
Edit: updated screenshot
Sounds like a day production register or similar is currently mapped to the energy measurand.
The rest of the day the values are correct
Looking at the history csv export its seems, that the peaks is always the summed up value
Na, da isses ja wieder. Schaut mal hier: #30555
Is somebody fit enough to test this solution from andig: https://github.com/evcc-io/evcc/discussions/30555#discussioncomment-17210905
Still having the same problem with V0.309.1 In my logs there are no errors like reported in #30555
We'll still need a log showing the actual measurements that break this.
I do not have a log from today, but in my first post (V0.309.0) you can find a log (with inverter pv on trace). Will try to do another log this night. Please advise if you need other information on trace in log.
Yesterdays log output for site doesn't show any strange values for pv, but I found strange modbus responses from inverter at 02:37:27. The response was FF FF FF FF for all registers (here also grid current is extremely high, seems also to be FF FF)
[site ] DEBUG 2026/06/11 02:36:57 ----
[site ] DEBUG 2026/06/11 02:36:57 grid power: 2W
[db:3-GW_Inverter] TRACE 2026/06/11 02:36:57 modbus: send 46 c3 00 00 00 06 f7 03 89 21 00 02
[db:3-GW_Inverter] TRACE 2026/06/11 02:36:57 modbus: recv 46 c3 00 00 00 07 f7 03 04 00 00 00 00
[site ] DEBUG 2026/06/11 02:36:57 battery 1 power: 72W
[db:3-GW_Inverter] TRACE 2026/06/11 02:36:57 modbus: send 46 c6 00 00 00 06 f7 03 89 25 00 02
[db:3-GW_Inverter] TRACE 2026/06/11 02:36:57 modbus: recv 46 c6 00 00 00 07 f7 03 04 00 00 00 00
[site ] DEBUG 2026/06/11 02:36:57 grid powers: [-0 -9 10]W
[db:3-GW_Inverter] TRACE 2026/06/11 02:36:57 modbus: send 46 c9 00 00 00 06 f7 03 89 29 00 02
[db:3-GW_Inverter] TRACE 2026/06/11 02:36:57 modbus: recv 46 c9 00 00 00 07 f7 03 04 00 00 00 00
[site ] DEBUG 2026/06/11 02:36:57 battery 1 soc: 69%
[db:3-GW_Inverter] TRACE 2026/06/11 02:36:57 modbus: send 46 cc 00 00 00 06 f7 03 89 2d 00 02
[db:3-GW_Inverter] TRACE 2026/06/11 02:36:57 modbus: recv 46 cc 00 00 00 07 f7 03 04 00 00 00 00
[site ] DEBUG 2026/06/11 02:36:57 pv 1 power: 0W
[db:3-GW_Inverter] TRACE 2026/06/11 02:36:57 modbus: send 46 cd 00 00 00 06 f7 03 89 77 00 02
[db:3-GW_Inverter] TRACE 2026/06/11 02:36:57 modbus: recv 46 cd 00 00 00 07 f7 03 04 00 04 29 09
[site ] DEBUG 2026/06/11 02:36:57 grid currents: [0.7 -0.8 0.8]A
[site ] DEBUG 2026/06/11 02:36:57 site power: 174W
[site ] DEBUG 2026/06/11 02:37:27 ----
[site ] DEBUG 2026/06/11 02:37:27 battery 1 power: 156W
[db:3-GW_Inverter] TRACE 2026/06/11 02:37:27 modbus: send 46 d3 00 00 00 06 f7 03 89 21 00 02
[db:3-GW_Inverter] TRACE 2026/06/11 02:37:27 modbus: recv 46 d3 00 00 00 07 f7 03 04 ff ff ff ff
[db:3-GW_Inverter] TRACE 2026/06/11 02:37:27 modbus: send 46 d4 00 00 00 06 f7 03 89 25 00 02
[db:3-GW_Inverter] TRACE 2026/06/11 02:37:27 modbus: recv 46 d4 00 00 00 07 f7 03 04 ff ff ff ff
[site ] DEBUG 2026/06/11 02:37:27 grid power: -11W
[db:3-GW_Inverter] TRACE 2026/06/11 02:37:27 modbus: send 46 d7 00 00 00 06 f7 03 89 29 00 02
[db:3-GW_Inverter] TRACE 2026/06/11 02:37:27 modbus: recv 46 d7 00 00 00 07 f7 03 04 ff ff ff ff
[site ] DEBUG 2026/06/11 02:37:27 battery 1 soc: 69%
[db:3-GW_Inverter] TRACE 2026/06/11 02:37:27 modbus: send 46 da 00 00 00 06 f7 03 89 2d 00 02
[db:3-GW_Inverter] TRACE 2026/06/11 02:37:27 modbus: recv 46 da 00 00 00 07 f7 03 04 ff ff ff ff
[site ] DEBUG 2026/06/11 02:37:27 pv 1 power: 0W
[site ] DEBUG 2026/06/11 02:37:27 grid powers: [1 1 1]W
[db:3-GW_Inverter] TRACE 2026/06/11 02:37:27 modbus: send 46 dd 00 00 00 06 f7 03 89 77 00 02
[db:3-GW_Inverter] TRACE 2026/06/11 02:37:27 modbus: recv 46 dd 00 00 00 07 f7 03 04 ff ff ff ff
[site ] DEBUG 2026/06/11 02:37:27 grid currents: [6.55e+03 6.55e+03 6.55e+03]A
[site ] DEBUG 2026/06/11 02:37:27 site power: 245W
[site ] DEBUG 2026/06/11 02:37:57 ----
[site ] DEBUG 2026/06/11 02:37:57 grid power: 10W
[site ] DEBUG 2026/06/11 02:37:57 battery 1 power: 167W
[db:3-GW_Inverter] TRACE 2026/06/11 02:37:57 modbus: send 46 e5 00 00 00 06 f7 03 89 21 00 02
[db:3-GW_Inverter] TRACE 2026/06/11 02:37:57 modbus: recv 46 e5 00 00 00 07 f7 03 04 00 00 00 00
[site ] DEBUG 2026/06/11 02:37:57 battery 1 soc: 69%
[db:3-GW_Inverter] TRACE 2026/06/11 02:37:57 modbus: send 46 e8 00 00 00 06 f7 03 89 25 00 02
[db:3-GW_Inverter] TRACE 2026/06/11 02:37:57 modbus: recv 46 e8 00 00 00 07 f7 03 04 00 00 00 00
[site ] DEBUG 2026/06/11 02:37:57 grid powers: [46 -41 -26]W
[db:3-GW_Inverter] TRACE 2026/06/11 02:37:57 modbus: send 46 eb 00 00 00 06 f7 03 89 29 00 02
[db:3-GW_Inverter] TRACE 2026/06/11 02:37:57 modbus: recv 46 eb 00 00 00 07 f7 03 04 00 00 00 00
[db:3-GW_Inverter] TRACE 2026/06/11 02:37:57 modbus: send 46 ec 00 00 00 06 f7 03 89 2d 00 02
[db:3-GW_Inverter] TRACE 2026/06/11 02:37:57 modbus: recv 46 ec 00 00 00 07 f7 03 04 00 00 00 00
[site ] DEBUG 2026/06/11 02:37:57 pv 1 power: 0W
[db:3-GW_Inverter] TRACE 2026/06/11 02:37:57 modbus: send 46 ef 00 00 00 06 f7 03 89 77 00 02
[db:3-GW_Inverter] TRACE 2026/06/11 02:37:57 modbus: recv 46 ef 00 00 00 07 f7 03 04 00 04 29 09
[site ] DEBUG 2026/06/11 02:37:57 grid currents: [0.8 -0.8 -0.8]A
[site ] DEBUG 2026/06/11 02:37:57 site power: 277W
Thanks @sutixp, that trace pins it down. The measurement that breaks the History is in your log already, no need to wait for tonight.
At 02:37:27 the Wifi stick returns ff ff ff ff for the PV registers. One of them is register 0x8977 = 35191 = PV Energy-Total (not grid current, the "grid currents" line next to it comes from the separate grid-usage instance reading register 36055). The goodwe-hybrid template decoded 35191 as plain uint32:
0xFFFFFFFF = 4,294,967,295 × scale 0.1 = ~429,496,729 kWh
That billion-scale energy sample is the nightly History peak. The PV power registers (35105–35117) already use the uint32nan decoder, which is why they correctly read 0 W in the same trace instead of 4 GW; the energy/current/soc registers were just missing that guard.
Fix in #30924: switch the unguarded registers (goodwe-hybrid and goodwe-wifi-et) to the nan decoder variants so 0xFFFF/0xFFFFFFFF maps to 0:
- PV Energy-Total (35191), battery discharge energy (35209), grid currents (36055/56/57), battery soc (37007/39005)
That also explains why Home Assistant is clean: its GoodWe integration treats the same sentinel as unavailable.
🤖 Generated with Claude Code
@sutixp which template/version (pls, always open complete issues)? This should already be fixed by https://github.com/evcc-io/evcc/pull/30924.
@sutixp which template/version (pls, always open complete issues)? This should already be fixed by #30924.
See configuration in first post: i am using goodwe-hybrid #30605 did not fix my issue therefore I commented again, but i think #30924 should fix it. Will comment when there is no peak anymore after two days of keeping it running. Thank you for your work
@andig last nightly (11f7ef5) still shows this peak. Unfortunately I did not set logging correctly, therefore I can't provide logs today. Will provide them tomorrow.
Just for completeness here my logfile with nightly v0.309.1 (1056e85)
[site ] DEBUG 2026/06/19 02:27:03 ----
[site ] DEBUG 2026/06/19 02:27:03 grid power: 26W
[site ] DEBUG 2026/06/19 02:27:03 battery 1 power: 134W
[db:3-GW_Inverter] TRACE 2026/06/19 02:27:03 modbus: send 83 34 00 00 00 06 f7 03 89 21 00 02
[db:3-GW_Inverter] TRACE 2026/06/19 02:27:03 modbus: recv 83 34 00 00 00 07 f7 03 04 00 00 00 00
[site ] DEBUG 2026/06/19 02:27:03 battery 1 soc: 54%
[db:3-GW_Inverter] TRACE 2026/06/19 02:27:03 modbus: send 83 37 00 00 00 06 f7 03 89 25 00 02
[db:3-GW_Inverter] TRACE 2026/06/19 02:27:03 modbus: recv 83 37 00 00 00 07 f7 03 04 00 00 00 00
[site ] DEBUG 2026/06/19 02:27:03 grid powers: [51 -32 -14]W
[db:3-GW_Inverter] TRACE 2026/06/19 02:27:03 modbus: send 83 3a 00 00 00 06 f7 03 89 29 00 02
[db:3-GW_Inverter] TRACE 2026/06/19 02:27:03 modbus: recv 83 3a 00 00 00 07 f7 03 04 00 00 00 00
[db:3-GW_Inverter] TRACE 2026/06/19 02:27:03 modbus: send 83 3b 00 00 00 06 f7 03 89 2d 00 02
[db:3-GW_Inverter] TRACE 2026/06/19 02:27:03 modbus: recv 83 3b 00 00 00 07 f7 03 04 00 00 00 00
[site ] DEBUG 2026/06/19 02:27:03 pv 1 power: 0W
[db:3-GW_Inverter] TRACE 2026/06/19 02:27:03 modbus: send 83 3e 00 00 00 06 f7 03 89 77 00 02
[db:3-GW_Inverter] TRACE 2026/06/19 02:27:03 modbus: recv 83 3e 00 00 00 07 f7 03 04 00 04 3d bc
[site ] DEBUG 2026/06/19 02:27:03 grid currents: [0.8 -0.8 -0.7]A
[site ] DEBUG 2026/06/19 02:27:03 site power: 260W
[site ] DEBUG 2026/06/19 02:27:33 ----
[site ] DEBUG 2026/06/19 02:27:33 battery 1 power: 159W
[db:3-GW_Inverter] TRACE 2026/06/19 02:27:33 modbus: send 83 43 00 00 00 06 f7 03 89 21 00 02
[db:3-GW_Inverter] TRACE 2026/06/19 02:27:33 modbus: recv 83 43 00 00 00 07 f7 03 04 ff ff ff ff
[db:3-GW_Inverter] TRACE 2026/06/19 02:27:33 modbus: send 83 44 00 00 00 06 f7 03 89 25 00 02
[db:3-GW_Inverter] TRACE 2026/06/19 02:27:33 modbus: recv 83 44 00 00 00 07 f7 03 04 ff ff ff ff
[site ] DEBUG 2026/06/19 02:27:33 grid power: -15W
[db:3-GW_Inverter] TRACE 2026/06/19 02:27:33 modbus: send 83 47 00 00 00 06 f7 03 89 29 00 02
[db:3-GW_Inverter] TRACE 2026/06/19 02:27:33 modbus: recv 83 47 00 00 00 07 f7 03 04 ff ff ff ff
[site ] DEBUG 2026/06/19 02:27:34 battery 1 soc: 54%
[db:3-GW_Inverter] TRACE 2026/06/19 02:27:34 modbus: send 83 4a 00 00 00 06 f7 03 89 2d 00 02
[db:3-GW_Inverter] TRACE 2026/06/19 02:27:34 modbus: recv 83 4a 00 00 00 07 f7 03 04 ff ff ff ff
[site ] DEBUG 2026/06/19 02:27:34 pv 1 power: 0W
[site ] DEBUG 2026/06/19 02:27:34 grid powers: [1 1 1]W
[db:3-GW_Inverter] TRACE 2026/06/19 02:27:34 modbus: send 83 4d 00 00 00 06 f7 03 89 77 00 02
[db:3-GW_Inverter] TRACE 2026/06/19 02:27:34 modbus: recv 83 4d 00 00 00 07 f7 03 04 ff ff ff ff
[site ] DEBUG 2026/06/19 02:27:34 grid currents: [0 0 0]A
[site ] DEBUG 2026/06/19 02:27:34 site power: 244W
[site ] DEBUG 2026/06/19 02:28:03 ----
[site ] DEBUG 2026/06/19 02:28:03 grid power: -7W
[site ] DEBUG 2026/06/19 02:28:03 battery 1 power: 91W
[db:3-GW_Inverter] TRACE 2026/06/19 02:28:03 modbus: send 83 55 00 00 00 06 f7 03 89 21 00 02
[db:3-GW_Inverter] TRACE 2026/06/19 02:28:03 modbus: recv 83 55 00 00 00 07 f7 03 04 00 00 00 00
[db:3-GW_Inverter] TRACE 2026/06/19 02:28:03 modbus: send 83 58 00 00 00 06 f7 03 89 25 00 02
[db:3-GW_Inverter] TRACE 2026/06/19 02:28:03 modbus: recv 83 58 00 00 00 07 f7 03 04 00 00 00 00
[site ] DEBUG 2026/06/19 02:28:03 grid powers: [-8 -11 10]W
[site ] DEBUG 2026/06/19 02:28:03 battery 1 soc: 54%
[db:3-GW_Inverter] TRACE 2026/06/19 02:28:03 modbus: send 83 5b 00 00 00 06 f7 03 89 29 00 02
[db:3-GW_Inverter] TRACE 2026/06/19 02:28:03 modbus: recv 83 5b 00 00 00 07 f7 03 04 00 00 00 00
[db:3-GW_Inverter] TRACE 2026/06/19 02:28:03 modbus: send 83 5e 00 00 00 06 f7 03 89 2d 00 02
[db:3-GW_Inverter] TRACE 2026/06/19 02:28:03 modbus: recv 83 5e 00 00 00 07 f7 03 04 00 00 00 00
[site ] DEBUG 2026/06/19 02:28:03 pv 1 power: 0W
[db:3-GW_Inverter] TRACE 2026/06/19 02:28:03 modbus: send 83 5f 00 00 00 06 f7 03 89 77 00 02
[db:3-GW_Inverter] TRACE 2026/06/19 02:28:03 modbus: recv 83 5f 00 00 00 07 f7 03 04 00 04 3d bc
[site ] DEBUG 2026/06/19 02:28:03 grid currents: [-0.7 -0.8 0.7]A
[site ] DEBUG 2026/06/19 02:28:03 site power: 184W
[site ] DEBUG 2026/06/19 02:28:33 ----
At 02:27:33 all reading (here the PV values on trace) are NaN. pv power is set to 0W correctly. But NaN seems to be treated incorrectly for further processing.
The values are smaller now (not max uint32 or max uint16 anymore). So, #30924 was the first important fix for GoodWe inverter, but further processing of these NaN values (valid for all modbus devices) still needs a deeper look. Same is described in #30950 (for SMA modbus inverter) with a possible fix in #31011, therefore no need to reopen this issue.
Same as https://github.com/evcc-io/evcc/issues/30950#issuecomment-4746796212
Same here, any suggestions on how to clean up database?
Yes, check #31129