teslamate
teslamate copied to clipboard
feat: use variables in grafana dashboards for battery type
Is there an existing issue for this?
- [X] 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
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.
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
@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 - 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.
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
https://github.com/grafana/grafana/issues/77491 https://github.com/grafana/grafana/issues/45803
Glad I stumbled through this as I would prefer a similar setup. I think there are two paths forward:
- Allow a user driven setting in the Settings page that would flag LFP and the dashboards use that in the logic.
- 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.
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
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.
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.
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: https://github.com/teslamate-org/teslamate/issues/3524#issuecomment-1850452981