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

Auswertung Ladeenergie: Bug „dieses Jahr“ (this year) #18008

Closed
1 task done
An-Wi opened this issue Jan 2, 2025 · 6 comments · Fixed by #18133
Closed
1 task done

Auswertung Ladeenergie: Bug „dieses Jahr“ (this year) #18008

An-Wi opened this issue Jan 2, 2025 · 6 comments · Fixed by #18133
Labels
bug Something isn't working

Comments

@An-Wi
Copy link

An-Wi commented Jan 2, 2025

Describe the bug

reference: #15578

Mein Ladevorgang am 31.12.2024 (8:40-13:59) wird bei mir „sporadisch“ dazugerechnet:
IMG_4135
IMG_4137
IMG_4130

Sporadisch deshalb, weil es gestern (01.01.) am Nachmittag/Abend nach meinem Ladevorgang (10:09-15:41) richtig gerechnet wurde.
Sobald ich das genauer spezifizieren kann, ergänze ich das.

Steps to reproduce

...

Configuration details

-

Log details

-

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

Windows

Nightly build

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

Version

0.132.0

@andig andig closed this as completed Jan 2, 2025
@An-Wi
Copy link
Author

An-Wi commented Jan 2, 2025

bereits behoben?

@An-Wi
Copy link
Author

An-Wi commented Jan 8, 2025

Fehler tritt in Version 0.132.1 nach wie vor auf:
ScreenShot_9762_
ScreenShot_9763_

@andig
Copy link
Member

andig commented Jan 8, 2025

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.

@An-Wi
Copy link
Author

An-Wi commented Jan 8, 2025

Helfen diese Log-Zeilen? Ansonsten bitte präzisieren, welches Log zur Analyse weiterhelfen kann.

Logzeiten, an denen die Auswertung inkorrekt ist:

[db    ] TRACE 2025/01/07 07:04:55 
		SELECT COALESCE(SUM(charged_kwh * solar_percentage) / SUM(charged_kwh), 0)
		FROM sessions
		WHERE finished >= "2024-12-08 07:04:55.562" 
		AND charged_kwh > 0 
		AND solar_percentage IS NOT NULL 1 
[db    ] TRACE 2025/01/07 07:04:55 
		SELECT COALESCE(SUM(charged_kwh), 0)
		FROM sessions
		WHERE finished >= "2024-12-08 07:04:55.562" 
		AND charged_kwh > 0 
		AND solar_percentage IS NOT NULL 1 
[db    ] TRACE 2025/01/07 07:04:55 
		SELECT COALESCE(SUM(charged_kwh * price_per_kwh) / SUM(charged_kwh), 0)
		FROM sessions
		WHERE finished >= "2024-12-08 07:04:55.562" 
		AND charged_kwh > 0 
		AND price_per_kwh IS NOT NULL 1 
[db    ] TRACE 2025/01/07 07:04:55 
		SELECT COALESCE(SUM(charged_kwh * co2_per_kwh) / SUM(charged_kwh), 0)
		FROM sessions
		WHERE finished >= "2024-12-08 07:04:55.562" 
		AND charged_kwh > 0 
		AND co2_per_kwh IS NOT NULL 1 
[db    ] TRACE 2025/01/07 07:04:55 
		SELECT COALESCE(SUM(charged_kwh * solar_percentage) / SUM(charged_kwh), 0)
		FROM sessions
		WHERE finished >= "2024-01-08 07:04:55.573" 
		AND charged_kwh > 0 
		AND solar_percentage IS NOT NULL 1 
[db    ] TRACE 2025/01/07 07:04:55 
		SELECT COALESCE(SUM(charged_kwh), 0)
		FROM sessions
		WHERE finished >= "2024-01-08 07:04:55.573" 
		AND charged_kwh > 0 
		AND solar_percentage IS NOT NULL 1 
[db    ] TRACE 2025/01/07 07:04:55 
		SELECT COALESCE(SUM(charged_kwh * price_per_kwh) / SUM(charged_kwh), 0)
		FROM sessions
		WHERE finished >= "2024-01-08 07:04:55.573" 
		AND charged_kwh > 0 
		AND price_per_kwh IS NOT NULL 1 
