-
Notifications
You must be signed in to change notification settings - Fork 769
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
Update duration 0 and charge logged not completely #2181
Comments
Is this maybe corresponding to the tesla server problems? https://winfuture.de/news,126546.html |
That is already fixed: #2125 It was a display issue. |
well, it seems not for me. I have several charges since the last software update and the counter still says "0" for the duration and "0" charges on this software revision in the "Updates" tab. Also the average rated range value is missing. I just checked again, I am using the latest teslamate version. Do I have to adjust something manually? But this is just an "nice to have" information - much more I am interested in how to fix the missing charging data? |
Oh, I only meant the duration of updates in timeline |
Ok, so I have fixed the duration now with this: update updates set end_date='2021-11-19 16:21:34' where id='17'; where does this "Updates" view take the "# of charges" and the "avg rated range" values, so that I can fix that too? |
And I added the missing charging data manually now, by updating the charge in the table "charging_processes". I updated the following columns (i calculated the values by the following data in the timeline and based on other charge values): end_ideal_range_km='373.00' is this enough, or did i forgot something there? (I do not mind the missing charging details for the graphs with soc, voltage...) |
noone can answer this? where does this "Updates" view take the "# of charges" and the "avg rated range" values, so that I can fix that too? |
Concerning # of charges in Updates: What do you get with |
2 charges, which is correct
|
Sorry, out of ideas... |
Today I had a Ranger visit (to install the Homelink module) and he did an "Update" to enable the functionality. I now have the values for the Version where it was missing before, but now have again no values for the recent version. The Version numbers are the same unfortunately... It seems that a counter or anything like that went wrong in my installation due to the initial problems. If I do the query select count(*) from charging_processes where start_date BETWEEN '2011-11-19' AND '2021-11-28'; I get 143 as a result. But when I look at the "Charging Stats" page, it shows only 140 total number of charges...? I tried to read through the SQL in the grafana settings for "Updates" - but it is too complicated for me to understand (I am more the code guy, just basic dba stuff - enough to do simple cud operations, but thats it pretty much). Maybe someone with a better understanding can explain or figure it out with that possible hint? Also I am offering a tip for solving it, for sure - it seems it is getting very deep into it now. 18 | 2021-11-29 10:24:55.821 | 2021-11-29 10:33:40.1 | 2021.36.5.8 43e7bf261905 | 1 EDIT: the difference in the total number of charges is a result of the filter "charge_energy_added > 0.01" in the grafana page. |
new update on this: I have now inspected the code for the Updates table in grafana. I figured out, that there is definitely a problem: The following query (it is a subquery of the original query) delivers a wrong line: select *, coalesce(lag(start_date) over(order by start_date desc), now()) as next_start_date result: you can see in id 18, the next_start_date is in the year 1934... I do not know where this comes from, since I do not have any start date like this in the table "updates"? following the logic of the query, in the result line id 18 the value should be the result of now()? |
Oh, what gives |
yes, that was the path I was looking for. Indeed it gives 1934-08-23 00:57:36+00 interesting: the result of now() stays the same, always... but date on the servers console shows: Mon 29 Nov 14:32:42 CET 2021 how do i set the correct time for this (I guess the docker container?) |
Either the database or the grafana container:
|
it seems both are wrong: pi@rp-tesla:~ $ docker-compose exec grafana date also it seems, the problem occured due the update to version 1.25 - I have this problem since the update of teslamate and it has nothing to do with charges, updates etc. of tesla itself... pi@rp-tesla:~ $ docker container ls edit: I tried restarting docker (down / up) and also restarting the machine completely - none worked |
We are talking of the standard container images, right? Why don't you make a backup, remove all images and containers, make a fresh pull and up and restore the backup? (Or do you happen to have another machine to read in the backup?) |
correct, the standard container images. I now made a specific backup of the db, removed everything (deleted the volumes), also updated postgres to v13 (since this is a good opportunity), pulled the containers, stopped teslamate to not insert data while restoring, and finally restored the db and started teslamate again. the process itself worked fine, all data still here - but still the date issue exists. My backup strategy is usually per machine. So if anything fails, I have complete disk images to restore. I also tried this, with the same (expected) result: date issue still exists. Is there any possibility that me running a 64bit Kernel on my pi caused this issue - the OS itself is 32bit? I mean I have switched to 64bit kernel several months ago, but this wrong-date-problem exists only since the last teslamate update to version 1.25. None of the previous updates caused problems - I also tried to disable the 64bit kernel and rebooted the machine with the 32bit Kernel, but still no change with the date issue. PostgreSQL Database directory appears to contain a database; Skipping initialization EDIT: well, it seems there was an issue with docker itself. I recieved a docker upgrade via apt and after a restart, I get time!: AND I do not know what resolved the issue exactly, but in the "Updates" I now see the number 0 in the # of charges (which is correct, I recieved an update from tesla today). But 0 is better than no value. I am wondering, if I was the only one who had this issue - or the only one who cared? Now only the "avg rated range" is an empty value - is that normal, since there was no drive since the tesla update? |
For me the root cause is still unknown. Facts show, that there was an error existing since a tesla update and a teslamate update on the same day. The issue was mainly resolved by manually editing data in the db and applying a docker update via apt. Thanks to @DrMichael for your time and help |
Is there an existing issue for this?
What happened?
Expected Behavior
Steps To Reproduce
Update Tesla to 2021.26.5.8
Charge the Tesla
View wrong/missing values in teslamate
I tried to correct it (unsuccessful) with the following command, where 141 is the id of the wrong logged charge:
docker-compose exec teslamate bin/teslamate rpc "TeslaMate.Repo.get!(TeslaMate.Log.ChargingProcess, 141) |> TeslaMate.Log.complete_charging_process()"
Relevant log output
Screenshots
Additional data
charges.csv
charging_processes.csv
Type of installation
Docker
Version
1.25.0
The text was updated successfully, but these errors were encountered: