HUB
Sign inSign up

steffenr/skoda-mate

By steffenr

•Updated about 8 hours ago

Self-hosted trip tracking, charge logging and remote control for Škoda cars (TeslaMate for Škoda)

Image
Integration & delivery
Internet of things
Monitoring & observability
0

2.4K

steffenr/skoda-mate repository overview

⁠Škoda Mate

Self-hosted trip tracking, charge logging and remote control for Škoda cars: TeslaMate for Škoda. Uses Škoda's official public API with an API key from the MyŠkoda app (no account e-mail or password) and keeps the history in a local SQLite database.

Personal use only. Škoda licenses the public API for private use, not for commercial services.

Source, docs and screenshots: https://github.com/steffenr/skoda-mate⁠

⁠Features

  • Overview: battery, range, charging state, doors/windows/lock, climate, position, last trip and charge, 48 h chart
  • Trips: derived from the car's readings, with day/month views, search, map, notes, cost and CSV export in the MyŠkoda app's layout (BEV or PHEV). The app's trip CSV can be imported again (duplicate-safe)
  • Charges: sessions with energy, AC/DC, Home/Public, charging curve, cost and CSV export
  • Prices: your kWh prices (home, public AC, public DC) and home position; costs recalculate everywhere
  • Control: start/stop charging, charge limit and mode, charging profiles, climate, auxiliary heater, ventilation
  • Battery: SoC history, charging settings and profiles, capacity estimate, projected range at 100 %
  • Statistics: monthly distance, energy, cost and consumption; charging and driving tabs with heatmaps; battery lost while parked
  • Activity and Places: day timeline (drive, charge, climate, parked) and event list; named places with radius, colour and per-place prices
  • Map, Settings and System: units, language, polling, request budget, redacted diagnostics, database backup and a data-quality card
  • Integrations: Home Assistant via MQTT Discovery (about 35 entities per car, set up in the dashboard), signed webhooks, JSON API
  • Demo mode (DEMO=1), 15 languages (Catalan, Czech, Danish, Dutch, English, Finnish, French, German, Hungarian, Italian, Norwegian, Spanish, Swedish, Turkish, Ukrainian), up to 5 cars

⁠Quick start

With Docker Compose (recommended):

mkdir -p ~/skoda-mate && cd ~/skoda-mate
curl -LO https://raw.githubusercontent.com/steffenr/skoda-mate/main/docker-compose.yml
docker compose up -d
docker compose logs -f skoda-mate

Without Compose (NAS, script):

docker run -d --name skoda-mate \
  -p 8080:8080 \
  -v "$PWD/data:/data" \
  --restart unless-stopped \
  steffenr/skoda-mate:latest

Open http://localhost:8080⁠ and finish the setup in the browser: choose a login (e-mail and a password of 8+ characters), then paste your API key and VIN(s). Create the key in the MyŠkoda app (go.skoda.eu/api-keys). The 4-digit S-PIN is optional and only needed for the auxiliary heater. Enter your battery capacity in Settings afterwards: the API doesn't report it, and energy, consumption and costs need it.

Try it without a car: add -e DEMO=1 (-e DEMO_CARS=2 adds a second car).

Port: change the left side of -p 8080:8080 (or of ports: in the Compose file).

Škoda Mate is also listed in Unraid Community Applications (template uses /mnt/user/appdata/skoda-mate, port 8080; set Autostart on). See docs/UNRAID.md⁠.

⁠Tags

Multi-arch image for linux/amd64 and linux/arm64, tagged latest, X.Y and X.Y.Z. Pin a version (steffenr/skoda-mate:<version>) instead of latest if you prefer.

⁠Update and backup

  • Update: docker compose pull && docker compose up -d. The schema migrates on start and ./data survives.
  • Backup: docker compose stop, then copy ./data (database, secret.key, and setup-code.txt on a first run). The database also has a backup function in Settings.
  • Forgot the password? docker compose exec -u 10001 skoda-mate python -m skoda_mate reset-password (hidden prompt, signs out all sessions; add --email [email protected] to change the address or create the login). The Škoda API key is not affected.

⁠Data and permissions

  • /data holds the database, secret.key and (on first run) setup-code.txt. Back it up, keep it private, never delete it. The API key and S-PIN are encrypted with secret.key, so protect the folder as a whole and don't put it on a share other household users can open.
  • The container runs as uid 10001 and makes /data writable for that user on start. If chown isn't possible on your volume (some NAS/NFS shares), run sudo chown -R 10001:10001 ./data once, or set user: "10001:10001".
  • From a public address, the first-run setup asks for a one-time setup code (in the log and in setup-code.txt, or set your own with SETUP_CODE).

⁠Environment variables (optional)

Set them in a .env file next to docker-compose.yml, or with -e for docker run.

VariableDefaultPurpose
DB_PATH/data/skoda_mate.dbSQLite database path
COOKIE_SECUREofftrue forces the Secure flag on the session cookie (HTTPS)
API_TOKENunsetBearer token so scripts can call the JSON API without a session
SETUP_CODEgeneratedYour own first-run setup code; no setup-code.txt is written
DEMO / DEMO_CARSoff / 1Fictional car(s) with 60 days of history, no account, no network
MQTT_HOST, MQTT_PORT, MQTT_USER, MQTT_PASSWORDunset, 1883, emptyHome Assistant fallback for older installs; dashboard settings win
MQTT_PREFIXskoda_mateDiscovery and topic prefix

Logins and Škoda keys are never read from the environment.

⁠Good to know

  • The API allows about 20 requests/hour per car and has no history, so Mate derives trips and charges itself. It polls every 20 minutes while parked and every 5 minutes while charging, climatising or driving; 4 requests per hour stay reserved for commands and "Refresh now".
  • Very short trips show only as an odometer jump (≈), there is no route line while driving (the car reports no position), and an unseen charge end is estimated (≈).
  • Not available via the official API: lock/unlock, honk/flash, wake-up, outside temperature, maintenance and warning lights, battery health (an estimate is shown instead), push updates, sending a destination to the car.
  • The API key expires; Mate shows the date and warns two weeks ahead.
  • Several cars: up to 5 with one API key that covers all of them (choose all cars when creating it).
  • Home Assistant: control buttons and a charge-limit slider are opt-in; there is no lock entity and no auxiliary heater over MQTT. See docs/HOME-ASSISTANT.md⁠. Webhooks: docs/WEBHOOKS.md⁠.
  • Behind a reverse proxy, use HTTPS, start uvicorn with --proxy-headers --forwarded-allow-ips=<proxy ip> (never '*') and see the Security section⁠ on GitHub.

Full README⁠ · Configuration⁠ · API limits⁠ · Security⁠

License: AGPL-3.0-only

Inspired by leapmotor-mate by Silvio Bressani; an independent project with no shared code.

Spare-time project, free software. If it is useful to you: https://buymeacoffee.com/steffenr⁠

Tag summary
Recent tags
Content type
Image
Digest
sha256:b3eb9d0e8…
Size
55 MB
Last updated
about 8 hours ago
docker pull steffenr/skoda-mate:latest