This project creates a bridge between OCPP (Open Charge Point Protocol) and Tesla Wall Connector (TWC) protocol. It simulates a TWC while acting as an OCPP server.
This bridge is specifically designed to work with EVCC (Electric Vehicle Charge Controller) to simulate a Tesla Wall Connector. This enables EVCC to directly control Tesla vehicles without requiring TWC hardware, allowing for fine-grained current control down to 1 Ampere using the Tesla API.
Note: It's recommended to use TeslaBleHttpProxy alongside this project to avoid hitting Tesla Fleet API rate limits.
I'm using it with the Fronius Wattpilot.
This project is primarily AI-generated code, developed with the assistance of GitHub Copilot Edits and Claude 3.5 Sonnet.
poetry install
poetry run python -m ocpp2twc
The server will start on ws://0.0.0.0:9000
and accept OCPP 1.6 connections.
Create a docker-compose.yml
:
version: '3'
services:
ocpp2twc:
image: ghcr.io/jabe/ocpp2twc:main
ports:
- "9000:9000"
- "80:8080"
restart: unless-stopped
- Install the Python extension for VSCode
- Open the project in VSCode
- Run
poetry install
in the terminal - Select the Python interpreter:
- Press
Cmd+Shift+P
(Mac) orCtrl+Shift+P
(Windows/Linux) - Type "Python: Select Interpreter"
- Choose the interpreter from
.venv
folder
- Press
To run the server:
- Press
F5
or - Use the Run and Debug sidebar (Cmd+Shift+D) and click the green play button
MIT