Profile
Back to NewsBack
GitHub Trending 37 min
Reader Mode
ProtossBlaster/leapmotor-mate: Trip tracking, charge logging and remote control for Leapmotor vehicles (B05/B10/C10/T03 — battery-electric and REEV range-extender) — Home Assistant add-on or standalone Docker. A self-hosted TeslaMate-like companion.

ProtossBlaster/leapmotor-mate: Trip tracking, charge logging and remote control for Leapmotor vehicles (B05/B10/C10/T03 — battery-electric and REEV range-extender) — Home Assistant add-on or standalone Docker. A self-hosted TeslaMate-like companion.

5 hours ago

LeapMotor Mate

v4.15.2: the chart of a charge appears as its row opens, also on a phone, and draws no more readings than it has pixels, so a night's charge draws several times faster (#417, @arekm). A row opened near the bottom of the screen scrolls into view with its chart (#418, @arekm). In 4.15.1: a charge ends when the energy stops (#414, @arekm). See release notes and upgrade impact.

CI</a> Docker</a> Docker Hub</a> Release</a> License: AGPL-3.0</a> Stars</a> !Python !FastAPI !Home Assistant

Trip tracking, charge logging and remote control for Leapmotor vehicles — a self‑hosted companion (think TeslaMate for Leapmotor). Runs as a Home Assistant add‑on or as a standalone Docker container.

Cloud commands are enabled on every model (since 4.2.0). What a car may do is decided by the data its own cloud entry publishes — abilities, account rights, control module — and by the cloud's own refusal, never by the model name; a command your model does not have is refused by the cloud and Mate stops offering it. On‑car confirmation of physical execution exists only for the B10: acceptance by the cloud is not proof the car carried a command out. European spec (the Leapmotor lineup distributed by Stellantis/Leapmotor).

Chinese-market accounts are not supported by Mate. China cloud API research documents a separately verified read-only B05 flow and the remaining integration work.

🇮🇹 Versione italiana più sotto.

☕ Support

LeapMotor Mate is free and open-source, developed in my spare time. If it's useful to you, you can support its development with a coffee — thank you! ☕

Buy Me A Coffee PayPal

Screenshots

| Overview | Trips | |---|---| | !Overview | !Trips | | Charges | Wallbox | | !Charges | !Wallbox | | Statistics | Commands | | !Statistics | !Commands |


Features

At a glance

  • Overview — live status, battery, range, READY state, location map and the car's own picture.
  • Security and charge state — a Security indicator (green Active when the car is locked and the alarm is armed) and, while the cable is still in after a completed charge, a Fully charged badge.
  • When the data is old, it says so — the cloud answers even when the car cannot reach it, by re-serving the last frame it holds. Mate shows that frame's real age instead of passing it off as current.
  • Whether the data can be trusted at all — a tile beside the heading, Mate → cloud → car, with the facts behind each word on a hover: how long the poller has been running, whether the cloud is letting it in and when it last answered, when the car last sent a frame. When Mate itself cannot fetch it turns red and names the consequence, the next attempt and the error — and says the password is the thing to check only when the cloud blamed the password. Home Assistant gets the same verdict as sensor._data_link, and Settings gets a Cloud link card: a day of polling in five-minute windows and a week of counts.
  • Vehicle software updates — the Overview tells you when the car has an OTA update waiting, without opening the official app.
On the road
  • Trips — automatic detection with route map, distance, energy, efficiency and regen; every trip carries its own kWh and its cost, and opens on a summary in boxes: distance and duration, the electricity it used and its price, and the total.
  • Consumption measured by the car — energy, efficiency and cost come from Leapmotor's own figure (the real driving / A·C / other split) whenever the cloud has it, with the battery-% estimate kept as a marked, reversible fallback and a Vehicle Cumulative Total card for the lifetime numbers.
  • Elevation and outside temperature — an altitude line in the Trip data chart, the metres climbed and descended, and the highest and lowest temperature of the drive (Open-Meteo — no key, no account).
  • Calendar, search and merging 🆕 — browse trips by month, open a day — or several at once, by Shift-click, a drag across the days or, on a phone, holding a day: one heading for the range, then each day under its own — or search a date range. A reload, or the way back from a trip, returns to the month you were looking at. Each trip row says where the trip started and ended — a charging place by its name, elsewhere the address — and the search finds a trip by either end. An open day says how much battery its trips used and how long it was driven, and each trip row its battery change. Trips that a short stop split apart can be merged from that day's list with a gap slider and a route preview, and unmerged whenever you like.
  • Your own notes — free text on any trip or charge, plus the drive mode (Comfort / Normal / Sport) and One-Pedal tags the cloud never reports.
  • Events — what the car did, moment by moment: unlocked and locked, a door or the tailgate opened and closed, the cable in and out, the climate on and off, READY, where the sunshade stopped, every trip and charge and every command sent from Mate; an end says how long its state lasted and what it did (the distance, the cabin before and after, the energy charged), and one map beside the list shows where — with filters by group, kind, word and date.
