Replies: 14 comments 10 replies
-
Easiest way is to run See #2719 (comment) as I did miss some, thanks @kodek ! |
Beta Was this translation helpful? Give feedback.
-
Note that if you only delete the rows in the DELETE FROM car_settings WHERE id = 1234; (where 1234 is the ID removed from the To summarize:docker exec -it my_database_container psql -U teslamate -W teslamate SELECT id, vin FROM cars;
Assuming DELETE FROM cars WHERE id = 1;
DELETE FROM car_settings WHERE id = 1; (Could we get a UI option? :)) |
Beta Was this translation helpful? Give feedback.
-
@adriankumpf Can we re-open this feature request? :) |
Beta Was this translation helpful? Give feedback.
-
How is this still not implemented? |
Beta Was this translation helpful? Give feedback.
-
Feel free to send a PR with a fix! |
Beta Was this translation helpful? Give feedback.
-
Sorry for the dumb question but is there a way to see what my database is called? I've tried "database" and "teslamate", but I always get the error "no such container" I looked in the Grafana settings and under "Data Source / Teslamate" it says that the database is actually called "teslamate". |
Beta Was this translation helpful? Give feedback.
-
The database container is called as in docker-compose.yml, database if not changed. The database to work on is called teslamate (if not changed). |
Beta Was this translation helpful? Give feedback.
-
The capability to remove and indefinitely hide one of the Tesla's on my account would be very useful to me. |
Beta Was this translation helpful? Give feedback.
-
I finally ran into the renal use case lol. My car is in the body shop so I have a loaner from Tesla and it gets added to the account. I'd help with a PR but I don't know elixir 😭 Thankfully I found the fix earlier so I can use my own recommendation finally lol. |
Beta Was this translation helpful? Give feedback.
-
Hello, @CptCheesyCrust I ran into the same problem... Execute the command sudo docker-compose exec database psql teslamate teslamate I wanted to fully clean the tables so I looked into each of them to see whether there were removable lined from my previous vehicule without harming the data from my second one. I ended up with the following commands to execute: DELETE FROM cars WHERE id = 1; WARNING! When it comes to the table charges, I did not find any car identifier so I looked for the id from my last charging session with my previous vehicule and the id of my first session with my second vehicule (i.e. 131646 & 131647) The biggest table is positions, there were more than 5 000 000 rows to remove there. No Stress when it comes to the execution time, it took 14 minutes to remove 40000km data of my first Tesla. Hope this helps! So far So good on my end! |
Beta Was this translation helpful? Give feedback.
-
Thanks! I knew I had seen a discussion around this and put some notes in here, too: #3074 |
Beta Was this translation helpful? Give feedback.
-
Hi, |
Beta Was this translation helpful? Give feedback.
-
I hate deleting data - and storage is cheaper than ever. Maybe I want to have a look at driving data from my old Tesla in 5 years time etc etc. An alternative is to simply hide vehicles from Grafana, this can be done by changing the dashboard variable car_id that get set from DB query. We add a list of car IDs to not include, by adding the line
And Grafana nicely gives you a preview when changing this, so you don't even need to know your IDs, just change the values until you only have the car(s) you want to show. When you save the dashboard you can't (Cannot save provisioned dashboard) - so you need to Save As, but you can then overwrite the original, and it needs to be done for each dashboard - and of course as it is custom change it will be overwritten by an update. Instructions:
|
Beta Was this translation helpful? Give feedback.
-
Hi (NEW) team. Please can we get a GUI option to
|
Beta Was this translation helpful? Give feedback.
-
I had been using Teslamate with 2 cars in my account. Got rid of one of the cars. Is it possible / how do I remove that car from the database?
Beta Was this translation helpful? Give feedback.
All reactions