Teslemetry smart home integration, free and open source

Tesla cars and Powerwall through Teslemetry: charging, climate, locks, solar, energy flows.
Follow and control your Tesla cars, your Powerwall and your solar panels from Gladys through Teslemetry: battery, range, charging, climate, locks, Sentry Mode, and the energy flows of your home in real time.
Developed without the hardware: feedback welcome. This integration was built without a car, a Powerwall or a Teslemetry account, and tested on sample API answers adapted from the Home Assistant Teslemetry integration's tests and the Tesla Fleet API documentation. If something looks wrong, please say so on the Gladys forum.
This integration is not affiliated with Tesla, Inc. or Teslemetry.
It is named after the service it goes through. Other ways to reach a Tesla (Tessie, TeslaMate, the Fleet API directly…) may get their own integration.
Wall Connector: now its own integration
Version 1.1.0 of this integration (then called "Tesla") also read the Tesla Wall Connector on the home network. The charger now has its own integration, Tesla Wall Connector, which needs no Teslemetry at all. If you had set one up:
- Install Tesla Wall Connector from the Gladys store and enter the charger's address in its Configuration tab.
- Your charger device, its history and the dashboards that show it are kept: the new integration uses the same device identifiers.
- Scenes that used the Wall Connector triggers, and the Tesla Wall Connector widget, must be set up again with the new integration.
Until then, this integration shows a reminder in its connection status and logs, and leaves the charger alone.
How it connects
Tesla's official API (the Fleet API) is meant for developers: each user would have to register a developer application, host a public key on a web domain and sign every command. Teslemetry does all of that for you and gives you a single access token. It is a paid service with a subscription per vehicle and per energy site (see teslemetry.com/pricing), with a monthly allowance of command credits included.
Reading data never wakes your car. A sleeping car keeps its last known values in Gladys; only a command you send (start charging, climate, lock…) wakes it up.
What you need
- Gladys 5.1 or later.
- A Teslemetry account linked to your Tesla account, with a subscription for each car and energy site you want in Gladys.
- For commands: the Teslemetry virtual key added to each car (Teslemetry guides you through it, it takes a minute from the Tesla app).
- For real-time car data: Fleet Telemetry streaming, which recent cars support (it needs a recent software version; pre-2021 Model S and Model X do not stream). Cars without streaming still work, from Teslemetry's cached data.
Setup
- In the Teslemetry console, create an access token with access to your vehicles and energy sites. Copy it.
- In Gladys, open the Configuration tab of the Teslemetry integration, paste the token in Teslemetry access token, check the other settings, save.
- Open the Discovery tab: each car and each energy site is listed. Add the ones you want.
- Optional: click Test the connection to see what Teslemetry gives access to, and whether the real-time stream is connected.
The integration also turns on, in Teslemetry, the streaming of the few car values it reads (battery, range, charging, climate, locks, Sentry Mode, odometer, display units). It only adds fields, it never removes yours.
Settings
| Setting | What it does |
|---|---|
| Units | Units of distances and temperatures as stored and compared by scenes: the car's own display setting (default), miles and °F, or kilometers and °C. The dashboard always shows each user's preferred units, whatever you pick. |
| Device names language | English, French, German or Spanish names for the features of new devices. Gladys keeps a feature's name once the device is created. |
| Backup refresh of the cars | How often an awake car that streams nothing is read (30 or 60 minutes, or never). Never while the car sleeps. |
| Send the home consumption to the energy dashboard | Off by default. Adds the home consumption index to Powerwall sites (see below). |
Changing Units on a car you already added: the Discovery tab offers an Update for it. Until you accept, the car keeps being published in its former units, so nothing gets mixed up.
Your cars
| Feature | Details |
|---|---|
| Battery level | % |
| Range | Rated range, in miles or km |
| Charging state | Charging, connected, paused by the car, paused by the charger (no power), idle |
| Charging power | kW, AC or DC (Supercharger) |
| Charge limit | 50 to 100 %, adjustable |
| Charging | Start / stop charging |
| Charging current | Amps requested from the charger, adjustable (handy to charge on solar surplus) |
| Plugged in | Yes / no |
| Climate | On / off |
| Climate set temperature | Adjustable, 59–82 °F (15–28 °C) |
| Inside / outside temperature | °F or °C |
| Locked | Lock / unlock |
| Sentry Mode | On / off |
| Odometer | Miles or km |
| Online (awake) | On when the car is awake, off while it sleeps or is out of coverage |
The car's location is never read by this version of the integration.
Your Powerwall and solar panels
Each energy site gets the features of what it has: a solar-only site has no battery features, a Powerwall without panels no solar ones.
| Feature | Details |
|---|---|
| Solar production | W |
| Home consumption | W, as measured by the gateway |
| Grid (import +, export −) | W, signed: positive when you draw from the grid, negative when you send power to it |
| Battery charging / discharging | W, two features (both positive) |
| Powerwall charge | % |
| Grid connected | Off during an outage (the house runs on the Powerwall) |
| Operation mode | Self-Powered or Time-Based Control, adjustable |
| Energy indexes | Cumulative kWh: solar production, grid import and export, battery (home: see below) |
Backup-only is not offered: Tesla withdrew it on many sites. A site set to it from the Tesla app shows "Backup-only" in the energy widget.
The home consumption index is off by default: turn on Send the home consumption to the energy dashboard in the settings, then accept the Update of the site in the Discovery tab. Gladys then computes the consumption per half hour and its cost from it, with your energy contract. Gladys attaches it to the main electric meter you set in the energy settings: if your utility meter is already in Gladys, the Powerwall measures the same house, so leave the option off rather than counting the house twice. The index keeps counting while the option is off, so turning it on later does not start from zero. The indexes start counting when the integration is installed: Tesla does not give lifetime totals, they are built from the daily totals Teslemetry streams.
Dashboard
Two widgets (Gladys 5.1+), each set up with the device it shows:
- Tesla vehicle: battery, range, charging power and cabin temperature in real time, the charging, climate, locks, Sentry Mode and online status, and buttons to start or stop the climate, start or stop charging (when the car is plugged in), lock or unlock (unlocking asks for a confirmation).
- Tesla energy flow: solar, home, grid and Powerwall in real time, the last 24 hours as a chart, the grid status, operation mode, backup reserve and Storm Watch.
Scenes
Triggers (each one optionally limited to one car or one energy site):
- Tesla started charging, Tesla charging complete, Tesla plugged in, Tesla unplugged — with the battery level.
- Grid outage (Powerwall) and Grid restored (Powerwall) — with the Powerwall charge, and whether the outage is an intentional "go off-grid".
Action:
- Set the Powerwall backup reserve — for example 100 % when a storm is announced, back to 20 % after.
Every car feature above can also be used in scenes the usual way ("when the battery is below 30 %", "start the climate at 7:30", "set the charge limit to 90 %"…).
Data freshness and Teslemetry costs
What follows are Teslemetry's published rules (2026). They could not be
measured on a real account during development: to see your own costs, the
integration writes a line in its logs for every billed call, with your
remaining balance (Teslemetry credits: … cost 1, balance 498), and Test the
connection shows the balance.
| What | When | Cost |
|---|---|---|
| Real-time stream (cars, Powerwall, daily energy totals) | Continuously, one connection for the whole account | Included in the subscriptions, no credit |
| Car read at startup | Once per car when the integration starts | Free from Teslemetry's cache; up to 2 credits if the car is awake and its cache older than about 20 minutes |
| Backup car read | An awake car that streamed nothing for the chosen delay (30 min default) | Same as above. Never for a sleeping car, and never for a car that streams |
| Vehicle list, Powerwall status | Every 15 / 10 minutes, only while the stream is down | Expected free (read calls, unverified) |
| Command (charge, climate, lock, charge limit, reserve…) | When you ask | 1 credit; if the car sleeps, it is woken first (about 20 more credits) |
In practice, with a streaming car, the integration's own cost is the commands you send. Teslemetry's monthly allowance is 500 credits per vehicle and per energy site: about 500 commands to an awake car, or about 24 to a sleeping one. Gladys acknowledges a command after 4 seconds even if the car is still waking up; the command goes on and its result shows when the car answers.
Limitations
- Developed without a car, a Powerwall or a Teslemetry account (see above).
- No location, no navigation, no trunk, windows or seat heaters in this version.
- Gladys has no signed battery power: the Powerwall power is split into "charging" and "discharging". The backup reserve has no device feature either: it is shown in the energy widget and set with the scene action.
- Older cars without Fleet Telemetry are refreshed from Teslemetry's cache only (every 30 or 60 minutes while awake).
- Feature names are set when the device is created and do not follow later language changes.
Troubleshooting
- "Teslemetry refused the access token": the token was mistyped, revoked or expired. Create a new one in the Teslemetry console.
- "A subscription is required": the car or site has no active Teslemetry subscription.
- A command fails with "vehicle unavailable": the car is out of coverage, or the virtual key is not installed on it.
- Car values only change every 30 minutes: the car does not stream. Check that streaming is on for it in the Teslemetry console and that its software is up to date.
- The integration logs everything it does: open its logs from the Gladys UI,
with
LOG_LEVEL=debugfor the full detail. Tokens are never logged.
Configuration settings
These are the settings Teslemetry asks for in its configuration screen in Gladys.
| Setting | Type | Required | Description |
|---|---|---|---|
| Before you start | section | No | This integration reaches your Tesla account through Teslemetry, a paid service that relays the official Tesla Fleet API (no Tesla developer account needed). Create a Teslemetry account, link your Tesla account, add the virtual key to your car, then create an access token in the Teslemetry console and paste it below. Reading data never wakes your car; a command sent to a sleeping car wakes it. |
| Teslemetry access token | secret | Yes | Created in the Teslemetry console, with access to your vehicles and energy sites. |
| Units | select | No | Units of the vehicle values (distances, temperatures), as used by scenes. The dashboard always converts to each user's preference. |
| Device names language | select | No | Language of the feature names given to new devices (Gladys keeps a name once the device is created). |
| Backup refresh of the cars | select | No | Cars are followed in real time through the Teslemetry stream. When a car is awake but streams nothing (older cars, streaming off), its data is read at this pace. Never while it sleeps. |
| Send the home consumption to the energy dashboard | boolean | No | Adds a home consumption index (kWh) to each Powerwall site, from which Gladys computes consumption and cost. Gladys attaches it to your main electric meter: leave it off if your utility meter is already in Gladys, or the house is counted twice. |
How to install Teslemetry in Gladys
- In Gladys, open Integrations: Teslemetry appears in the catalog, next to the native integrations, with a community badge.
- Click Install. Gladys pulls the Docker image (
ghcr.io/guim31/gladys-tesla:1.3.0), starts it in a sandbox isolated from the core, and generates the integration's interface (devices, discovery and configuration). - Open the Configuration screen of the integration, fill in the settings, and save.
- You can also install it directly from its repository URL: https://github.com/guim31/gladys-tesla.
Teslemetry requires Gladys >=5.1.0. The catalog inside Gladys refreshes every hour, so a new version becomes available at most one hour after its release.
Not running Gladys yet? It is free and open source: follow the installation guide to get started.
About external integrations
Teslemetry is an external integration: a community integration packaged as a Docker container and published on GitHub, that Gladys installs in one click and runs in a sandbox isolated from its core. It is published and maintained by guim31, not by the Gladys core team.
- Browse all external integrations
- Discover the native integrations built into Gladys
- Build and publish your own external integration
- Source code on GitHub — source of this documentation