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

feat: use variables in grafana dashboards for battery type #3438

Open
1 task done
JakobLichterfeld opened this issue Nov 16, 2023 · 10 comments
Open
1 task done

feat: use variables in grafana dashboards for battery type #3438

JakobLichterfeld opened this issue Nov 16, 2023 · 10 comments
Labels
area:dashboard Related to a Grafana dashboard enhancement New feature or request kind:idea Idea for new feature or some form of enhancement

Comments

@JakobLichterfeld
Copy link
Collaborator

Is there an existing issue for this?

  • I have searched the existing issues

What happened?

There are different types of batteries, e.g. LFP is normally charged to 100%. Dashboards should reflect this depending on the battery type: see #3311

Expected Behavior

Battery type handled with variables to avoid multiple dashboards for each variant

Steps To Reproduce

No response

Relevant log output

n.a.

Screenshots

No response

Additional data

No response

Type of installation

Docker

Version

v1.27.4

@JakobLichterfeld JakobLichterfeld added the kind:idea Idea for new feature or some form of enhancement label Nov 19, 2023
@swiffer
Copy link
Contributor

swiffer commented Nov 20, 2023

Battery type can be derived from VIN - https://teslawissen.ch/tesla-vin-decoder-so-kannst-du-die-vin-entschluesseln/#ziffer-7-ladetyp-2012-2013-akkutyp-seit-2014

happy to open a PR once current grafana PR are merged.

@swiffer
Copy link
Contributor

swiffer commented Nov 20, 2023

This is what we need for it

https://grafana.com/docs/grafana/v10.1/panels-visualizations/query-transform-data/transform-data/#config-from-query-results

@swiffer
Copy link
Contributor

swiffer commented Nov 22, 2023

@eden881 - do you have a list of Changes done to the LFP Variants of the Dashboards?

Is that all that has been Changed?

Overview - LFP: The battery level gauge has red and yellow zones only on the lower end. The maximum value of the charging kW gauge has been lowered to 170, as this is the maximum DC charging potential for Tesla's LFP batteries.
Charging Stats - LFP: The charge stats table remains green even for entries higher than 80% and 95%.
Battery Health - LFP: The current SOC bar has a red zone only on the lower end

@eden881
Copy link
Contributor

eden881 commented Nov 22, 2023

@eden881 - do you have a list of Changes done to the LFP Variants of the Dashboards?

Is that all that has been Changed?

Overview - LFP: The battery level gauge has red and yellow zones only on the lower end. The maximum value of the charging kW gauge has been lowered to 170, as this is the maximum DC charging potential for Tesla's LFP batteries. Charging Stats - LFP: The charge stats table remains green even for entries higher than 80% and 95%. Battery Health - LFP: The current SOC bar has a red zone only on the lower end

That is correct.

@swiffer
Copy link
Contributor

swiffer commented Nov 23, 2023

Tried editing the Overview Dashboard, works fine for "Charging kw" - however for modifying the Thresholds we do need support for setting multiple values via config I guess

grafana/grafana#77491
grafana/grafana#45803

@JakobLichterfeld JakobLichterfeld added the area:dashboard Related to a Grafana dashboard label Nov 23, 2023
@cwanja
Copy link
Collaborator

cwanja commented Nov 26, 2023

Glad I stumbled through this as I would prefer a similar setup. I think there are two paths forward:

  1. Allow a user driven setting in the Settings page that would flag LFP and the dashboards use that in the logic.
  2. Identify vehicles automatically (if possible) through the API responses.

In my opinion, the dashboard drop down is getting crowed with features that are not relevant to my vehicle. Much like how LFP vehicles have three additional dashboards that are not relevant to them.

@swiffer
Copy link
Contributor

swiffer commented Nov 26, 2023

It can be derived from vin, will modify Dashboards and remove LFP ones as soon as we can Set multiple thresholds via Config from query transformation

@NirKli
Copy link
Contributor

NirKli commented Dec 1, 2023

I've reviewed the potential solution for retrieving information from VIN, but it appears to be inaccurate.
I've begun developing the solution, implementing a flag on the settings page. However, it seems that Grafana does not support conditional thresholds.

@swiffer
Copy link
Contributor

swiffer commented Dec 1, 2023

Thats why I referenced two outstanding Grafana Issues in my Post above

Why is VIN inaccurate for you? Is the information Not correct?

Edit: Ah, i See it's No longer thrustworthy for 2022 Models... Mh that means the setting Option ist better.

@swiffer
Copy link
Contributor

swiffer commented Dec 11, 2023

I've reviewed the potential solution for retrieving information from VIN, but it appears to be inaccurate. I've begun developing the solution, implementing a flag on the settings page. However, it seems that Grafana does not support conditional thresholds.

flag on settings page is not working if there are multiple cars monitored via one teslamate instance.

see my proposal here: #3524 (comment)

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 kind:idea Idea for new feature or some form of enhancement
Projects
None yet
Development

No branches or pull requests

5 participants