Charging
  • Charges — AC/DC detection, energy added, the Charging data chart in bands (power, SoC, the battery's and the outside temperature, the car's own time remaining) and the effective €/kWh; for a messy public charge the total you actually paid is typed by hand in ✎ Manual, at the bottom of the charge-type menu, overrides the estimate everywhere it is used, and leaves the charge's own type alone.
  • Battery card on the Charges page — battery %, range and a bar with a marker at your charge limit, live while a charge runs; with it, the Charging data chart of the running charge, the wallbox's line beside the car's at home, redrawn with every poll, with the time it began and the charge level so far. The Unlock cable button lives here too.
  • The charger's own kWh — on a public charger Mate has no meter, so you can type what its display said. It opens only on purpose and never comes pre-filled: from there it prices the charge, exactly as a wallbox counter does at home, and shows how much the on-board charger turned into heat. The energy Mate reports stays the one measured at the battery.
  • Delivered vs into the battery — the month above the charge calendar says both, in words: what came out of the chargers and what reached the pack. The gap between them is the conversion loss you pay for.
  • Home vs Public — beside the AC vs DC card, a second one splits the charges into Home, Public, ✎ Manual and To confirm; they always add up to the number of charges above them.
  • Prices — four ways to price a session: flat, time-of-use bands per day of the week and per charge type (each session split across the bands it really spans, by the real power curve), dynamic from a Home Assistant price entity weighted over the charge's own power curve, and custom kWh — a fixed price applied to the kWh a Home Assistant helper says you actually bought, for a roof that supplies the rest.
  • Battery health (SoH) — a page estimating your usable capacity over time: each charge's measured energy (∫ voltage × current) divided by the SoC it added, stopping at 95 % because above that an LFP's BMS re-anchors a counted SoC and those points arrive without energy. Charges are pooled in proportion to how much of the scale they covered, and the figure carries its own scatter — it is measured energy over a counted SoC, not a lab measurement.
  • Charging-station names — public charges are tagged automatically with the station's name, from OpenStreetMap and the Italian PUN registry. Home charges are never looked up for a station. (Optional, off by default.) Every charge, at home too, shows where it happened: the station and its address, else your charging place or the address found as for trips; 🧭 beside 📍 looks up a missing one when you ask.
  • Find charging stations — a ⚡ Find chargers button maps the public stations around the car with AC/DC, kW, operator and live availability; tap one to send it to the car's navigator.
  • Wallbox — pair one already in Home Assistant for live power, max current and AC delivered vs DC into the battery per session. Save a profile per location (connection, entity mapping and tariff) and switch in one click. (Optional.)
  • Auto-assign "Home" — charges your own wallbox measured are confirmed as Home by themselves, priced through the same engine as a manual confirm. (Optional, off by default.)
  • Recover missed charges — scan your history for charges that happened while the car was asleep, before automatic detection existed. Previews what it finds before adding anything.
Control
  • Remote control — locks, windows, trunk, the roof's sunshade (its tile says how far it is open), climate (cool / heat / ventilation / defrost, target temperature), heated and ventilated seats per seat, heated steering wheel and mirrors, find car, battery preheat, unlock the charge cable.
  • Navigation — search an address and send the destination straight to the car's own navigator. Keyless by default (OpenStreetMap), with an optional API key for better house-number coverage.
  • V2L (vehicle-to-load) — while the car powers an external device through the V2L adapter, Mate shows live net power and the energy drawn this session, tracks the all-time total, and publishes three Home Assistant entities. Read-only. A first for any Leapmotor tool — found by on-car testing.
At home
  • Home Assistant via MQTT — MQTT Discovery publishes the car as native entities — sensors, binary sensors, GPS tracker — plus command buttons. Two installs on one broker are noticed: sharing a topic prefix makes them one device to Home Assistant and runs every command twice, so the BetaTester build steps aside onto a prefix of its own and says so. (Optional.)
  • One lock toggle for dashboards — an MQTT lock entity plus a Door Lock Toggle switch for launcher widgets that cannot toggle locks: one tap locks, the next unlocks.
  • Scheduling — program the charge window (target SoC, start/end, days) and the climate pre-conditioning, written to the car and in step with the official app; Mate says whether the car took the charge window.
  • Prepare car — climate, front-seat heating and ventilation, steering wheel and mirrors in one tap: now, on a schedule, or by itself the moment the car goes Ready, optionally only above or below a cabin temperature.
  • ABRP — forward live telemetry to A Better Route Planner for live route planning. (Optional.)
  • EVCC — publish EVCC-friendly MQTT topics so an EVCC type: custom vehicle reads SoC, plug and charging status, range and odometer. Ready-to-paste config in docs/EVCC.md. (Optional.)
