GithubHelp home page GithubHelp logo

carloscuezva / dashboards-grafana-teslamate Goto Github PK

View Code? Open in Web Editor NEW
171.0 8.0 16.0 9.36 MB

Custom Grafana Dashboards for Teslamate

License: MIT License

Shell 100.00%
tesla grafana teslamate grafana-dashboard dashboard

dashboards-grafana-teslamate's Introduction

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

dashboards-grafana-teslamate's People

Contributors

carloscuezva avatar jheredianet avatar m1kep avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

dashboards-grafana-teslamate's Issues

charging-curves.json is pulled/restored but not placed or updated in the directory

Hey,

with the newest release v1.23.3 and Teammate 1.28.2 the charging-curves.json was not autoupdated correctly. So I deleted it from the dashboards folder and ran the dashboards.sh again manually.

With the script saying it was pulled and restored. (12 dashboards restored)
Bildschirmfoto 2023-11-27 um 23 27 00

However it is nowhere to be found. (only 11 dashboards)
Bildschirmfoto 2023-11-27 um 23 26 16

I had to manually import it.
Any idea?

DB query errors

Hi , I like your dashboards but why do I get nearly everywere db query errors ?

e.a. db query error: pq: syntax error at or near "*"

image
some of your dashboards are fine too

e.a
image

seems only "battery health" has issues

battery health dashboard from other github is working fine

image

FreeBSD stores bash in /usr/local/bin/bash

Hi,

thanks for this fine project. One minor remark since I run TeslaMate ein a FreeBSD jail, I stumbled over the shebang you're using in the bash script looking for bash in /bin/bash, where freebsd uses /usr/local/bin/bash.

You could make the script more platform agnostic by putting the shebang #!/usr/bin/env bash. See https://unix.stackexchange.com/questions/29608/why-is-it-better-to-use-usr-bin-env-name-instead-of-path-to-name-as-my for some info on the approach.

Best,
Seb

Energy added in Current Charge View not correctly displayed

The Energy added Select in the Current Charge View dose not display correctly.
image
image
image
I have tracked this down to this line in the SQL:
SELECT NOW() as time, MAX(c.charge_energy_added) - MIN(c.charge_energy_added) as charge_energy_added
by removing - MIN(c.charge_energy_added) it displays correctly for me.
image

costes en SuC / other DC

Hola,
He cargado muy raramente en DC no SuC Tesla, y en los paneles correspondientes sale casi todo el coste (como 2/3) para "Otros DC". Me da la impresión de que algo falla con eso para distinguir unos de otros ¿cómo se hace?
Saludos,
Roberto

Improve "Charging Cost Stats" dashboard - Free charged panels

Hey,

on the regular version of the "Charging Cost Stats" dashboard the two "Free charged in total" panels show a zero.
This happens, because all my free charges have no cost defined.

For those panels to output the correct value also for charges with no defined price I had to change:
AND cost = 0
to
AND (cost = 0 OR cost isnull)

Idea : Replay a Drive

Hi,

I would love to be able to stream (or replay-stream?) a drive. Today I can see with beautiful graphs the global trip, but I would like to be able to see live (or re-live) the position with a map, a power gauge, battery level and more but in real time.

Don't specifically need to have a curve, just be able to watch a replay-stream of power, speed, elevation, position and more. Do you think this is possible using Teslamate and Grafana ? I know the database positions gives all that information with time but didn't find a solution yet.

Thanks very much :)

Feature: Add temperature to tire-pressure dashboard and...

It would be nice to have the tire-pressure dashboard track temp (and barometric pressure if available) and have a chart to graph tire pressure vs temp / (barometric_pressure) on per drive and cumulative. Would be interesting to see the effects of temp and barometric pressure on tire pressure over time.

Add support for docker compose import

As a user of both custom dashboards (this & https://github.com/jheredianet/Teslamate-CustomGrafanaDashboards)

Having an option to import dashboards from this repository via docker file, i.e:

volumes:
      - ~/Teslamate-CustomGrafanaDashboards/customdashboards.yml:/etc/grafana/provisioning/dashboards/customdashboards.yml <---- this
      - ~/Teslamate-CustomGrafanaDashboards/dashboards:/TeslamateCustomDashboards <---- this

will be very handy, add config once, and git fetch/pull & recreate container when new update to dashboards are released.

Reference implementation; https://github.com/jheredianet/Teslamate-CustomGrafanaDashboards

Thanks!

Syntax error in dashboards.sh

After running sh dashboards.sh it throws the following error:

dashboards.sh: 36: Syntax error: "(" unexpected (expecting "}")

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.