A lightweight, open-source DIY replacement for the Nissan Leaf ZE1 Telematics Control Unit (TCU).
Read this in Finnish: README_FI.md
With Nissan shutting down the NissanConnect EV services, simppeliTCU offers a local, Wi-Fi-based ESP32 solution to regain control of your car's climate and charging via the IT CAN bus (often referred to as CAR-CAN by the community). Similarly as the original TCU.
NOTE: This project is currently an draft implementation generated mainly with AI.
- 🌡️ Remote Climate Control: Start and active abort of the cabin heater/AC.
- 🔋 Remote Charging: Override the charge timer to start charging.
- 🔐 Door Locking: Lock and unlock doors remotely (disabled by default, enable via configuration).
- 🔕 Nag Screen Auto-Dismiss: Automatically dismisses ZE1 infotainment nag/popup screen when connected to AV-CAN bus.
- 📊 Live Data: Reads State of Charge (SOC %) and Cabin Temperature from the CAN bus.
- 📍 Location Tracking: GPS coordinates from the AV-CAN bus shown in the web UI with a Google Maps link, published to MQTT and discovered by Home Assistant (can be turned on via the
trackingconfiguration, disabled by default). - 🌐 Web UI: Simple, lightweight mobile-friendly web interface.
- 🏠 Home Assistant Integration: Automatic discovery of metrics and controls via MQTT.
- 📡 MQTT Support: Integrate with home automation or mobile apps over encrypted transport. Note: unless proper certificate validation is implemented, the MQTT server is not authenticated. See the MQTT Setup Guide.
- ⚙️ Non-blocking operation: The device processes CAN commands asynchronously. If a new command is issued while one is already in progress, it will be safely ignored.
- First trials: https://youtu.be/qn05-901b3Y
- Web interface through wifi: https://youtube.com/shorts/XqAgwizNodE
- MQTT use with IoTMQTTPanel and OVMS Connect: https://youtu.be/g8Yh6OgjL-Q?si=QtElrzG9FnF5YEUm
- Glove box removal (LHD ZE1 Leaf): https://youtu.be/kyx2A4U-M1M?si=YGewj1TeBEfrpOKV
- Nag Screen Auto-Dismiss https://youtu.be/FWOML1giRBo?si=TElSWKBwn389HtfV
- Lilygo T-2CAN (ESP32 with built-in CAN transceiver).
- Automotive 12V to 5V Step-Down Converter (Highly recommended: a flush-mount 12V USB car socket).
- Connectors/pins to mate with the original TCU harness.
See the Installation Guide for full step-by-step instructions, wiring diagrams, and required tools.
DO NOT connect the car's 12V line directly to the Lilygo board! Automotive 12V systems experience massive voltage spikes (transients) that will most likely damage the ESP32.
- Unplug the IT-CAN wires from original TCU.
- Route the 12V from the TCU harness through an automotive-grade 12V-to-5V USB adapter (with an inline fuse).
- Power the Lilygo using a standard USB cable from the adapter.
- Connect
CAN-HandCAN-Lto the Lilygo's TWAI pins (Port B: TX 7, RX 6 in this code).
The device configuration (Wi-Fi, MQTT credentials, etc.) is stored in persistent memory. You configure the system through the USB serial connection using a terminal (such as the Arduino IDE Serial Monitor, PuTTY, or similar) set to 115200 baud with Newline (\n) or Carriage Return (\r) enabled.
Available commands:
list- Shows all current configuration properties (including firmware version).get <key>- Prints the current value of the specified key.set <key> <value>- Updates the specified key with a new value (saved persistently).version- Prints the current firmware version and git commit hash.reboot- Restarts the device to apply the changes immediately.factory-reset- Clears all configuration settings and restarts the device.
Example configuration session:
set ssid MyWiFiNetwork
set password MySecretPassword
set ap_ssid LeafLocalAP
set ap_password LeafLocalPassword
set mqtt_server 192.168.1.100
set locking_enabled true
reboot
Supported Configuration Keys:
ssid,password(For connecting to an existing Wi-Fi network / STA mode)ap_ssid,ap_password(For creating a local Wi-Fi Access Point / AP mode)hostNamemqtt_server,mqtt_port,mqtt_user,mqtt_password,vehicle_idmqtt_tls(Enable/disable TLS for MQTT connection; default:true)locking_enabled(Enable door lock/unlock functionality; default:false)hass_discovery(Enable/disable Home Assistant discovery messages; default:true)nag_dismiss(Enable/disable automatic infotainment nag screen dismissal on AV-CAN; default:true)tracking(Enable/disable GPS location tracking: web UI display, MQTT publishing and Home Assistant discovery entities; default:false. Set totrueto turn location tracking on:set tracking true)
Wi-Fi Modes:
- STA Mode: Active when
ssidis configured. The device connects to your home/garage Wi-Fi. - AP Mode: Active when
ap_ssidis configured. The device broadcasts its own Wi-Fi network (useful when away from home). - AP + STA Mode: Active when both
ssidandap_ssidare configured. The device will connect to your home Wi-Fi while simultaneously broadcasting its own Access Point.
For instructions on how to compile and upload the firmware using the Arduino IDE or the Command Line Interface (CLI), please refer to the Compiling and Uploading Guide.
For instructions on downloading and flashing pre-compiled release binaries (using GUI tools or esptool), please refer to the Pre-compiled Binaries Flashing Guide. See CHANGELOG.md for a history of features and changes in each release.
Please see the CAN Communication Details document for information regarding CAN bus messages, commands, known issues, and limitations related to the IT-CAN integration.
The firmware supports two CAN interfaces:
- Primary CAN (TWAI): The ESP32's built-in CAN controller (Port B: TX 7, RX 6).
- Second CAN (MCP2515): An external MCP2515 CAN controller connected over SPI, available on the LilyGO T-2Can board.
All outgoing CAN messages are sent on both buses, and incoming messages received on either bus are processed identically. This allows the device to be connected to two separate CAN buses at the same time. e.g. IT CAN and AV CAN.
The second CAN interface is enabled by default and requires the autowp-mcp2515 library (see the Compiling and Uploading Guide). It can be disabled by setting USE_SECOND_CAN to 0 in simppeliTCU/featureFlags.h or by overriding it with the compiler flag -DUSE_SECOND_CAN=0. Pin assignments for both CAN interfaces (TWAI and MCP2515) are configured centrally in simppeliTCU/hardware.h.
This project is licensed under the MIT License.
DISCLAIMER OF LIABILITY: This software and hardware modification interacts with the high-voltage control systems of a vehicle. It is provided "AS IS", without warranty of any kind, express or implied. By using this code, you assume all risks. The authors or contributors will NOT be held liable for any damage to your vehicle, voided warranties, property damage, or personal injury resulting from the use of this software or hardware. USE AT YOUR OWN RISK.
- Inspired by the incredible work of the OVMS Project and Dalathegreat (Dala's EV Repair) for documenting the Nissan Leaf CAN buses.
