Integrate Tesla Wall Connector into Victron Energies Venus OS
Reading data from Tesla Wall Connector works. Writing data to Tesla Wall Connector is currently not possible due to a missing API. Use the car api with node red contrib instead if you need to change the values.
There still might be some issues
This repo enable visualizing data of one Tesla Wall Connector VenusOS and GX devices from Victron. Idea is inspired on @fabian-lauer, @viktorm and @trixing project linked below, many thanks for sharing the knowledge:
- https://github.com/fabian-lauer/dbus-shelly-3em-smartmeter
- https://github.com/trixing/venus.dbus-twc3
- https://github.com/vikt0rm/dbus-goecharger
- 3-Phase installation
- Venus OS on Cerbo GX - Firmware v3.30
- Tesla Wall Connector hardware version 3
- needs to be in the same network as the cerbo (a static ip needs to be condigured if you can not reach the Wall Connector via "TeslaWallConnector.local")
What is the script doing:
-
Running as a service
-
connecting to DBus of the Venus OS
com.victronenergy.evcharger.http_{DeviceInstanceID_from_config}
-
After successful DBus connection the Tesla Wall Connector is accessed via REST-API
- http://ip_of_connector/api/1/vitals
- http://ip_of_connector/api/1/lifetime
- http://ip_of_connector/api/1/version
currently not used
- http://ip_of_connector/api/1/wifi_status
-
Serial/MAC is taken from the response as device serial
-
Paths are added to the DBus with default value 0 - including some settings like name, etc
-
After that a "loop" is started which pulls Tesla Wall Connector data every 2.5s from the REST-API and updates the values in the DBus
This script until now supports reading values from the Tesla Wall Connector. Writing values is not supported as there is currently no known API. Control of Tesla Wall Connector by the victron system in "Mode" "Auto" is not supported for now and changing the value will have no effect.
Log into your GX device via ssh and run the following scripts:
wget https://github.com/Sonny13/dbus-TeslaWallConnector/archive/refs/heads/main.zip
unzip main.zip "dbus-TeslaWallConnector-main/*" -d /data
mv /data/dbus-TeslaWallConnector-main /data/dbus-teslawallconnector
chmod a+x /data/dbus-teslawallconnector/install.sh
rm main.zip
Within the project there is a file /data/dbus-teslawallconnector/config.ini
- just change the values - most important is the deviceinstance under "DEFAULT" and host in section "ONPREMISE". More details below:
Section | Config vlaue | Explanation |
---|---|---|
DEFAULT | AccessType | Fixed value 'OnPremise' |
DEFAULT | SignOfLifeLog | Time in minutes how often a status is added to the log-file current.log with log-level INFO |
DEFAULT | Deviceinstance | Unique ID identifying the shelly 1pm in Venus OS |
ONPREMISE | Host | IP or hostname of Tesla Wall Connector |
nano /data/dbus-teslawallconnector/config.ini
/data/dbus-teslawallconnector/install.sh
svstat /service/dbus-teslawallconnector
show if the service (our script) is running. If the number of seconds shown is low, it is probably restarting and you should look into cat /data/dbus-teslawallconnector/current.log
.
you can restart the service after a config change with
/data/dbus-teslawallconnector/restart.sh
you can stop the service
/data/dbus-teslawallconnector/uninstall.sh