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

add moving average / percentiles to charge level and support longer periods #4200

Merged

Conversation

swiffer
Copy link
Contributor

@swiffer swiffer commented Sep 15, 2024

Successor of #4187

added several parameters to allow flexible sizing of bucket width & option to disable the percentiles

before:
charge-level

after:
grafik

Copy link

netlify bot commented Sep 15, 2024

Deploy Preview for teslamate ready!

Name Link
🔨 Latest commit 8193581
🔍 Latest deploy log https://app.netlify.com/sites/teslamate/deploys/66e7f2361598ae000809d6c5
😎 Deploy Preview https://deploy-preview-4200--teslamate.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@swiffer swiffer force-pushed the moving_average_percentiles branch from 8f717f8 to 62a3fd1 Compare September 15, 2024 17:31
@swiffer swiffer force-pushed the moving_average_percentiles branch from 62a3fd1 to 76bedd5 Compare September 15, 2024 17:40
@swiffer
Copy link
Contributor Author

swiffer commented Sep 15, 2024

@JakobLichterfeld - ok, should be ready for testing!

@JakobLichterfeld JakobLichterfeld added enhancement New feature or request area:dashboard Related to a Grafana dashboard labels Sep 16, 2024
Copy link
Collaborator

@JakobLichterfeld JakobLichterfeld left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks so much!

grafana/dashboards/charge-level.json Outdated Show resolved Hide resolved
@swiffer swiffer force-pushed the moving_average_percentiles branch from 76bedd5 to 8193581 Compare September 16, 2024 08:54
@JakobLichterfeld JakobLichterfeld merged commit c64384f into teslamate-org:master Sep 16, 2024
12 checks passed
@swiffer
Copy link
Contributor Author

swiffer commented Sep 16, 2024

@JakobLichterfeld - will add a small follow up PR - need to increase generate series to correctly calculate the average for the first 15 days...

@JakobLichterfeld
Copy link
Collaborator

will add a small follow up PR - need to increase generate series to correctly calculate the average for the first 15 days...

no worries, love the eagle eyes.

@stauffenberg2020
Copy link
Contributor

@swiffer , How do you plan to use this moving average?

@swiffer
Copy link
Contributor Author

swiffer commented Sep 16, 2024

I don't know. First interesting to see how charge level / battery usage changes over time and how much capacity is used usually... would be great to compare curves with other users and ensure percentiles always stay within the green lines. No deep knowledge about recommended charge levels here, sorry.

@jim0266
Copy link

jim0266 commented Nov 19, 2024

I don't understand the changes made to the charge level. It no longer displays the actual charge level of my car. How is this better? What am I suppose to glean from this data? Is there any documentation explaining the changes to charge level? Thanks.

@swiffer
Copy link
Contributor Author

swiffer commented Nov 19, 2024

Hi @jim0266 - you are not seeing the yellow line anymore?

grafik

we are making use of date_bin for charge level which is available from PostgreSQL 14 onwards - what version are you using?

@jim0266
Copy link

jim0266 commented Nov 19, 2024

Screenshot 2024-11-19 at 10 23 32 AM

I'm missing battery level and usable battery level.

Hopefully this screenshot helps. From 9/4 to 9/14 we took at 3,300 mile trip. We charged as high as 90% on 9/5 and went as low as 16% later in the trip. None of that is captured in my data or I don't know how to configure it now to show that.

How can I see this accurate data? I'm not sure what use the current data is to me. What is it trying to tell me?

I'm also showing a DB error is this is part of the problem.

Thanks for any help or insights.

@swiffer
Copy link
Contributor Author

swiffer commented Nov 19, 2024

you need to upgrade your postgres instance - see here for instructions - and ensure you have a backup!

https://docs.teslamate.org/docs/maintenance/upgrading_postgres

@jim0266
Copy link

jim0266 commented Nov 19, 2024

All was good until this last step:

root@teslaserver:~# docker compose start teslamate
WARN[0000] The "apr1" variable is not set. Defaulting to a blank string.
WARN[0000] The "vp9ymblq" variable is not set. Defaulting to a blank string.
WARN[0000] The "o6stCrEwF1q3cnC7pD1y2" variable is not set. Defaulting to a blank string.
WARN[0000] The "apr1" variable is not set. Defaulting to a blank string.
WARN[0000] The "vp9ymblq" variable is not set. Defaulting to a blank string.
WARN[0000] The "o6stCrEwF1q3cnC7pD1y2" variable is not set. Defaulting to a blank string.
WARN[0000] /root/docker-compose.yml: version is obsolete

For the version I used 17.1, which is the latest stable version of Postgres. I am hosted at Vultr.

database:
image: postgres:17.1

Thanks!

@swiffer
Copy link
Contributor Author

swiffer commented Nov 19, 2024

can you compare the docker compose file with the one mentioned in the docs or post it here (redacted (passwords)).

@JakobLichterfeld
Copy link
Collaborator

Please open a separate Ticket, explain what you have done, post your docker-compose.yml (without secrets)

@teslamate-org teslamate-org locked as resolved and limited conversation to collaborators Nov 19, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area:dashboard Related to a Grafana dashboard enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants