evcc icon indicating copy to clipboard operation
evcc copied to clipboard

Problems with new History Feature

Open Lako-Lako opened this issue 7 months ago • 25 comments

Description

Hi,

First of thanks for the feature! Its really nice. However I have two problems, for one it only adds data two hours later, so at 6 I can see the last 48 Hours up to 4 etc. And for the two days it has existed I have a giant spike at 21:15 or 21:30 where my grid import goes from 0 to 100 GW+. I dont know what to look for in the logs, I'll post one once I know and it happens again.

Steps to Reproduce

  1. Go to history
  2. See problem

Configuration (YAML)

plant: *****

Configuration (UI)

{
  "charger": [
    {"id":8,"name":"db:8","type":"template","config":{"ip":"192.168.178.79","ski":"***","template":"ellipro"},"deviceProduct":"Elli Charger Pro"}
  ],
  "experimental": true,
  "influx": {"url":"","database":"","token":"","org":"","user":"","password":"","insecure":false},
  "interval": 10,
  "loadpoints": [
    {"id":9,"name":"db:9","batteryBoostLimit":100,"charger":"db:8","defaultMode":"minpv","limitEnergy":0,"limitSoc":0,"maxCurrent":16,"minCurrent":6,"phasesConfigured":3,"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":3600000000000},"estimate":true},"thresholds":{"enable":{"delay":60000000000,"threshold":0},"disable":{"delay":180000000000,"threshold":0}},"title":"Einfahrt","vehicle":"db:7"}
  ],
  "meter": [
    {"id":1,"name":"db:1","type":"template","config":{"ain":"***","password":"***","template":"fritzdect","uri":"***","usage":"pv","user":"***"},"deviceProduct":"AVM FritzDECT","deviceTitle":"Solar Carport"},
    {"id":2,"name":"db:2","type":"template","config":{"capacity":19.2,"endianness":"little","host":"192.168.178.187","id":71,"maxacpower":"0","modbus":"tcpip","port":1502,"template":"kostal-plenticore","usage":"battery","watchdog":"60s"},"deviceProduct":"Kostal Plenticore Hybrid","deviceTitle":"Haupbatterie"},
    {"id":3,"name":"db:3","type":"template","config":{"device":"/dev/ttyAMA0","host":"192.168.178.110","id":1,"modbus":"tcpip","port":1502,"template":"solaredge-inverter","usage":"pv"},"deviceProduct":"SolarEdge Wechselrichter","deviceTitle":"Solar Dach"},
    {"id":4,"name":"db:4","type":"template","config":{"host":"192.168.178.110","id":1,"modbus":"tcpip","port":1502,"template":"solaredge-inverter","usage":"grid"},"deviceProduct":"SolarEdge Wechselrichter"}
  ],
  "mqtt": {"broker":"","user":"","password":"","clientID":"","insecure":false,"caCert":"","clientCert":"","clientKey":"","topic":"evcc"},
  "residualPower": 100,
  "shm": {"vendorId":"","deviceId":"","deviceSerial":""},
  "site": {"title":"Am Waldrand 24","grid":"db:4","pv":["db:1","db:3"],"battery":["db:2"],"aux":null,"ext":null},
  "tariff": [
    {"id":11,"name":"db:11","type":"template","config":{"price":0.07,"template":"fixed"},"deviceProduct":"Fester Preis"},
    {"id":10,"name":"db:10","type":"template","config":{"price":0.32,"template":"fixed"},"deviceProduct":"Fester Preis"}
  ],
  "tariffRefs": {"grid":"db:10","feedIn":"db:11","co2":"","planner":"","solar":[]},
  "vehicle": [
    {"id":7,"name":"db:7","type":"template","config":{"cache":"15m","capacity":77,"icon":"car","minCurrent":6,"password":"***","phases":"","template":"vw","timeout":"10s","title":"ID4","user":"***"},"deviceProduct":"Volkswagen We Connect ID"}
  ]
}

Version

v0.305.1

System

linux/arm64, CEST +02:00

Lako-Lako avatar Apr 20 '26 20:04 Lako-Lako

Image

Lako-Lako avatar Apr 20 '26 20:04 Lako-Lako

Look for db trace. Closing until available.

andig avatar Apr 20 '26 20:04 andig

Hi @andig here a log and another screenshot. Both taken at basically the same time. In the log you can see close to the end:

[db ] TRACE 2026/04/22 22:30:02 INSERT INTO meters (meter,ts,import,export) VALUES (2,"2026-04-22 22:15:00",25553.062,0.001099461994899722) 1

But it is not yet on the screenshot:

Image

As the history UI also lags by two hours for me. I hope this helps, thanks in advance :)

Lako-Lako avatar Apr 22 '26 20:04 Lako-Lako

I seem to have forgotten to add the log :) will be added in the evening

Lako-Lako avatar Apr 23 '26 08:04 Lako-Lako

25553.062

So where does that value come from?

andig avatar Apr 23 '26 11:04 andig

Here now the corresponding log:

evcc-20260422-223225-trace.log

I dont know where it comes from, it is only once in the log.

Lako-Lako avatar Apr 23 '26 14:04 Lako-Lako

@andig found something!

[sunspec] TRACE 2026/04/23 22:15:02 model 203 block 0 point TotWhImp: 2.5553164e+07

log.txt

Its wierd though because while that is definitly the number, it is reported all the time but the database only uses it once per day

Lako-Lako avatar Apr 23 '26 20:04 Lako-Lako

Anyway its wrong and when wrong causes issues. Open ticker with vendor…

andig avatar Apr 23 '26 20:04 andig

@Lako-Lako: Have also made an Ticket today at Solaredge. Do you have already any answer?

Chris685 avatar Apr 24 '26 10:04 Chris685

@Chris685 No, I am currently somewhat busy and will do that next week. Do tell if you get an answer!

Lako-Lako avatar Apr 24 '26 20:04 Lako-Lako

Facing the same issue, but for some reason those values seem to only appear in the EVCC history. I'm exporting all data to Influx, in there I don't see any of those spikes in the gridPower or gridEnergy measurements.

nanoBit93 avatar May 03 '26 21:05 nanoBit93

So- whats in your metrics table?

andig avatar May 04 '26 05:05 andig

@nanoBit93 Do you log Modbus Signals at Influx or other Solaredge Signals. Because Solaredge portal does not show this peaks - probably they put a filter on it and Modbus is the raw signal.

Chris685 avatar May 04 '26 06:05 Chris685

What I meant is I let EVCC export everything to Influx. I was just wondering why it doesn't appear there as EVCC saves all metrics every 10 seconds (my set control cycle time) in Influx. For instance the last time it happened May 3rd 00:22 according to EVCC History. Here's what Infllux shows for that time: Image

I also crosschecked the export to HomeAssistant (via EVCC modbus proxy and EVCC integration) and it doesn't appear there in the data as well. That tbh doesn't surprise me as the integration only updates every 30s instead of 10s, so a short spike would be covered up. Image

nanoBit93 avatar May 04 '26 07:05 nanoBit93

Ok, than i understand this and the datas should show the same results. Thank you.

Chris685 avatar May 04 '26 09:05 Chris685

Hi, first of all the update looks great! I just wanted to give a short update, that the error with the daily spike persists. Something I have noticed, is that the spike is exactly the total import, basically instead of calculating totimp(now) - totimp(before) it seems to reset the last value to 0 at that point.

// SetImportMeterTotal adds the difference to the last total meter value in kWh func (m *Accumulator) SetImportMeterTotal(v float64) { defer func() { m.updated = m.clock.Now() m.importMeter = new(v) }()

if m.importMeter == nil { return }

if v >= *m.importMeter { m.Energy += v - *m.importMeter } }

Basically as if this resets importMeter

Lako-Lako avatar May 22 '26 10:05 Lako-Lako

I also still have this spike every day:

Image

Chris685 avatar May 23 '26 05:05 Chris685

@Chris685 does the amount equal your total import as well?

Lako-Lako avatar May 23 '26 14:05 Lako-Lako

@Lako-Lako : Yesterday the peak says 42,9MWh. Total PV and Import is around 23,5MWh, so i would not agree on my side.

Right now, i dont see any connection to this peak value.

Chris685 avatar May 23 '26 16:05 Chris685

I have a similar issue with my system. Each spike is consistently (over multiple days) about 85.8 GW. Each spike also amounts to approx. 21.5 GWh of energy. Obviously no relation with total import numbers because of such high peaks.

I have a Huawei SUN2000 system (2 PV inverters, one battery) in combination with a dtsu666-h smart power sensor.

Image

pieterbot123 avatar May 26 '26 22:05 pieterbot123