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

Fix charging-stats for better "Charge deltas" when the charging process is interrupted and re-started #2566

Merged
merged 1 commit into from
Apr 11, 2022

Conversation

nicoladefranceschi
Copy link
Contributor

When the charging process is interrupted and re-started, you can see some "jumps" in the graph.
Right now the graph looks like this:
image

With the new query, this is the result:
image

To achieve this, the query is modified to aggregate charges within a few hours

SELECT
	$__timeGroup(start_date,'2h') as time,
	MIN(start_battery_level) as start_battery_level,
	MAX(end_battery_level) as end_battery_level
FROM
	charging_processes
WHERE
	$__timeFilter(start_date)
	AND duration_min > 3
	AND car_id = $car_id
GROUP BY 
	1
ORDER BY
	1;

Fix charging-stats for better "Charge deltas" when the charging process is interrupted and re-started
Copy link
Collaborator

@adriankumpf adriankumpf left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@adriankumpf adriankumpf merged commit 6573bc4 into teslamate-org:master Apr 11, 2022
adriankumpf added a commit to fmossott/teslamate that referenced this pull request Apr 22, 2022
* master:
  Update timeline.json (teslamate-org#2601)
  Update charging-stats.json (teslamate-org#2566)
  Update to projects page (doc/website) (teslamate-org#2518)
  Update States top row panels height (teslamate-org#2487)
  Do no start EPMD
  Bump grafana/grafana from 8.4.1 to 8.4.5 in /grafana
  Bump docker/build-push-action from 2.9.0 to 2.10.0
  Bump erlef/setup-beam from 1.10 to 1.11
  Bump docker/login-action from 1.12.0 to 1.14.1
  Bump actions/cache from 2.1.7 to 3.0.1
  Bump website deps
  Bump deps
  Bump actions/checkout from 2.4.0 to 3
  Restart stream process if token expired
  Update charging-stats.json (teslamate-org#2481)
  Fix typo
  Update POT files
  Update CHANGELOG
  Move encryption key warning into .container
  Encrypt API tokens (teslamate-org#2360)
  Update frontend deps
  DC charge curve scatter graph (teslamate-org#2093)
  Update CHANGELOG
  Bump Grafana to 8.4.1
  Added panel with the cost of charges in SuC (teslamate-org#2448)
  Add datasource to table and map panels. (teslamate-org#2391)
  Update charging-stats.json (teslamate-org#2461)
  moved subselects to "from" clause (teslamate-org#2464)
  Added ProxyPreserveHost On to the Grafana entries in Apache2 config (teslamate-org#2471)
  Render Trip piechart legend (teslamate-org#2473)
  Bump follow-redirects from 1.14.7 to 1.14.8 in /website
  Update default.po (teslamate-org#2479)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants