Skip to content

Conversation

@swiffer
Copy link
Collaborator

@swiffer swiffer commented Oct 3, 2025

this fixes #4987

the idea is to not "blindly" change phases (i actually charged with two phases lately) but use the same approach that is used in elixir for phase correction.

defp determine_phases(%ChargingProcess{id: id, car_id: car_id}) do

the original case statement was added in #2527 and intended to fix #414

@netlify
Copy link

netlify bot commented Oct 3, 2025

Deploy Preview for teslamate ready!

Name Link
🔨 Latest commit dd06b2a
🔍 Latest deploy log https://app.netlify.com/projects/teslamate/deploys/68e0ee99dfc1fa00080a90d7
😎 Deploy Preview https://deploy-preview-4988--teslamate.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@swiffer swiffer self-assigned this Oct 3, 2025
@swiffer swiffer added the area:dashboard Related to a Grafana dashboard label Oct 3, 2025
@swiffer swiffer added this to the v2.1.2 milestone Oct 3, 2025
@JakobLichterfeld JakobLichterfeld changed the title mimic the elixir code to determine phases feat: mimic the elixir code to determine phases in charges dashboard Oct 4, 2025
@JakobLichterfeld JakobLichterfeld changed the title feat: mimic the elixir code to determine phases in charges dashboard fix: correctly determine charging phases in charge detail dashboard Oct 4, 2025
@JakobLichterfeld JakobLichterfeld added the enhancement New feature or request label Oct 4, 2025
Copy link
Member

@JakobLichterfeld JakobLichterfeld left a comment

Choose a reason for hiding this comment

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

Perfect, ty!

@JakobLichterfeld JakobLichterfeld merged commit 9cf6c26 into main Oct 4, 2025
24 checks passed
@JakobLichterfeld JakobLichterfeld deleted the swiffer/fix-phases-in-grafana-dashboard branch October 4, 2025 10:34
@swiffer
Copy link
Collaborator Author

swiffer commented Oct 4, 2025

@JakobLichterfeld - do you know if it's possible that number of phases change within a charging process?

as in contrast to teslamate's elixir code we want to visualize data over time i might need to rethink this a little (the way it's solved now phases are constant within a charging process).

@JakobLichterfeld
Copy link
Member

JakobLichterfeld commented Oct 4, 2025

@JakobLichterfeld - do you know if it's possible that number of phases change within a charging process?

From my understanding, it is not possible. You can change the charging current, but not the number of phases used. If the phases change, the charge is completed and a new charge starts.

@swiffer
Copy link
Collaborator Author

swiffer commented Oct 4, 2025

Ok, i guess in that case we can keep as is and fine-tune if any users notices data beeing off / comes up with a different example.

kuoruan pushed a commit to kuoruan/teslamate that referenced this pull request Oct 13, 2025
…eslamate-org#4988)

* mimic the elixir code to determine phases

* docs: update changelog

---------

Co-authored-by: Jakob Lichterfeld <[email protected]>
kuoruan pushed a commit to kuoruan/teslamate that referenced this pull request Oct 13, 2025
…eslamate-org#4988)

* mimic the elixir code to determine phases

* docs: update changelog

---------

Co-authored-by: Jakob Lichterfeld <[email protected]>
@sdwalker
Copy link
Contributor

Had to revert this one to fix errors with the Charge Details and Power panels on the dashboard

@swiffer
Copy link
Collaborator Author

swiffer commented Oct 26, 2025

@sdwalker could you elaborate whats broken for you / share charges and charging process data that is affected?

@sdwalker
Copy link
Contributor

sdwalker commented Oct 26, 2025

Any DC supercharging (US only?) session is broken
Looking through all of the old supercharging charges with this commit reverted the phases are always zero

AC (split-phase) charging sessions are fine

@swiffer
Copy link
Collaborator Author

swiffer commented Oct 26, 2025

Same here - will come up with a fix tomorrow morning!

swiffer added a commit that referenced this pull request Oct 27, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:dashboard Related to a Grafana dashboard enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Phase Correction in Charging Details Dashboards leads to wrong data Incorrectly displays 2 phase charging (while really there are 3)

4 participants