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

Terminate a drive or charge #4450

Open
1 task done
hendrikp123 opened this issue Dec 20, 2024 · 8 comments
Open
1 task done

Terminate a drive or charge #4450

hendrikp123 opened this issue Dec 20, 2024 · 8 comments
Labels
note:more information needed The reporter has to provide more information

Comments

@hendrikp123
Copy link

hendrikp123 commented Dec 20, 2024

Is there an existing issue for this?

  • I have searched the existing issues

What happened?

since my car is parking in a garage with no cellular network, one of my drives is incomplete. So I tried to close it as explained on https://docs.teslamate.org/docs/maintenance/manually_fixing_data.

Tried bin/teslamate rpc \ "TeslaMate.Repo.get!(TeslaMate.Log.Drive, 14) |> TeslaMate.Log.close_drive()" on the docker container bash and also bin/teslamate rpc \ "TeslaMate.Repo.get(TeslaMate.Log.Drive, 14) |> TeslaMate.Log.close_drive()" without ! like explained in the other issues regarding this topic.

I get no log or any information. Drive is still incomplete. Also checked the database directly, only start date is populated.
But it seems the container restarts after both commands (see attached logs)

Expected Behavior

Drive is closed

Steps To Reproduce

No response

Relevant log output

024-12-20 23:23:49.512 [info] System Info: Erlang/OTP 26 (jit)
2024-12-20 23:23:49.512 [info] Version: 1.32.0
2024-12-20 23:23:49.848 [info] POST https://auth.tesla.com/oauth2/v3/token -> 200 (295.250 ms)
2024-12-20 23:23:49.848 [info] Refreshed api tokens
2024-12-20 23:23:49.853 [info] Scheduling token refresh in 6 h
2024-12-20 23:23:49.861 [info] Running TeslaMateWeb.Endpoint with cowboy 2.12.0 at :::4000 (http)
2024-12-20 23:23:49.861 [info] Access TeslaMateWeb.Endpoint at http://localhost
2024-12-20 23:23:50.045 [info] Starting logger for 'Klapperkiste'
2024-12-20 23:23:50.146 car_id=1 [info] Start / :offline
2024-12-20 23:24:52.751 [info] Migrations already up
2024-12-20 23:24:56.809 [info] System Info: Erlang/OTP 26 (jit)
2024-12-20 23:24:56.809 [info] Version: 1.32.0
2024-12-20 23:24:57.181 [info] POST https://auth.tesla.com/oauth2/v3/token -> 200 (330.968 ms)
2024-12-20 23:24:57.181 [info] Refreshed api tokens
2024-12-20 23:24:57.186 [info] Scheduling token refresh in 6 h
2024-12-20 23:24:57.195 [info] Running TeslaMateWeb.Endpoint with cowboy 2.12.0 at :::4000 (http)
2024-12-20 23:24:57.196 [info] Access TeslaMateWeb.Endpoint at http://localhost
2024-12-20 23:24:57.433 [info] Starting logger for 'Klapperkiste'
2024-12-20 23:24:57.524 car_id=1 [info] Start / :offline
2024-12-20 23:25:16.357 [info] Migrations already up
2024-12-20 23:25:20.273 [info] System Info: Erlang/OTP 26 (jit)
2024-12-20 23:25:20.273 [info] Version: 1.32.0
2024-12-20 23:25:20.659 [info] POST https://auth.tesla.com/oauth2/v3/token -> 200 (343.875 ms)
2024-12-20 23:25:20.659 [info] Refreshed api tokens
2024-12-20 23:25:20.664 [info] Scheduling token refresh in 6 h
2024-12-20 23:25:20.671 [info] Running TeslaMateWeb.Endpoint with cowboy 2.12.0 at :::4000 (http)
2024-12-20 23:25:20.672 [info] Access TeslaMateWeb.Endpoint at http://localhost

Screenshots

No response

Additional data

drives2.csv

Type of installation

Docker

Version

v1.32.0

@hendrikp123
Copy link
Author

bash and sh: same problem
also after running the command the docker container bash is closed automatically, so I'm on the OS level bash again

@JakobLichterfeld JakobLichterfeld added the note:more information needed The reporter has to provide more information label Dec 21, 2024
@JakobLichterfeld
Copy link
Collaborator

Thanks for reporting.

Not reproducible here.

Tried bin/teslamate rpc \ "TeslaMate.Repo.get!(TeslaMate.Log.Drive, 14) |> TeslaMate.Log.close_drive()" on the docker container bash and also bin/teslamate rpc \ "TeslaMate.Repo.get(TeslaMate.Log.Drive, 14) |> TeslaMate.Log.close_drive()" without ! like explained in the other issues regarding this topic.

As the command does not match the doc, it is expected to fail.

@hendrikp123
Copy link
Author

hendrikp123 commented Dec 21, 2024

Hi Jakob, thanks for the quick response!
I did use the command as states in the doc or where is the difference? If i use the bash in the Container directly or docker-Compose exec makes no difference for me on the result. How can I provide more info maybe other logs? Thanks! Great tool and work by the way :) greetings from Hamburg!

@JakobLichterfeld
Copy link
Collaborator

JakobLichterfeld commented Dec 21, 2024

Hi Hendrik,

yes and no, the docs say docker compose exec teslamate bin/teslamate rpc \ "TeslaMate.Repo.get!(TeslaMate.Log.Drive, 9999) |> TeslaMate.Log.close_drive()"

In most cases this is an encoding issue with the termina the user uses or something similar.

In your case, the start date does look a bit fishy (2024-12-19 18:04:26.31108, the precision at the end is not expected, expected is 2024-12-19 16:40:08.591)

Great tool and work by the way :)

Thank you, it takes a village.

@hendrikp123
Copy link
Author

tried again, also manually typing in the command to avoid encoding issues due to copy&paste. No success. Also manually fixed the start date on the database directly, also no difference after that. Little bit lost now :)

@JakobLichterfeld
Copy link
Collaborator

What happens if you run: docker compose exec database psql teslamate teslamate and then SELECT FROM drives WHERE id = 14;?

@hendrikp123
Copy link
Author

image got 1 row, only start date filled (now with correct precision) and car id = 1, other columns empty

@JakobLichterfeld
Copy link
Collaborator

ok, really strange behavior. So the drive does exist. @swiffer, do you have any other clues? I'm a bit puzzled.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
note:more information needed The reporter has to provide more information
Projects
None yet
Development

No branches or pull requests

2 participants