[db    ] TRACE 2025/01/07 07:04:55 
		SELECT COALESCE(SUM(charged_kwh * co2_per_kwh) / SUM(charged_kwh), 0)
		FROM sessions
		WHERE finished >= "2024-01-08 07:04:55.573" 
		AND charged_kwh > 0 
		AND co2_per_kwh IS NOT NULL 1 
[db    ] TRACE 2025/01/07 07:04:55 
		SELECT COALESCE(SUM(charged_kwh * solar_percentage) / SUM(charged_kwh), 0)
		FROM sessions
		WHERE finished >= "2024-12-31 07:04:55.583" 
		AND charged_kwh > 0 
		AND solar_percentage IS NOT NULL 1 
[db    ] TRACE 2025/01/07 07:04:55 
		SELECT COALESCE(SUM(charged_kwh), 0)
		FROM sessions
		WHERE finished >= "2024-12-31 07:04:55.583" 
		AND charged_kwh > 0 
		AND solar_percentage IS NOT NULL 1 
[db    ] TRACE 2025/01/07 07:04:55 
		SELECT COALESCE(SUM(charged_kwh * price_per_kwh) / SUM(charged_kwh), 0)
		FROM sessions
		WHERE finished >= "2024-12-31 07:04:55.583" 
		AND charged_kwh > 0 
		AND price_per_kwh IS NOT NULL 1 
[db    ] TRACE 2025/01/07 07:04:55 
		SELECT COALESCE(SUM(charged_kwh * co2_per_kwh) / SUM(charged_kwh), 0)
		FROM sessions
		WHERE finished >= "2024-12-31 07:04:55.583" 
		AND charged_kwh > 0 
		AND co2_per_kwh IS NOT NULL 1 
[db    ] TRACE 2025/01/07 07:04:55 
		SELECT COALESCE(SUM(charged_kwh * solar_percentage) / SUM(charged_kwh), 0)
		FROM sessions
		WHERE finished >= "1925-02-01 07:04:55.59" 
		AND charged_kwh > 0 
		AND solar_percentage IS NOT NULL 1 
[db    ] TRACE 2025/01/07 07:04:55 
		SELECT COALESCE(SUM(charged_kwh), 0)
		FROM sessions
		WHERE finished >= "1925-02-01 07:04:55.59" 
		AND charged_kwh > 0 
		AND solar_percentage IS NOT NULL 1 
[db    ] TRACE 2025/01/07 07:04:55 
		SELECT COALESCE(SUM(charged_kwh * price_per_kwh) / SUM(charged_kwh), 0)
		FROM sessions
		WHERE finished >= "1925-02-01 07:04:55.59" 
		AND charged_kwh > 0 
		AND price_per_kwh IS NOT NULL 1 
[db    ] TRACE 2025/01/07 07:04:55 
		SELECT COALESCE(SUM(charged_kwh * co2_per_kwh) / SUM(charged_kwh), 0)
		FROM sessions
		WHERE finished >= "1925-02-01 07:04:55.59" 
		AND charged_kwh > 0 
		AND co2_per_kwh IS NOT NULL 1 
[site  ] DEBUG 2025/01/07 07:05:14 ----
[lp-1  ] DEBUG 2025/01/07 07:05:14 charge power: 0W
[lp-1  ] DEBUG 2025/01/07 07:05:14 charge currents: [0 0 0]A
[script] DEBUG 2025/01/07 07:05:14 /fupcService/pvCurrentPower.bat: 0
[site  ] DEBUG 2025/01/07 07:05:14 pv power: 0W
[site  ] DEBUG 2025/01/07 07:05:14 grid power: 272W
[site  ] DEBUG 2025/01/07 07:05:14 grid currents: [0.614 0.576 0.612]A
[site  ] DEBUG 2025/01/07 07:05:14 site power: 172W
[lp-1  ] DEBUG 2025/01/07 07:05:14 charge total import: 8600.002kWh
[lp-1  ] DEBUG 2025/01/07 07:05:14 charger status: A
[lp-1  ] DEBUG 2025/01/07 07:05:14 next soc poll remaining time: 59m40s
[site  ] DEBUG 2025/01/07 07:05:34 ---- 