Making sense of it
  • Add it to your phone's home screen — Mate isn't a phone app and can't be one (it has to poll for years; a phone suspends background work), but Add to Home Screen now gives it its own icon and a full screen, with no address bar and no toolbar. It stays a shortcut to the server you run.
  • Reports — distance, efficiency and cost in one page, with the home vs public split, the deltas against last month, daily charts and a map of every trip that month. Always opens on the month you are in — an empty one says so instead of quietly showing the previous month — and when the car's official monthly total is missing drives it never managed to upload, it shows Mate's own figure instead and says which is which.
  • Range extender (REEV) — supported on the ordinary build since 4.7.0. A REEV page of its own, the petrol of each drive and of each period, and the REEV battery packs in the setup wizard. The litres are the car's own figure, taken from Leapmotor's per-trip history — the same number the official app shows — with the tank level as the fallback where the cloud has no record of a drive, and a label on each figure saying which of the two is on screen. A drive that burned nothing reads 0 L · all electric, which is not the same as a drive whose tank could not be read. Regen is not shown: a generator refilling the pack while you drive cannot be told apart from braking. Moving over from the BetaTester build is a backup and a restore — how to.
  • Statistics — the driving / A·C / other energy split and the consumption trend, from the Leapmotor cloud, plus cost per 100 km: the euros spent over the kilometres driven, electricity and — on a range-extender — the petrol burned beside it (not the whole refuel: a tank you paid for is mostly still in the tank), with how many kWh those 100 km took beside the money (an energy balance, so standing time and charger losses are in it). The page says up front that its figures are Mate's own record since it was installed, not the car's odometer total.
  • The money and the kilometres are from the same period — a charge that ended before the first recorded trip has no kilometres of its own to be divided by, so it no longer enters the figure. Typing in a year of old charges used to divide months of spending by one afternoon's kilometres.
  • Charges can carry the odometer — written automatically on everything Mate sees, and typable by hand on the manual form or as the CSV's last column. That is the only way a session from before Mate existed can carry kilometres at all — and with it the cost per 100 km is measured against the car's own counter, brim to brim, even with no recorded trips. The Charges page then also shows how far the car went between one charge and the next.
  • Re-importing a CSV completes instead of duplicating — a line matching a session already recorded fills in its odometer rather than adding a second copy, so an archive built by hand can be topped up without deleting anything.
  • Export — CSV for trips and charges, GPX per trip, and a full database backup you can restore.
Setup and the rest
  • Demo mode — the whole app on a realistic month of sample data — commutes, home and DC charging, costs, battery health — with no car and no account. One click on the welcome screen. Nothing in it is real.
  • Eight languages — English · Italiano · Français · Deutsch · Polski · Nederlands · Português · Español.
  • Currency and units — 30 currencies, and metric / imperial UK / imperial US. Display only: what is stored stays metric, so you can switch back with nothing lost.
  • Editable battery capacity — pre-filled per model, editable if yours differs, or adopt the value Mate worked out from your own charges. Changing it never rewrites past charges. When a default Mate itself shipped has since been disproved by real charges, Settings says so and offers the corrected figure with one button — it never rewrites the number behind you.
  • A car nobody was asked about says so — a second car added to an install where the sign-in was already done never meets the wizard: it takes the default pack of its model, which bends its kWh, its price per kWh and its consumption. A strip across every page names it and opens the wizard. Cars already there when you update are never accused.
  • Advanced settings — the edge cases in one collapsible card: missed-charge threshold, vampire-drain noise floor, the AC/DC power threshold for 22 kW wallboxes, the battery-health cold cutoff. Sane defaults, one-tap reset.
  • Diagnostics — a read-only system snapshot, the recent logs and the car's raw signals, plus a downloadable bundle to attach to an issue — which lists what the car declares and what your account may do with it, and carries the last fortnight of charges and trips straight from the database, and every time the battery filled up while parked next to what Mate could see at that moment. VIN, credentials and exact GPS are always masked.
  • Update badge — a badge next to the version number when a newer Mate release is on GitHub, checked every 6 h. Handy for standalone Docker.
  • Which account you're looking at — the Vehicle card names the Leapmotor account this instance signs in with, beside the model and the VIN. Model and VIN describe the car, so two Mate instances watching the same one were indistinguishable from the inside. Asked for by a beta tester running several at once.
  • Delete account / factory reset — a guarded action that wipes everything and reopens the setup wizard as a brand-new install. Type-to-confirm.
  • Independent — talks to the Leapmotor cloud directly, at the cadence you choose: 10 s to 10 minutes while parked, 10–60 s while driving. It needs neither the phone app nor Home Assistant, and polling does not wake or drain the car. It isn't real-time either, so a Refresh button (sidebar, and the mobile header) pulls the car's latest state on demand.

How it works

Leapmotor Cloud  ──►  Poller (state machine)  ──►  SQLite  ──►  Web UI (FastAPI + HTMX)
                       trips / charges / regen                   + remote commands

The data lives in a local SQLite database. Nothing is sent anywhere except to the official Leapmotor cloud.

