How it works
- In order to allow multiple Tesla Wall Connector (TWC) units to operate on a single power circuit, Tesla provides a Load-Sharing protocol to interconnect the Tesla Wall Connector units together, and to direct those units to charge at a specific rate based on the number of cars charging simtultaneously.
- This script (TWCManager) pretends to be a Tesla Wall Charger (TWC) set to master mode.
- When wired to the IN or OUT pins of real TWC units set to slave mode (rotary switch position F), TWCManager can limit car charging based on information from inverters and panels.
- This allows us to:
- Track the real-time availability of green energy sources (including PV Inverters, Battery Systems and Weather APIs) and direct the slave TWCs to use near the exact amount of energy available for the current conditions.
- Send on-demand commands to TWC devices to charge at specified rates and times.
- Schedule charging to occur at regular intervals.
- Control which vehicles can and cannot use a TWC device based on VIN (for supported vehicles and TWCs).
Would you like a full list of features available in TWCManager? Click here
Installation and Configuration
All installation and configuration documentation (Physical and Software) is contained in the documentation repository here
To enable TWCManager to gather the solar generation information that it requires to adjust the charging rate, we provide Interfaces to allow information to be retrieved (EMS Interfaces) and Interfaces to allow us to provide information to external systems to inform them of current charging output and number of cars currently charging.
|Dummy||Interface to simulate a TWC device for testing|
|RS485||Communicate over RS485 Serial or basic TCP communications|
|TCP||Communicate over more complex TCP network channels (In Development)|
|HTTPControl||Allows control via embedded HTTP server (with RESTful API interface)|
|MQTTControl||Allows control via MQTT|
|OCPPControl||Allows integration with OCPP|
|WebIPCControl||Allows control via PHP scripts (sysv IPC)|
EMS Interfaces read solar generation and/or consumption values from an external system. Current EMS interfaces are:
|Dutch SmartMeter||In Development||Supports DSMR Serial Protocol|
|Efergy||Available||Supports Efergy Pro Sensors|
|Enphase||Available||Supports Enphase Enlighten API|
|Fronius Inverter||Available||Supports Fronius Inverter API|
|Growatt||Available||Support for Growatt Battery systems|
|HomeAssistant||Available||Supports HomeAssistant sensors|
|IoTaWatt||Available||Supports Iotawatt outputs|
|Kostal (Pico/Plenticore)||Available||Support for Kostal Inverters via ModBus|
|Open Energy Monitor||Available||Support Open Energy Monitor integration|
|openHAB||Available||Supports openHAB items|
|OpenWeatherMap||Available||Supports OpenWeatherMap forecast-based tracking where inverter EMS is not available.|
|P1 Monitor||Available||Supports P1 Monitor (Energy Monitoring tool for Pi)|
|SmartMe||Available||Support for smart-me.com API|
|SmartPi||Available||Support for SmartPi Smart Meter|
|SolarEdge||Available||Support for SolarEdge API|
|SolarLog||Available||Supports SolarLog Base API|
|Tesla Powerwall2||Available||Support for Tesla Powerwall 2|
|The Energy Detective||Available||Support for TED (The Energy Detective)|
|URL||Available||Support for URL based generation/consumption values (eg Node-RED)|
|Volkszähler||Available||Support for Volkszahler|
Logging interfaces allow recording of statistics and values such as Green Energy data, Slave TWC status and Voltage and Amperage data to various interfaces.
This can be useful if you would like to track charger activity and use it for graphing or statistics purposes.
|Console||Print output to console|
|CSV||Log data to CSV files|
|Files||Log data to a log files|
|MySQL||Log data to a MySQL Database|
|Sentry||Log data to a Sentry project|
|SQLite||Log data to a SQLite Database|
Status interfaces publish TWCManager status information to external systems. Current Status interfaces are:
|HomeAssistant||Provides HASS sensors to monitor TWCManager State|
|MQTT||Publishes MQTT topics to monitor TWCManager State|
|TeslaAPI||Allows start/stop charging via Tesla API|
|TeslaMate||TeslaMate integration (Tesla API Tokens)|
It is important to read and understand the following warnings before using this tool:
- Misuse of the protocol described in this software can direct a Tesla Wall Charger to supply more current to a car than the charger wiring was designed for.
- This will trip a circuit breaker or may start a fire in the unlikely event that the circuit breaker fails.
- This software was not written or designed with the benefit of information from Tesla and there is always a small possibility that some unforeseen aspect of its operation could damage a Tesla vehicle or a Tesla Wall Charger.
- All efforts have been made to avoid such damage and this software is in active use on the author's own vehicle and TWC.
- In short, USE THIS SOFTWARE AT YOUR OWN RISK.
- Due to hardware limitations, TWCManager will not work with Tesla's older High Power Wall Connectors (HPWCs) that were discontinued around April 2016.
- We do not currently have enough information about the new 2020 Tesla Wall Connector devices with WiFi to understand if they will be compatible in any way (wired or wireless) with TWCManager.
- Original TWCManager distribution by cdragon
- The effort by @cdragon cannot be understated, if you would like to read more about the intense hardware hacking that was done to make this project a reality, read this thread.
- Integrated improvements from flodom's TWCManager fork.
- Support for multiple vehicles on multiple chargers
- Support for publishing status to MQTT topics