Logzeiten, wenn die Auswertung wieder passt:

[db    ] TRACE 2025/01/07 19:07:32 
		SELECT COALESCE(SUM(charged_kwh * solar_percentage) / SUM(charged_kwh), 0)
		FROM sessions
		WHERE finished >= "2024-12-08 19:07:32.223" 
		AND charged_kwh > 0 
		AND solar_percentage IS NOT NULL 1 
[db    ] TRACE 2025/01/07 19:07:32 
		SELECT COALESCE(SUM(charged_kwh), 0)
		FROM sessions
		WHERE finished >= "2024-12-08 19:07:32.223" 
		AND charged_kwh > 0 
		AND solar_percentage IS NOT NULL 1 
[db    ] TRACE 2025/01/07 19:07:32 
		SELECT COALESCE(SUM(charged_kwh * price_per_kwh) / SUM(charged_kwh), 0)
		FROM sessions
		WHERE finished >= "2024-12-08 19:07:32.223" 
		AND charged_kwh > 0 
		AND price_per_kwh IS NOT NULL 1 
[db    ] TRACE 2025/01/07 19:07:32 
		SELECT COALESCE(SUM(charged_kwh * co2_per_kwh) / SUM(charged_kwh), 0)
		FROM sessions
		WHERE finished >= "2024-12-08 19:07:32.223" 
		AND charged_kwh > 0 
		AND co2_per_kwh IS NOT NULL 1 
[db    ] TRACE 2025/01/07 19:07:32 
		SELECT COALESCE(SUM(charged_kwh * solar_percentage) / SUM(charged_kwh), 0)
		FROM sessions
		WHERE finished >= "2024-01-08 19:07:32.237" 
		AND charged_kwh > 0 
		AND solar_percentage IS NOT NULL 1 
[db    ] TRACE 2025/01/07 19:07:32 
		SELECT COALESCE(SUM(charged_kwh), 0)
		FROM sessions
		WHERE finished >= "2024-01-08 19:07:32.237" 
		AND charged_kwh > 0 
		AND solar_percentage IS NOT NULL 1 
[db    ] TRACE 2025/01/07 19:07:32 
		SELECT COALESCE(SUM(charged_kwh * price_per_kwh) / SUM(charged_kwh), 0)
		FROM sessions
		WHERE finished >= "2024-01-08 19:07:32.237" 
		AND charged_kwh > 0 
		AND price_per_kwh IS NOT NULL 1 
[db    ] TRACE 2025/01/07 19:07:32 
		SELECT COALESCE(SUM(charged_kwh * co2_per_kwh) / SUM(charged_kwh), 0)
		FROM sessions
		WHERE finished >= "2024-01-08 19:07:32.237" 
		AND charged_kwh > 0 
		AND co2_per_kwh IS NOT NULL 1 
[db    ] TRACE 2025/01/07 19:07:32 
		SELECT COALESCE(SUM(charged_kwh * solar_percentage) / SUM(charged_kwh), 0)
		FROM sessions
		WHERE finished >= "2024-12-31 19:07:32.247" 
		AND charged_kwh > 0 
		AND solar_percentage IS NOT NULL 1 
[db    ] TRACE 2025/01/07 19:07:32 
		SELECT COALESCE(SUM(charged_kwh), 0)
		FROM sessions
		WHERE finished >= "2024-12-31 19:07:32.247" 
		AND charged_kwh > 0 
		AND solar_percentage IS NOT NULL 1 
[db    ] TRACE 2025/01/07 19:07:32 
		SELECT COALESCE(SUM(charged_kwh * price_per_kwh) / SUM(charged_kwh), 0)
		FROM sessions
		WHERE finished >= "2024-12-31 19:07:32.247" 
		AND charged_kwh > 0 
		AND price_per_kwh IS NOT NULL 1 
