A powerful, self-hosted data logger for your Tesla
open sourceAGPL-3.0-or-laterself-hostablefree
TeslaMate is a self-hosted data logger for Tesla cars: it records drives, charges, battery state, software updates and when each car was online or asleep, and lets the car fall asleep as soon as possible so logging adds no vampire drain. It's written in Elixir, stores its data in PostgreSQL and ships more than 20 Grafana dashboards, among them battery health, charging stats, efficiency, projected range, vampire drain, trips and a lifetime driving map. It publishes live vehicle data to an MQTT broker, which is how it connects to Home Assistant, Node-RED and Telegram, and it tracks charge costs, has geofences for custom locations, supports several cars per Tesla account and imports history from TeslaFi and tesla-apiscraper. It runs with Docker Compose (or as a NixOS module) on a machine that's always on, signs in with Tesla API tokens you generate with a separate app, and is free under AGPL-3.0-or-later, with no hosted version.
Ways to install
On your own server
Hosted for you
Package managers
Problems it solves
- I want a detailed log of every drive and charging session of my Tesla on my own server
- track my Tesla's battery degradation over the years without paying for a subscription
- how much does charging my electric car at home actually cost me per month
- a self-hosted TeslaFi alternative that keeps my car's data private
- see where my EV loses range overnight while it's parked (vampire drain)
- my car logger keeps the car awake and drains the battery
- show my Tesla's charge level and location in Home Assistant
- automate my garage or heating based on whether my Tesla is home and charging
- get a Telegram message when my car finishes charging or a software update is available
- a map of everywhere I've ever driven my electric car
- compare my EV's real energy consumption per trip and in different temperatures
- keep a history of the firmware updates installed on my Tesla
- log two Teslas on the same account and compare their efficiency
- export my car's drive history into Grafana dashboards I can customise
- mark home, work and my usual charger as named places so trips read nicely
- move years of TeslaFi history into a logger I run myself
- run a Tesla data logger on a Raspberry Pi in my homelab
- see the projected range of my car at 100% charge over time to judge battery health
- a dashboard of my electric car's charging speed on each supercharger visit
- publish live vehicle data such as speed, charge state and doors to my MQTT broker
Features
- high-precision recording of drives and charging sessions
- lets the car fall asleep as soon as possible so logging adds no vampire drain
- automatic address lookup through OpenStreetMap
- geofences to name custom locations such as home and work
- several vehicles per Tesla account
- charge cost tracking
- import from TeslaFi and tesla-apiscraper
- more than 20 bundled Grafana dashboards, including battery health, charging stats, efficiency, projected range, timeline, trips, vampire drain and a lifetime map
- vehicle data published to a local MQTT broker for Home Assistant, Node-RED and Telegram
- web interface in 19 languages, with light, dark and system themes
View 3 more
- Tesla Fleet API and Fleet Telemetry support for Tesla Business Fleet accounts
- Docker images for amd64 and arm64, and a NixOS module
- guides for HTTP Basic Auth and TLS behind Traefik or Apache
Limitations
- No public API: MQTT is the only supported integration, and reading its database or web routes directly will break without notice6
- Can't recover drives or charges missed while logging was stopped: Tesla's API doesn't provide historical data6
- Doesn't create Tesla API tokens itself: you generate them with a separate app such as Tesla Auth7
- No 32-bit ARM (armv7) images: Raspberry Pi users need a 64-bit OS on a Pi 3 or newer8