ℹ️ Mate isn't real-time — it polls. It reads the car's state from the Leapmotor cloud on an interval: about every 30 s while parked and 10 s while driving (tunable in Settings). So a change you make in the official app (opening the trunk, changing the charge limit…) shows on Mate within that window, not instantly. Mate reads passively and never wakes the car, so it doesn't drain your battery — the official app feels instant because opening it wakes the car. Need it sooner? The 🔄 Refresh button (top of the sidebar) pulls the latest state on demand. If the car is asleep, the cloud serves its last reported state until the car next wakes.

Requirements

  1. A Leapmotor account — dedicated to Mate and used by nothing else. ⚠️ Leapmotor allows only ~one active session per account, so any other client on the same account — the official phone app, another add-on, a Docker container, or any other integration — fights Mate for the session: they evict each other in a loop, the car goes offline to Mate, and you get missing or inconsistent data. Use a separate account for Mate only (not the one on your phone). Create a separate account, then share the car with it from the official app: logged in on the account that owns the car, share/authorise the vehicle to the new account with all permissions and a permanent duration (a temporary share expires and breaks Mate later). Check it worked: set the second account up in the official Leapmotor app on a device (not just logging into the account on the web) and confirm the car appears there — if it doesn't, the share isn't active yet and Mate will report “No vehicle found on this account.” Then sign out of that account in the app and leave it to Mate. That check is a one-off: an app left signed in on Mate's account is the “other client” described above, and you're back to the session fight.
  2. Nothing to download. The Leapmotor app TLS certificate Mate needs to log in — the same for everyone, it identifies the Leapmotor app, not you — ships with Mate and is installed by itself on first start. You are never asked for it.

Installation

▶️ Just want to see what Mate can do? Try the demo first — a realistic month of sample data, no car or account needed. Install it (add‑on or Docker), open Mate and click "Try the demo" on the welcome screen — no command line. Or run it standalone:
>
> docker run --rm -p 4000:4000 -e MATE_DEMO=1 ghcr.io/protossblaster/leapmotor-mate
>
> Open . Everything in demo mode is sample data — nothing is real.

Option A — Home Assistant add‑on

  1. In Home Assistant: Settings → Apps → Install app → ⋮ → Repositories (on Home Assistant before 2026.2: Settings → Add‑ons → Add‑on Store → ⋮ → Repositories), and add the repository URL (note the -addon suffix — this is a separate repo from the code):
https://github.com/ProtossBlaster/leapmotor-mate-addon
  1. Install LeapMotor Mate, start it, and open the panel (car icon in the sidebar).
  2. Follow the setup wizard.
The database is stored in the add‑on's persistent /data, so it survives restarts and updates.

Option B — Standalone Docker

Easiest — run the prebuilt image (no clone, no build):

docker run -d --name leapmotor-mate \
  --restart unless-stopped \
  -p 4000:4000 \
  -v "$(pwd)/data:/data" \
  ghcr.io/protossblaster/leapmotor-mate:latest

The same image is also on Docker Hub — use protossblaster/leapmotor-mate:latest interchangeably.

To update later: docker pull ghcr.io/protossblaster/leapmotor-mate:latest then recreate the container.

Or build from source:

git clone https://github.com/ProtossBlaster/leapmotor-mate.git
cd leapmotor-mate
docker compose up -d

Then open http://localhost:4000 and follow the setup wizard.

The database is stored in ./data/ (mounted at /data in the container).


Option C — MateDesktop (no Home Assistant, no Docker)

Neither of the above? MateDesktop is Mate as an ordinary desktop application: download it, open it, and follow the same setup wizard. Same Mate, same database, nothing to install around it. Its web server listens only on this computer; use the Docker or Home Assistant installation if Mate must be reachable from another device.

  • macOS (Apple Silicon) — LeapMotor-Mate--arm64.dmg
  • Windows — LeapMotor-Mate-Setup--x64.exe.zip or the .msi.zip
Windows ships inside a .zip: unpack it first, then run the installer. A bare .exe off the
internet has no SmartScreen reputation yet and gets stopped on the way in.

Uninstall

Mate writes nothing outside its data directory — no system files, no services. Removing it means removing two things: the image, and the data.

Home Assistant add‑on — uninstall it from the add‑on's page. Export your database first if you want to keep it: afterwards you have no way to reach it.

Docker — the container is not where your data lives:

docker rm -v leapmotor-mate
docker rmi ghcr.io/protossblaster/leapmotor-mate:latest

The -v is the part that matters. Without it, the anonymous volume Docker created for /data outlives the container and stays on your disk, invisible unless you run docker volume ls. If you mounted a folder of your own instead (-v "$(pwd)/data:/data"), that folder is untouched — delete it by hand.

⚠️ What is in there is your car's location history — every position, every trip, every charge,
plus the key that decrypts your stored login. If you are leaving for good, remove it. If you might
come back, take Settings → Export database first and keep that one file: **Settings → Import
database** puts everything back, down to the last row.

User manual

A full written manual — every page explained, the setup wizard step by step, an FAQ and a glossary:

