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

Statistics and Trip display are inconsistent #3832

Closed
1 task done
Fred3343 opened this issue Apr 10, 2024 · 14 comments · Fixed by #3862
Closed
1 task done

Statistics and Trip display are inconsistent #3832

Fred3343 opened this issue Apr 10, 2024 · 14 comments · Fixed by #3862
Labels
area:dashboard Related to a Grafana dashboard note:more information needed The reporter has to provide more information undetermined Not sure if this is considered a real bug

Comments

@Fred3343
Copy link

Is there an existing issue for this?

  • I have searched the existing issues

What happened?

In the statistics display, the Distance displayed on April 9, 2024 is 2km, but when I clicked on the date to enter the interface of that day, my actual Distance was 77.9 km. I had this problem recently
image
image

Expected Behavior

I think they're a match. I was fine

Steps To Reproduce

No response

Relevant log output

teslamate_1  | waiting for postgres at database:5432
teslamate_1  | 2024-04-10 09:40:29.886 [info] Migrations already up
teslamate_1  | 2024-04-10 09:40:34.112 [info] System Info: Erlang/OTP 26 (jit)
teslamate_1  | 2024-04-10 09:40:34.112 [info] Version: 1.28.3
teslamate_1  | 2024-04-10 09:40:34.685 [info] POST https://auth.tesla.cn/oauth2/v3/token -> 200 (492.022 ms)
teslamate_1  | 2024-04-10 09:40:34.685 [info] Refreshed api tokens
teslamate_1  | 2024-04-10 09:40:34.690 [info] Scheduling token refresh in 6?h
teslamate_1  | 2024-04-10 09:40:34.696 [info] Running TeslaMateWeb.Endpoint with cowboy 2.10.0 at :::4000 (http)
teslamate_1  | 2024-04-10 09:40:34.699 [info] Access TeslaMateWeb.Endpoint at http://localhost
teslamate_1  | 2024-04-10 09:40:34.978 [info] GET /settings
teslamate_1  | 2024-04-10 09:40:35.007 [info] Sent 200 in 27ms
teslamate_1  | 2024-04-10 09:40:35.098 [info] Starting logger for '换新版 Model 3'
teslamate_1  | 2024-04-10 09:40:35.117 [info] MQTT connection has been established
teslamate_1  | 2024-04-10 09:40:35.305 car_id=1 [info] Start / :asleep
teslamate_1  | 2024-04-10 09:40:38.760 [info] tzdata release in place is from a file last modified Fri, 22 Oct 2021 02:20:47 GMT. Release file on server was last modified Thu, 01 Feb 2024 18:40:48 GMT.
teslamate_1  | 2024-04-10 09:40:41.038 [info] Tzdata has updated the release from 2021e to 2024a
teslamate_1  | 2024-04-10 09:45:35.349 [info] Update available: 1.28.3 -> 1.28.5

Screenshots

image

image

Additional data

No response

Type of installation

Docker

Version

1.28.3

@JakobLichterfeld
Copy link
Collaborator

JakobLichterfeld commented Apr 10, 2024

Thanks for reporting. Even if it seems unrelated, please use latest version, which is as of now 1.28.5

@JakobLichterfeld JakobLichterfeld added undetermined Not sure if this is considered a real bug area:dashboard Related to a Grafana dashboard note:more information needed The reporter has to provide more information labels Apr 10, 2024
@JakobLichterfeld
Copy link
Collaborator

Additional your second screenshot shows timeframe from 2024-04-09 till 2024-04-10

@JakobLichterfeld
Copy link
Collaborator

JakobLichterfeld commented Apr 10, 2024

I'm not able to reproduce on teslamate 1.28.5

@DrMichael
Copy link
Collaborator

DrMichael commented Apr 10, 2024

Hmmm, interesting. In the first screenshot of drives, there is an entry as of 2024/09/04 01:... of 35km. Although the range does not include that time. Difficult to track that down, when not in Shangai timezone...
If the system/browser timezone is also Asia/Shanghai, the daily stats should start at 00:00, not 08:00.
@Fred3343 can you please check the timezone setting in Home->Administration->General->Default preferences

@Fred3343
Copy link
Author

Hmmm, interesting. In the first screenshot of drives, there is an entry as of 2024/09/04 01:... of 35km. Although the range does not include that time. Difficult to track that down, when not in Shangai timezone... If the system/browser timezone is also Asia/Shanghai, the daily stats should start at 00:00, not 08:00. @Fred3343 can you please check the timezone setting in Home->Administration->General->Default preferences

Thank you for your answer. My default time zone is Shanghai, which has been shown as 8:00 when I first deployed it

@Fred3343
Copy link
Author

Additional your second screenshot shows timeframe from 2024-04-09 till 2024-04-10

Thank you. Yes, the content shown in the second picture is correct.

@Fred3343
Copy link
Author

Please note that I also found a problem, this problem may not be important, my server time zone is Shanghai, but the data stored in my database is not saved according to the time of Shanghai, my browser time zone is also Shanghai. I don't know if this is normal.

@DrMichael
Copy link
Collaborator

DrMichael commented Apr 11, 2024

I am a bit confused, why Grafana says CST as timezone...
image

(Ah, date and times in the database are stored in UTC, I think to remember.)

@Fred3343
Copy link
Author

I am a bit confused, why Grafana says CST as timezone... image

(Ah, date and times in the database are stored in UTC, I think to remember.)

In Grafana's time bar, the CST is always displayed

@DrMichael
Copy link
Collaborator

DrMichael commented Apr 11, 2024

When you click on the range, you should get information about the timezone used:
image
And possibility to change it.

@DrMichael
Copy link
Collaborator

@Fred3343 you might want to try the new version in #3857 (comment)

@DrMichael
Copy link
Collaborator

PR created #3862. Please test and discuss there.

@DrMichael
Copy link
Collaborator

@Fred3343
Copy link
Author

@Fred3343 could you test latest version https://github.com/DrMichael/teslamate/blob/master/grafana/dashboards/statistics.json?

I tested the statistics.json and I'm sure it works, thanks

@cwanja cwanja linked a pull request May 2, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:dashboard Related to a Grafana dashboard note:more information needed The reporter has to provide more information undetermined Not sure if this is considered a real bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants