Open 07stuntar1 opened 2 months ago
Are your charges still being properly logged?
Do you have a LFP Battery? Did you changed your car setting in TeslaMate Webpage to LFP?
Are your charges still being properly logged?
Yes it shows charges being logged
Do you have a LFP Battery? Did you changed your car setting in TeslaMate Webpage to LFP?
I do not have an LFP battery but it was recording on LFP instead of the non lfp when it was separate. I have 2 long range Y 2024 both the same issue.
Any suggestions its still not plotting
Still waiting on your feedback:
Did you changed your car setting in TeslaMate Webpage to LFP?
Additional: Did you played with dashboards? If so, please do
docker compose stop
docker volume ls
to find it then for example docker volume rm teslamate-grafana
docker compose up -d
To add a data point - I'm having the same or similar issue on a fresh install with a 2023 Long Range Y.
All other dashboards, including charging, work except for the battery health. It shows "No Data" for it's sections. The dashboard shows the alert/error: db query error: pq: invalid input syntax for type json
. And in the db logs it looks like:
database-1 | 2024-08-21 17:29:42.705 UTC [8037] ERROR: invalid input syntax for type json at character 98
database-1 | 2024-08-21 17:29:42.705 UTC [8037] DETAIL: The input string ended unexpectedly.
database-1 | 2024-08-21 17:29:42.705 UTC [8037] CONTEXT: JSON data, line 1:
database-1 | 2024-08-21 17:29:42.705 UTC [8037] STATEMENT: SELECT convert_km(AVG(p.odometer)::numeric,'mi') AS odometer,
database-1 | AVG(c.rated_battery_range_km * (''::json -> 'RatedEfficiency')::text::float / c.usable_battery_level) AS "kWh",
database-1 | MAX(cp.id) AS id,
database-1 | to_char(cp.end_date, 'YYYY-MM-dd') AS Title
database-1 | FROM charging_processes cp
database-1 | JOIN (SELECT charging_process_id, MAX(date) as date FROM charges WHERE usable_battery_level > 0 GROUP BY charging_process_id) AS last_charges ON cp.id = last_charges.charging_process_id
database-1 | INNER JOIN charges c
database-1 | ON c.charging_process_id = cp.id AND c.date = last_charges.date
database-1 | INNER JOIN positions p ON p.id = cp.position_id
database-1 | WHERE cp.car_id = 1
database-1 | AND cp.end_date IS NOT NULL
database-1 | AND cp.charge_energy_added >= (''::json -> 'RatedEfficiency')::text::float
database-1 | GROUP BY 4
database-1 | 2024-08-21 17:29:42.705 UTC [8039] ERROR: invalid input syntax for type json at character 157
database-1 | 2024-08-21 17:29:42.705 UTC [8039] DETAIL: The input string ended unexpectedly.
database-1 | 2024-08-21 17:29:42.705 UTC [8039] CONTEXT: JSON data, line 1:
database-1 | 2024-08-21 17:29:42.705 UTC [8039] STATEMENT: SELECT
database-1 | ROUND(MIN(convert_km(p.odometer::numeric,'mi')),0) AS "M-Odometer",
database-1 | ROUND(PERCENTILE_CONT(0.5) WITHIN GROUP(ORDER BY c.rated_battery_range_km * (''::json -> 'RatedEfficiency')::text::float / c.usable_battery_level)::numeric,1) AS "M-kWh",
database-1 | to_char(cp.end_date, 'YYYYMM') || CASE WHEN to_char(cp.end_date, 'DD')::int <= 15 THEN '1' ELSE '2' END AS Title
database-1 | FROM charging_processes cp
database-1 | JOIN (SELECT charging_process_id, MAX(date) as date FROM charges WHERE usable_battery_level > 0 GROUP BY charging_process_id) AS last_charges ON cp.id = last_charges.charging_process_id
database-1 | INNER JOIN charges c
database-1 | ON c.charging_process_id = cp.id AND c.date = last_charges.date
database-1 | INNER JOIN positions p ON p.id = cp.position_id
database-1 | WHERE cp.car_id = 1
database-1 | AND cp.end_date IS NOT NULL
database-1 | AND cp.charge_energy_added >= (''::json -> 'RatedEfficiency')::text::float
database-1 | GROUP BY 3
To add a data point - I'm having the same or similar issue on a fresh install with a 2023 Long Range Y.
Thanks for reporting. How many charges did you have logged with TeslaMate?
@jheredianet May I ask you to investigate the above issue? It's a fresh install, therefore I assume the user did not play with the dashboard by himself.
To add a data point - I'm having the same or similar issue on a fresh install with a 2023 Long Range Y.
database-1 | AVG(c.rated_battery_range_km * (''::json -> 'RatedEfficiency')::text::float / c.usable_battery_level) AS "kWh",
@07stuntar1 @bigethan have in mind that for these estimations all depends on your charges to calculate the efficiency and plot in the graph.
@bigethan As I can see in the previous query RatedEfficiency is blank (null), it's because we only consider chargers that have the following conditions to get the rated efficiency:
Then to plot in the graph, we only plot chargers that have kWh charged more than the rated efficiency.
@07stuntar1 as I can see in your previous screenshots your efficiency is 240 wh/mi (or 149 wh/km), so in the plotted graph you will only see your charge sessions where you added more than 14.9 kWh.
Yo only have some charge sessions with that condition, that's why they are not plotted because only charges (added kWh) greater than your efficiency is considered to have a better estimate of battery degradation and not to dirty the samples with short charges that do not allow the BMS to have a better reading of the battery cells state.
Thanks so much! In summary, the dashboard works as expected and the error message could be improved.
To add a data point - I'm having the same or similar issue on a fresh install with a 2023 Long Range Y.
database-1 | AVG(c.rated_battery_range_km * (''::json -> 'RatedEfficiency')::text::float / c.usable_battery_level) AS "kWh",
@07stuntar1 @bigethan have in mind that for these estimations all depends on your charges to calculate the efficiency and plot in the graph.
@bigethan As I can see in the previous query RatedEfficiency is blank (null), it's because we only consider chargers that have the following conditions to get the rated efficiency:
- duration > 10 minutes (because we need to get stable data rated, sometimes battery is cold and not enough to rate both in AC and DC)
- battery level <= 95 (after that level charger is not efficient and the charging power drops a lot)
Then to plot in the graph, we only plot chargers that have kWh charged more than the rated efficiency.
@07stuntar1 as I can see in your previous screenshots your efficiency is 240 wh/mi (or 149 wh/km), so in the plotted graph you will only see your charge sessions where you added more than 14.9 kWh.
Yo only have some charge sessions with that condition, that's why they are not plotted because only charges (added kWh) greater than your efficiency is considered to have a better estimate of battery degradation and not to dirty the samples with short charges that do not allow the BMS to have a better reading of the battery cells state.
Thank you ill try and space out my charges to see how it works out.
Is there an existing issue for this?
What happened?
Can someone please help. I hadn't updated in a few upgrades but Battery Health and Battery Health LFP were combine and for some reason I lost data points and it's still not graphing. Prior if I were to click on Battery Health it would occasionally plot. (pic below) LFP data would plot on every charge but since has dissaperad and only see Battery Health. Someone mentioned my data base could be missing point but it still does not seem to plot new points with the latest update. Im not sure what i need to do to fix it. It seem like all other data is being recorded.
Expected Behavior
Data to be plotted
Steps To Reproduce
No response
Relevant log output
Screenshots
Additional data
No response
Type of installation
Docker
Version
1.30.0