| | | |---|---| | 🇬🇧 English | USER-MANUAL-EN.md | | 🇮🇹 Italiano | MANUALE-UTENTE-IT.md | | 🇫🇷 Français | MANUEL-UTILISATEUR-FR.md | | 🇩🇪 Deutsch | BENUTZERHANDBUCH-DE.md | | 🇪🇸 Español | MANUAL-DE-USUARIO-ES.md |

The interface speaks eight languages (Polski, Nederlands and Português too) — the written manual, for now, exists in these five.

Setup wizard

The first launch opens on a choice — Set up my car or Try the demo. Choosing Set up my car asks for one thing:

  • Login — your Leapmotor account email, password and operation PIN. The wizard reads your model and VIN from the cloud. The battery it can only fill in by itself where the European version has a single variant (T03) — where there are several (B03X 39.0 / 52.0, B05 and B10 Pro / Pro Max, C10 RWD / AWD) you pick yours. Correctable at any time in Settings → Battery.
That's it — the poller starts and data begins to appear.

To switch to a different Leapmotor account later, use Settings → Vehicle → Log out: it clears only the stored login and re‑opens this wizard. All your trips and charges are kept — they're tied to the car's VIN, so the same car carries straight over.

Configuration

Everything is configured from the web UI (Settings), no YAML needed:

  • Polling interval — parked (default 30 s) and driving (default 10 s). Faster catches trips/charges sooner; slower means fewer API calls. Polling the cloud does not wake or drain the car.
  • Charge prices — flat or time-of-use, on the dedicated Charge Prices page (see below).
  • Language & currency — English / Italiano / Français / Deutsch / Polski / Nederlands / Português / Español, and your display currency (€, $, £, CHF, zł… 30 currencies). The number format (decimal/thousands separator) follows the selected language.

Charge prices