[db    ] TRACE 2025/01/07 19:07:32 
		SELECT COALESCE(SUM(charged_kwh * co2_per_kwh) / SUM(charged_kwh), 0)
		FROM sessions
		WHERE finished >= "2024-12-31 19:07:32.247" 
		AND charged_kwh > 0 
		AND co2_per_kwh IS NOT NULL 1 
[db    ] TRACE 2025/01/07 19:07:32 
		SELECT COALESCE(SUM(charged_kwh * solar_percentage) / SUM(charged_kwh), 0)
		FROM sessions
		WHERE finished >= "1925-02-01 19:07:32.256" 
		AND charged_kwh > 0 
		AND solar_percentage IS NOT NULL 1 
[db    ] TRACE 2025/01/07 19:07:32 
		SELECT COALESCE(SUM(charged_kwh), 0)
		FROM sessions
		WHERE finished >= "1925-02-01 19:07:32.256" 
		AND charged_kwh > 0 
		AND solar_percentage IS NOT NULL 1 
[db    ] TRACE 2025/01/07 19:07:32 
		SELECT COALESCE(SUM(charged_kwh * price_per_kwh) / SUM(charged_kwh), 0)
		FROM sessions
		WHERE finished >= "1925-02-01 19:07:32.256" 
		AND charged_kwh > 0 
		AND price_per_kwh IS NOT NULL 1 
[db    ] TRACE 2025/01/07 19:07:32 
		SELECT COALESCE(SUM(charged_kwh * co2_per_kwh) / SUM(charged_kwh), 0)
		FROM sessions
		WHERE finished >= "1925-02-01 19:07:32.256" 
		AND charged_kwh > 0 
		AND co2_per_kwh IS NOT NULL 1 
[site  ] DEBUG 2025/01/07 19:07:51 ----
[lp-1  ] DEBUG 2025/01/07 19:07:51 charge power: 0W
[lp-1  ] DEBUG 2025/01/07 19:07:51 charge currents: [0 0 0]A
[script] DEBUG 2025/01/07 19:07:51 /fupcService/pvCurrentPower.bat: 0
[site  ] DEBUG 2025/01/07 19:07:51 pv power: 0W
[site  ] DEBUG 2025/01/07 19:07:51 grid power: 2296W
[site  ] DEBUG 2025/01/07 19:07:51 grid currents: [1.35 1.54 7.22]A
[site  ] DEBUG 2025/01/07 19:07:51 site power: 2196W
[lp-1  ] DEBUG 2025/01/07 19:07:51 charge total import: 8600.002kWh
[lp-1  ] DEBUG 2025/01/07 19:07:51 charger status: A
[lp-1  ] DEBUG 2025/01/07 19:07:51 next soc poll remaining time: 59m39s
[site  ] DEBUG 2025/01/07 19:08:11 ---- 

=> Das ergibt für mich insofern Sinn, da mit WHERE finished >= "2024-12-31 19:07:32.247" der Ladevorgang vom 31.12.2024 (endet 13:59 Uhr) im 2. Logteil nicht mehr erfasst wird...
=>wohingegen er vormittags mit WHERE finished >= "2024-12-31 07:04:55.583" in der Abfrage noch voll drin liegt.

@andig
Copy link
Member

andig commented Jan 8, 2025

/cc @naltatis

@naltatis
Copy link
Member

naltatis commented Jan 8, 2025

Jo, der Grund ist, dass wir bei der "Dieses Jahr" Betrachtung aktuell nicht sauber vom 1.1.XXXX anfangen, sondern einfach Tage zurückrechnen. Heißt die aktuelle Uhrzeit spielt noch eine Rolle. Das sollte sich relativ einfach lösen lassen.

https://github.com/evcc-io/evcc/blob/master/core/stats.go#L38

@naltatis naltatis reopened this Jan 8, 2025
@andig andig added the bug Something isn't working label Jan 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants