Blog Layout

Tesla Dashboard

Sarthak Nautiyal • April 4, 2021

Building a real time dashboard from Tesla APIs


Introduction

If you own a Tesla, there is a good chance you fell in love with all of the advanced technology your vehicle puts at your fingertips. Geeking out about all of the things your car can do has become a favorite pastime of Tesla owners. While autopilot, sentry mode, fart mode, frequent firmware updates, ludicrous mode, easter eggs, games, etc. are all go-tos when showing off unique capabilities, there is one really amazing feature that you probably haven’t taken advantage of yet — the Tesla API.

Tesla’s instrumentation panels give you unmatched real-time information about what is happening in and around your car while you drive. However, it cannot let you see a historical log of information like where you have been, your battery charge history, or how hot/cold it got in your car last night.

So the objective of this project was to collect all the data from my car , store it and then analyze it . This will help me in understanding my car better.

Architecture

New ParagraphThe architecture is quite simple and straightforward.

  1. Periodically get details from the car.
  2. Persist the information.
  3. Use the persisted information to create dashboards.


Code:

git repository : https://github.com/nautiyal-sarthak/tesla-dash.

The DashBoard:

I have used the python library "Dash" for creating this dashboard, following are a few screenshots for the same.

The main screen of my dashboard will provide the overall information of my ownership. things like the

  • Distance traveled
  • Overall efficiency
  • Money spent on charging
  • And the most important thing , the money saved (Comparing with a Honda Civic Assumptions -->fule price = 1.10/L and Fule used per 100 km = 7 L)


New ParagraphAt the detail level I have decided the dashboard into three parts.

  1. Trip details. - Distance traveled , effect of temperature on efficiency
  2. Phantom Loss -- Energy loss while the car is not being used , effect of temperature on energy loss
  3. Savings -- Relation between savings and the distance travelled/ temperature .

the screenshots for the same are provided below.


Share by: