Skip to content

Latest commit

 

History

History
188 lines (110 loc) · 6.44 KB

README.md

File metadata and controls

188 lines (110 loc) · 6.44 KB

TeslaMate - Custom dashboards for Grafana

GitHub release (latest by date) GitHub Repo stars GitHub Discussions GitHub

Here you will find a series of original dashboards to expand those included by default in Teslamate to fully squeeze the data of your Tesla.

These Custom Dashboards have been tested with versions of Teslamate v1.27.1+ and Grafana v8.5.6 or higher


Video guide in YouTube

Now you can see in Youtube the complete guide to install and update my Custom Dashboards for Teslamate.

👉 https://youtu.be/cwnxMrnym0I

The video has subtitles enabled.


Import dashboards automatically with dashboards.sh

With this script (dashboards.sh), you can download de latest release and install automatically all dashboards. But, first of all, you need to generate a API KEY in your Grafana (HOW-TO). You do not need to stop the Grafana service if you have it installed under docker and it will allow you to do it both locally and remotely.

If this is your first time using the new dashboards.sh, you have to generate a configuration file; don't worry, dashboards.sh will guide you step by step.

List of options

Option 1: Generate config file

Attention! If you already had a configuration file created and you complete the wizard, it'll completely overwrite your previous configuration.

The questions that the wizard will ask you to generate the configuration file are the following:

  • Enter the Grafana URL: Specifies the URL of the Grafana instance without / at the end (e.g. http://localhost:3000)
  • Enter the Grafana TOKEN: Specifies the security key of the API, it's generated in Grafana (HOW-TO).
  • Path of the dashboards directory: Enter the relative or absolute path of the dashboards directory, default is ./dashboards.

When you have completed the wizard, a file named config.sh will be created in the same directory as dashboards.sh.

Option 2: Download and install/update the latest version

This option downloads the latest stable version published on GitHub. At the end of the process.

Next, all the dashboards that are in the indicated directory in your Grafana will be installed or updated.

HOW-TO: Create a Grafana API key

  1. Sign in to Grafana, hover your cursor over Configuration (the gear icon), and click API Keys
  2. Click "Add API key"
  3. Enter a unique name for the key, e.g. "Import dashboards"
  4. In "Role", select Admin option
  5. In "Time to live" enter for example "1d" for 1 day, "1m" for 1 month or "1y" for 1 year
  6. Click Add

More info in Grafana documentation page.


Create cron job to autoupdate the Custom Dashboards

If you want, you can create a cron job and forget about updating the dashboards to the latest release.

The first thing you have to do is edit the crontab file of your user:

crontab -e

The format of a cron is as follows:

Structure cron

Here is an example that will run every day at 2am and the dashboards.sh file is located in the absolute path "/home/user/dashboards.sh".

0 2 * * * sh /home/user/dashboards.sh autoupdate > /dev/null

Import dashboards manually

  1. Sign in to Grafana
  2. Click in "Dashboards" option and select "Browse"
  3. Create a personal folder, e.g. "Teslamate - Custom"
  4. Go to new folder
  5. Press the "Import" button
  6. Press the "Upload JSON file" button
  7. Select JSON file from your computer
  8. And finally, press the "Import" button

Screenshots

Current Charge View

Charging Curves

Battery Health

Battery Health

Charging Tops

Charging Tops

Charging Costs Stats

Charging Costs Stats

Charging Curves

Charging Curves

Drive Tops

Drive Tops

Tire Pressure

Tire Pressure

Overview v2

Expanded version of the original Teslamate dashboard

Overview v2

States v2

Expanded version of the original Teslamate dashboard

States v2

Drives v2

Expanded version of the original Teslamate dashboard

Drives v2

Locations v2

Expanded version of the original Teslamate dashboard

Locations v2

Charges v2

Expanded version of the original Teslamate dashboard

Charges v2

Contributing

Feel free to help with Pull Requests when you were able to fix things or add new interesting information. I'll really appreciate any enhancement or suggestion.

Coffee and referrals

If you like my work and want to support me, you can invite me a coffee, I'll appreciate a lot! Your support will help me to continue improving these contents.

https://paypal.me/CarlosCuezva

Another way to support me is to use my referral code to purchase a Tesla product, we'll both get credits to redeem for exclusive rewards like free SuperCharger recharges, merchandise and accessories.

https://ts.la/carlos45671

Credits

License

Distributed under MIT license