Set what each kWh costs on the dedicated Charge Prices page (💰 in the sidebar), so Mate prices your sessions. Four modes — the last two for Home charges only, since a public session is billed by its operator:

  • Fixed (24h) — one price per charge type (Home / AC / DC / HPC).
  • Time-of-use bands — add one or more time windows, choose the days of the week each applies to (All / Weekdays / Weekend shortcuts), and set a price per charge type for every band. Leave a price blank to fall back to the base price, or enter 0 if it's free in that band. A session spanning two bands is split by its real power curve, and one crossing midnight on a Sat→Sun boundary is priced per day correctly.
  • Dynamic (Home Assistant sensor) — the price comes from an entity that changes over time (Nordpool, Tibber, your utility's own integration), weighted across the session's own power curve, so a charge that ran across a price change is billed at what each part of it really cost.
  • Custom kWh (Home Assistant) — for a fixed price where what varies is how much of the charge you paid for: with solar on the roof only part of a session comes off the grid, and only your own HA helper knows the split. Pick the entity holding the kWh to bill; Mate reads it when the charge ends and multiplies by your fixed price. The energy Mate reports for the charge is untouched — that stays what reached the battery.
  • Solar kWh (manual) — the same case without Home Assistant: type, charge by charge, how many kWh came off your own roof and Mate subtracts them from what the wallbox measured, billing only the rest. The opened charge row spells the sum out — 20.0 delivered − 8.0 solar = 12.0 paid — so a number typed the wrong way round shows itself immediately, and a figure above what the wallbox measured is refused. Offered only on home charges the wallbox actually measured; the energy Mate reports is untouched.
Cost changes apply to new charges only: a charge's cost is frozen when you confirm its type, so editing prices or bands later never changes past sessions.

How the kWh are counted (home charges): if your wallbox is paired and exposes a kWh energy counter, Mate samples it throughout the charge and bills the energy it added — the sum of the counter's increases over the session, i.e. the exact energy the wallbox delivered (conversion losses included), measured, not estimated. It's reset/race-safe: it works whether the counter is a lifetime total (like an odometer) or a per-session meter that zeroes mid-charge, no matter when it resets — and the sampling keeps going while the car's cloud is unreachable, because the counter is in your house, not behind it. If a charge does spend more than ten minutes open with no reading taken (Home Assistant down, Mate restarted mid-charge), the total is no longer a measurement of that charge, so it is dropped and the charge bills on the battery energy instead. A charge's row leads with the 🔌 wallbox (billed) kWh, and the opened row shows the 🔋 in-battery (DC, from SoC) energy with the AC→DC efficiency beneath it (a ratio above 100 % is impossible, so it is not shown); the cost is simply wallbox kWh × price. Without a wallbox counter (or for public charges), Mate bills the battery (SoC) energy × price. The Last charge tile on the Overview leads with the same figure as the row, and the energy totals (Total energy on Charges, Energy Charged on Statistics, the month strip) say delivered with the in battery figure beside it, so every screen reads the same way. The instantaneous power is used only for the chart, never for the cost.

⚠️ This applies to charges recorded from v1.12.0 onward (the counter readings are captured live during the session). Older charges keep the value they were calculated with and can't be recomputed with the new method — if you want, you can delete an old session with the 🗑 button in its opened row.

Optional: boost from Home Assistant

If you run Home Assistant on the same network, you can trigger a temporary fast‑poll when a trip is about to start (e.g. from a Bluetooth/phone shortcut) by calling POST http://:4000/api/boost. With the default 30 s cadence this is optional.

Wallbox (Home Assistant)

If you charge at home and have a wallbox already integrated in Home Assistant (Wallbox Pulsar, Easee, go‑e, Keba, OCPP, …), Mate can pair with it to show live charging data and compare what the wallbox delivers (AC) with what the car receives into the battery (DC).

Enable it in Settings → Wallbox present, then connect to Home Assistant. How you connect depends on how you run Mate:

  • As a Home Assistant add‑on — nothing to configure. Mate reaches HA through the internal Supervisor API automatically, regardless of how HA is exposed externally (HTTP, HTTPS, Nabu Casa). You'll just see a green connection status dot.
  • As standalone Docker — enter your HA URL (e.g. http://192.168.1.10:8123) and a Long‑Lived Access Token (HA → your profile → Security → Long‑Lived Access Tokens → Create Token). Local HTTPS, even with a self‑signed certificate, works.
Then expand Entity mapping and assign the wallbox sensors. Mate pre‑selects them automatically and only lists your wallbox device's own entities. Each field's label shows the expected unit, and the dropdown offers only sensors of that unit for the two that feed the maths — Charging power lists only kW, Session energy only kWh — so you can't accidentally map a kWh meter as power (which would corrupt the stored power and cost figures). The Show all entities toggle lifts this for non‑standard setups, and a sensor you already mapped is never hidden.

What each setting means — all optional (Mate auto‑detects them; override one only if auto‑mapping picks the wrong entity, e.g. foreign‑language names):

| Setting | What it is | | --- | --- | | Charging power (kW) | The power the wallbox is delivering right now (AC). Drives the live "charging" indicator and the AC side of the AC‑vs‑DC comparison. W is auto‑converted to kW. | | Status | The wallbox's own state text from Home Assistant (e.g. Charging / Connected / Idle / Error). | | Session energy (kWh) | Energy delivered in the session (kWh; Wh auto‑converted). This is the AC kWh Mate bills home charges on (you pay the wallbox AC, conversion losses included) and uses for the efficiency figure. | | Max charging current (A) | The only writable wallbox setting (a number entity): sets the wallbox max charging current in amps from the Wallbox page. Your own HA load‑balancing automations may override what you set. (The car's charge limit is a separate writable number — see the MQTT section.) | | Charging speed (km/h) | Your wallbox's own "charging speed" reading, if it exposes one (shown live). | | Max available (kW or A) | The maximum currently available to the wallbox (e.g. after dynamic load balancing or a tariff cap), if exposed — in kW or A depending on the wallbox (V2C/Pulsar report it in amps). Shown as‑is with its own unit. |

Only Max charging current writes to the wallbox; everything else is read‑only.

What you get on the new Wallbox page:

  • a live panel (power, status, session energy, charging speed, max available power) plus the session cost (reused from your home charges);
  • a max‑current control to set the wallbox charging current — note your own HA load‑balancing automations may override it;
  • an AC‑vs‑DC comparison per charge session (kWh delivered vs into the battery + efficiency), laid out as a year/month/day history; expand a session for its power chart. The wallbox curve uses Home Assistant's history (kept ~10 days), so the comparison appears for recent sessions;
  • optional auto‑assign "Home" (Settings → Wallbox): charges the wallbox measured are confirmed as Home automatically, with the cost computed from your prices and time‑of‑use bands exactly like a manual confirm. Off by default. (Idea: @hubcasale.)

ABRP (A Better Route Planner)

Forward the car's live data to A Better Route Planner for live route planning. In Settings → ABRP, enable it and paste your personal ABRP token (in the ABRP app: Settings → Car → Live Data, "Generic"). It's off until you enable it, and nothing is sent without a token.

MQTT → Home Assistant

Publish the car to Home Assistant as native entities (in parallel to the Mate UI), via MQTT Discovery. In Settings → MQTT, enable it and enter your broker (host, port, username/password; TLS optional). Home Assistant then auto‑creates a Leapmotor Mate device with sensors (SOC, range, individual tyres, temperatures, charge…), binary sensors (doors/windows/lock/charging), a GPS tracker, and:

  • Charge Limit — a writable number (target SoC).
  • Charge Schedule — a writable text entity that takes a JSON plan for automations, e.g. {"start":"23:00","soc":90}. The five accepted keys:
| Key | Type | Meaning | | --- | --- | --- | | start | "HH:MM" | Window start | | stop | "HH:MM" | Window end | | soc | 50–100 | Target charge limit % | | active | true / false | Whether the schedule is enabled at all | | days | "d,d,d,d,d,d,d" | Seven comma-separated 0/1 flags, Monday-first (position 0 = Monday … 6 = Sunday). The official app displays the week Sunday-first, so its on-screen order differs from this mask |

Any other key is silently ignored. Sending fewer than five keys merges into the car's current plan: everything you omit keeps its value, with one exception — an omitted soc is taken from the charge limit the car last reported rather than from the stored plan (in practice the same number, since setting the charge limit also writes the plan's soc), and if the car has never reported one the command is refused. An invalid value is refused too — a soc outside 50–100, a malformed time, invalid JSON, or JSON that isn't an object — and nothing is written: the existing plan is left exactly as it was. days is the exception to that check: it is handed to the car as written, so a mask that isn't seven flags is not caught here. On a successful write the entity echoes the applied plan back as its state, always with all five keys. Two plan fields the car's cloud stores are not exposed through this JSON at all — the repeat mode, and the flag behind the app's "keep charging past the window" checkbox (identified on a real car by @juan-conca); Mate reads both and writes them back unchanged.

  • V2L — a read-only group (V2L Active / V2L Power / V2L Session Energy).
  • Ready — a binary sensor that turns on as soon as the car is powered up, before it moves, while an automation still has time to act.
  • Sunshade Position — how far the sunshade is open, in % (0 = closed). The binary Sunshade stays as it was, on for any opening.
  • Command buttons — lock/unlock, trunk, find car, preheat battery, unlock charge cable, climate (A/C Auto / Quick Cool / Quick Heat / Quick Ventilation / Defrost / A/C Off) and comfort (heated/ventilated seats, steering-wheel & mirror heating). Turning the A/C fully off uses the payload each model was measured to obey: the bare operate=off on the B10/C10, the same value inside the full seven‑field body on the T03 (found on‑car by @derekzoli) — each car ignores the other's form while the cloud answers success to both. Sentry mode is offered where the account declares the right for it. The comfort commands use the payloads captured by @kerniger.
Works with any MQTT broker (e.g. the Mosquitto add‑on). Use Test connection to verify the broker before saving. After a command the state now updates in Home Assistant immediately (no waiting for the next poll), and the topic prefix scopes the device — so you can run a second instance on a different prefix without it clashing with the first.

Notes & disclaimer

  • "Vehicle not reporting live data" in the logs is normal. When the car is parked long enough it goes into deep sleep and the cloud returns no live signals. Mate backs off to 15‑minute polling (logged once, not every cycle) and recovers automatically the moment the car reports again — when it's driven, or woken by the official Leapmotor app. To be sure a short trip is captured even straight out of deep sleep, use the boost trigger above.
  • Your credentials are encrypted at rest. The Leapmotor password/PIN (and any HA / ABRP / MQTT / geocoder tokens) are stored encrypted in the local database, with a per‑install key in /data/secret.key (auto‑generated, or set your own via the MATE_SECRET_KEY env var). ⚠️ Keep secret.key together with your backups — restoring only the database without it will ask you to re‑enter the credentials.
  • Standalone: optional login. When running standalone (not as an add‑on), you can require a password to open the app — set one from Settings → Access, or via the MATE_AUTH_PASSWORD environment variable (the env var wins if both are set). Standalone Mate also refuses state‑changing requests that arrive from another website, and refuses to be embedded in one unless you name it in MATE_FRAME_ANCESTORS (e.g. a Home Assistant dashboard you control — see .env.example), so a page in your browser can't drive the car behind your back. To show Mate inside Home Assistant from a Docker install, hass_ingress in its default ingress mode serves it from Home Assistant's own address: name that address in MATE_FRAME_ANCESTORS (each one you open Home Assistant with). If a password is set, the session cookie is SameSite=Strict, and a browser sends it inside a frame only when the page around it is on the same site as Mate: through hass_ingress's ingress mode, or with Home Assistant and Mate on the same host at different ports, logging in inside the panel works. A frame that points straight at Mate on another host keeps showing the login page, even after you log in in a regular tab: there, use the ingress mode, or leave the install without a password on a network you already trust. As a Home Assistant add‑on all of this is unnecessary (ingress already authenticates) and is skipped.
  • Remote access: put an authenticating proxy in front, don't expose Mate directly. Mate holds your Leapmotor credentials and can command the car, so for access from outside your network the safest route is to keep authentication out of Mate and delegate it. A VPN (Tailscale, WireGuard) means no public exposure at all. If you'd rather reach it from any browser without a VPN, an identity‑aware proxy — Pomerium, Cloudflare Access, or Authelia — sits in front and logs you in with an account you already have (GitHub, Google, …), so your user accounts stay separate from Mate and you get sessions, lockout and password reset done properly. (Thanks to @DerMAp for the Pomerium tip.)
  • Use a dedicated Leapmotor account (see Requirements).
  • This is an unofficial project, not affiliated with Leapmotor. It relies on reverse‑engineered cloud APIs and may break if Leapmotor changes them. Use at your own risk.
  • Built on MATE-API, Mate's own Leapmotor cloud client (since 4.0).

Credits

License

GNU AGPL‑3.0 © Silvio Bressani.



LeapMotor Mate · Italiano

v4.15.2: il grafico di una ricarica arriva quando si apre la sua riga, anche sul telefono, e non disegna più letture dei pixel che ha, così una ricarica notturna si disegna molto più in fretta (#417, @arekm). Una riga aperta in fondo allo schermo scorre in vista con il suo grafico (#418, @arekm). Nella 4.15.1: una ricarica finisce quando smette di entrare energia (#414, @arekm). Vedi note di rilascio e impatto dell'aggiornamento.

Tracciamento viaggi, registro ricariche e controllo remoto per veicoli Leapmotor — un companion self‑hosted (un TeslaMate per Leapmotor). Funziona come add‑on di Home Assistant o come container Docker standalone.

I comandi dal cloud sono abilitati su ogni modello (dalla 4.2.0). Cosa può fare un'auto lo decidono i dati che il cloud pubblica per quel veicolo — abilities, diritti dell'account, modulo di controllo — e il rifiuto del cloud stesso, mai il nome del modello: un comando che il tuo modello non ha viene rifiutato dal cloud e Mate smette di proporlo. La conferma in auto dell'esecuzione fisica esiste solo per la B10: l'accettazione del cloud non è la prova che l'auto abbia eseguito. Spec. europea (gamma Leapmotor distribuita da Stellantis/Leapmotor).

Gli account del mercato cinese non sono supportati da Mate. La ricerca sull'API del cloud cinese documenta un flusso in sola lettura verificato a parte su una B05 e il lavoro di integrazione che resterebbe.

☕ Sostieni il progetto

LeapMotor Mate è gratuito e open-source, sviluppato nel tempo libero. Se ti è utile, puoi sostenerne lo sviluppo con un caffè — grazie! ☕

Buy Me A Coffee PayPal

Schermate

| Panoramica | Viaggi | |---|---| | !Panoramica | !Viaggi | | Ricariche | Wallbox | | !Ricariche | !Wallbox | | Statistiche | Comandi | | !Statistiche | !Comandi |

Funzionalità

A colpo d'occhio

  • Panoramica — stato in tempo reale, batteria, autonomia, stato READY, mappa della posizione e l'immagine della tua auto.
  • Sicurezza e stato di carica — un indicatore Sicurezza (verde Attiva quando l'auto è chiusa e l'allarme inserito) e, finché il cavo è ancora inserito a ricarica finita, un distintivo Carica completa.
  • Quando il dato è vecchio, lo dice — il cloud risponde anche quando l'auto non lo raggiunge, ripetendo l'ultimo fotogramma che ha. Mate ne mostra l'età vera invece di spacciarlo per attuale.
  • E se il dato è affidabile o no — un riquadro accanto al titolo, Mate → cloud → auto, con i fatti dietro ogni parola al passaggio del mouse: da quanto gira il poller, se il cloud lo fa entrare e quando ha risposto l'ultima volta, quando l'auto ha mandato l'ultimo dato. Quando è Mate a non riuscire a leggere diventa rosso e nomina la conseguenza, il prossimo tentativo e l'errore — e dice che è la password da controllare solo quando è il cloud ad averla incolpata. Home Assistant riceve lo stesso giudizio come sensor._data_link, e nelle impostazioni c'è un riquadro Collegamento al cloud: un giorno di letture in finestre da cinque minuti e una settimana di conteggi.
  • Aggiornamenti software dell'auto — la Panoramica ti dice quando l'auto ha un aggiornamento OTA in attesa, senza aprire l'app ufficiale.
In strada
  • Viaggi — rilevamento automatico con mappa del percorso, distanza, energia, efficienza e recupero; ogni viaggio porta i suoi kWh e il suo costo, e si apre con un riepilogo a riquadri: distanza e durata, l'elettricità usata col suo prezzo, e il totale.
  • Consumo misurato dall'auto — energia, efficienza e costo arrivano dal dato ufficiale Leapmotor (la ripartizione vera fra guida / clima / altro) quando il cloud ce l'ha, con la stima dal SoC come ripiego segnalato e reversibile, e una scheda Totale cumulativo del veicolo per i numeri di sempre.
  • Altimetria e temperatura esterna — il profilo dell'altitudine nel grafico Dati del viaggio, i metri saliti e scesi, e la temperatura più alta e più bassa del viaggio (Open-Meteo — senza chiave e senza account).
  • Calendario, ricerca e unione 🆕 — sfogli i viaggi per mese, apri un giorno — o più giorni insieme, con Maiusc-clic, trascinando sui giorni o, sul telefono, tenendo premuto un giorno: un'intestazione per l'intervallo, poi ogni giorno con la sua — o cerchi un intervallo di date. Ricaricando la pagina, o tornando indietro da un viaggio, resti sul mese che stavi guardando. La riga di ogni viaggio dice da dove è partito e dove è arrivato — un luogo di ricarica col suo nome, altrove l'indirizzo — e la ricerca trova un viaggio da uno qualsiasi dei due estremi. Un giorno aperto dice quanta batteria hanno usato i suoi viaggi e quanto si è guidato, e la riga di ogni viaggio la sua variazione di batteria. I viaggi che una sosta breve ha spezzat
... (README truncated for length)

Chat with me