Skip to content
API Scraper for pulling Vehicle Statistics from the Tesla Owner API into an InfluxDB + Grafana Dashboards
Python Shell Dockerfile
Branch: master
Clone or download
Pull request Compare This branch is 49 commits ahead, 1 commit behind lephisto:master.
Geczy and gundalow Update
Co-Authored-By: John R Barker <>
Latest commit ea46ab1 Jul 25, 2019
Type Name Latest commit message Commit time
Failed to load latest commit information.
data refactor(docker): use data/ rather than rely on /opt Jul 23, 2019
grafana-dashboards Fix temperature not showing in defined variable Jul 23, 2019
grafana-datasources Revert "Revert "Implement a fully-Dockerized setup."" Jan 23, 2019
provisioning First working Docker-Compose Version Apr 15, 2019
screenshots Optimize screenshots, save 64% filesize Jul 23, 2019
scripts feat(docker-compose): add influx healthcheck & template apiscrapers Jul 23, 2019
.gitignore feat(docker-compose): add influx healthcheck & template apiscrapers Jul 23, 2019
Dockerfile Update Dockerfile Jul 23, 2019
Dockerfile.compose refactor(Dockerfile): simplify Dockerfile Jul 23, 2019
LICENSE Initial commit Jan 12, 2019 Update Jul 25, 2019 Included modified with API Info in Jan 12, 2019 Added offline check to reduce polling. Jun 20, 2019 Added Systemd Service file for docker Apr 17, 2019 Added Systemd Service file for docker Apr 17, 2019 fix(dashboard2docker): mac-compatible sed syntax Jul 23, 2019
docker-compose.yml Update docker-compose.yml Jul 24, 2019 Update Jul 25, 2019
requirements.txt migrate to python 3 Apr 13, 2019 Fix lephisto#51 Invalid Field Format Jun 16, 2019
tesla-apiscraper.service Service definition Apr 17, 2019 Removed redundant functionality, saved rpc calls Jan 21, 2019

Welcome to Tesla API Scraper 👋

Putting an end to handing out the Key for your >$100k car to a third party you don't know.

Selfhosted API Scraper for pulling Vehicle Telemetry from the Tesla Owner API into an InfluxDB visualisation on Grafana Dashboards.

Known to work with Model S, X and 3. Capable of handling multiple Vehicles in one Tesla Account

Driving Dashboard


Paste the following in your terminal

# Enter your email and password to your account

git clone && cd tesla-apiscraper && bash $teslaEmail $teslaPassword


After the install you can reach the scraper at http://localhost:3000

Default u/p is admin/admin

Both logfile (apiscraper.log) and the config file ( are mapped outside the Docker container, so you can view / change these whenever you'd like. After changing, just restart the container.

If you ever want to update the stack:

git pull
docker-compose rm --force --stop apiscraper
docker-compose build apiscraper
docker-compose up -d

Migrate from lephisto/tesla-apiscraper to lunars/tesla-apiscraper

If you're coming from the original repo, you can just update your instance to Lunars

git remote rename origin upstream
git remote add origin
git branch --set-upstream-to origin/master master
git pull

Known Limitations and issues

  • If you narrow down Timefilter too much, and there are no Measurements, you won't see anything in the Graph and Discrete.
  • The Code is far from being clean and in some way spaghetti'ish. This will be cleaned up in future Versions.
  • Boolean Values from the API currently won't show

Some remarks about the APIScraper

  • As stated below, the API is crafted for being used by the IOS or Android app. One challenge was to implement a reliable sleepmode. If the car is awake, the API keeps it awake, as long as requests occur. Once it falls asleep, parts of the API can be called to check the sleep state without waking up the car, however, when the scraper detects that the car doesn't change Values (not driving, not charging), it increases the Poll interval until the Car falls asleep. Once it's asleep it checks the sleepstate every Minute. This ensures, that the stats don't miss relevant portions of rides when the car was just woken up, an issue some other monitoring implementations suffer from.

More Disclaimer

  • Please note that the use of the Tesla REST API in general and the use of this software in particular is not endorsed by Tesla. You use this software at your own risk. The author does not take responsibility for anything related to the use of this software.


  • Multithreaded statpulling
  • Code Cleanup (feel free to send PR :)
  • Move from influxql to it's successor flux, the upcoming query language for InfluxDB
  • Write some Tickscripts for alerting
  • Have a color gradient on geolocation that reflects any metric like speed for instance
  • Improve sleepinitiation


  • Tesla API Interface forked from Greg Glockner (removed pulling Tesla API Credentials from a pastebin whish seemed fishy..)
  • Things stolen from basic Script from cko from the german
You can’t perform that action at this time.