Skip to content

Latest commit

 

History

11 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

LoHaTes

LoHaTes — Tesla ↔ Loxone & Home Assistant bridge

🇩🇪 Deutsche Version

Buy Me a Coffee PayPal License: AGPL v3

One ESP32-S3 in your garage talks to your Tesla over Bluetooth — and to Loxone, Home Assistant and AI assistants. Entirely local, no cloud, no Tesla API fees.

LoHaTes (Loxone + Home Assistant + Tesla, rhymes with Socrates) builds on the excellent yoziru/esphome-tesla-ble and adds a native Loxone UDP interface, a bilingual (DE/EN) setup dashboard served by the ESP itself, per-command permission checkboxes, presence detection for garage-door automation, and an MCP server so AI assistants like Claude can inspect and (if allowed) control the car.

Disclaimer: Independent open-source project, not affiliated with Tesla, Inc., Loxone Electronics GmbH or Home Assistant / the Open Home Foundation. Mentioned trademarks belong to their owners. You interface with your own car at your own risk.

Features

  • Tesla over BLE — wake, charging start/stop, amps (PV surplus charging!), charge limit, lock/unlock, charge port, plus sensors: SOC, range, power, climate, tire pressure, doors … The car keeps sleeping normally (VCSEC polling never wakes it)
  • Loxone native — UDP status push every 10 s + instant presence events (present=1/0 when the car arrives/leaves → garage door logic), commands back via virtual output. No plugins, no gateway, works without HA
  • Home Assistant — regular ESPHome device, all entities auto-discovered incl. climate thermostat; runs fine without HA too (reboot_timeout: 0s)
  • Setup dashboard on the ESPhttp://<esp>/loxone (DE) / http://<esp>/en (EN): live tiles, step-by-step Loxone tables, HA guide, BLE-key pairing walkthrough, embedded device UI, logo at /logo.svg for dashboards
  • Security — web login (basic auth), HoxPi-style permission checkboxes per command (wake/charge/amps/limit/lock/unlock/port) enforced for Loxone UDP and AI alike; unlock ships disabled
  • AI interface (MCP) — small Model Context Protocol server (runs on any Raspberry Pi / always-on box, port 8809): get_status, diagnose, wake_vehicle, set_charging_amps … Writing gated by config and the on-device checkboxes
  • Presence zones (optional mmWave radar) — attach an HLK-LD2450 and get 3 freely drawable zones. Stand in a zone for 3 s and LoHaTes reports it to Loxone (zone1/zone2/zone3) — e.g. zone 1 opens the garage door, zone 2 switches on the light. Zones are drawn with the mouse or a finger on a live top-down map at http://<esp>/radar
  • Password you can actually reset — change the web login on the device at http://<esp>/passwort; recover with the BOOT button or by re-flashing (see below)

Hardware

Part Note
ESP32-S3 (16 MB flash, 8 MB PSRAM) e.g. N16R8 dev board; BLE + WiFi concurrently
USB power supply placed < 5 m from the car (garage/carport)
optional: Raspberry Pi for the MCP (AI) server — any always-on Linux box works
optional: HLK-LD2450 24 GHz mmWave radar for presence zones (see below)

Install (firmware)

pip install esphome
cd firmware
cp secrets.yaml.example secrets.yaml   # fill in WiFi, VIN, BLE MAC, Loxone IP, keys
esphome run tesla-ble-esp32-s3.yml     # first flash via USB, afterwards OTA

Windows note: ESP-IDF cannot build in paths containing spaces — keep the project in e.g. C:\LoHaTesBuild.

Finding your car's BLE MAC and pairing the key: open http://<esp-ip>/loxone — the dashboard walks you through everything (DE/EN).

Loxone / Home Assistant / AI

Full step-by-step guides are served by the device itself at http://<esp-ip>/loxone (German) and http://<esp-ip>/en (English) — virtual input/output tables for Loxone (UDP port 7101), ESPHome integration for HA, garage-door presence logic, PV surplus formula, and the Claude Desktop MCP snippet. A copy lives in docs/.

Ready-made Loxone templates (virtual UDP input + virtual output as importable XML): see loxone-templates/.

MCP server (optional, for AI assistants)

# on your Pi / server:
mcp/lohates_mcp_setup.sh    # creates venv + systemd service on port 8809

Claude Desktop → claude_desktop_config.json:

{ "mcpServers": { "lohates": {
    "command": "npx", "args": ["-y", "mcp-remote", "http://<pi-ip>:8809/mcp"] } } }

Optional: presence zones (mmWave radar)

Attach an HLK-LD2450 radar and LoHaTes gains three freely drawable presence zones — stand in one for a few seconds and Loxone gets zone1/zone2/zone3. Handy for "walk up to the garage door and it opens", or switching on a light on approach.

Entirely optional: without the radar package nothing changes, and the Radar page disappears from the navigation. Full guide: docs/radar.md.

Forgot the web password?

Factory setting: user admin, password 12345678 — the same on every fresh build, so change it once the device is up.

The web login can be changed on the device at http://<esp>/passwort and is stored in flash. Three ways back if it is lost — one of them always works:

Way How
Still logged in Button "reset to default" on /passwort
Physical access Hold the BOOT button for 10 s → the default from secrets.yaml applies again
Re-flash Change web_password in secrets.yaml and flash — any custom password is discarded automatically

That last rule is deliberate: a custom password lives in NVS and would otherwise survive a re-flash and lock you out for good. LoHaTes stores a hash of the default alongside it, so a changed default always wins.

The OTA password used for flashing is separate and also lives in secrets.yaml (ota_password).

Changes vs. upstream (AGPL §5 notice)

This repository contains a modified copy of yoziru/esphome-tesla-ble (in firmware/, original license preserved). Modif

About

Tesla - Loxone - Home Assistant bridge on ESP32-S3. Local BLE control (charging, presence, garage door), UDP for Loxone, ESPHome for HA, MCP server for AI assistants. No cloud.

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages