guiguan/tesla-sungrow-charge-controller — explained in plain English
Analysis updated 2026-05-18
Automatically charge a Tesla only when a home solar system is producing surplus power.
Read live exported power from a Sungrow inverter over Modbus TCP.
Start and stop Tesla charging remotely through the Tessie API based on solar surplus.
Deploy the controller as a container on a home Kubernetes cluster.
| guiguan/tesla-sungrow-charge-controller | anomalroil/1key | anshuman852/dasan-router-cli | |
|---|---|---|---|
| Stars | 2 | 2 | 2 |
| Language | Go | Go | Go |
| Last pushed | — | 2019-05-17 | — |
| Maintenance | — | Dormant | — |
| Setup difficulty | hard | moderate | moderate |
| Complexity | 4/5 | 3/5 | 3/5 |
| Audience | developer | ops devops | ops devops |
Figures from each repo's GitHub metadata at analysis time.
Requires a Sungrow inverter with a verified Modbus register, a Tessie account and token, and matches a 230V single-phase electrical setup by default.
This project automatically times a Tesla's home charging so it soaks up extra solar power instead of drawing electricity from the grid. It connects to a Sungrow solar inverter over a protocol called Modbus TCP, which is a common way industrial and solar equipment shares data, and to the car itself through a third-party service called Tessie that lets other programs control Tesla vehicles. Roughly every 30 seconds, the controller checks how much power the solar inverter is currently exporting to the grid, meaning the house is producing more than it is using at that moment. It also checks the car's current status, including battery level, whether it is plugged in, and its GPS location. If you set home coordinates, it only acts when the car is parked within about 50 meters of home, so it will not try to manage charging while the car is out and about. Based on the exported power, it works out how fast the car should charge, starting a charge session when there is enough surplus solar and stopping it again when the surplus drops too low, adjusting the charging current in between. The README is upfront that the exact Modbus register used to read exported power is specific to the inverter model, meter, and firmware, and walks through how to find and verify the correct register for a different setup using a separate tool. It also assumes a single-phase 230 volt electrical setup when converting between watts and amps, which fits countries like Australia rather than regions using different voltages. The project is written in Go, and the README documents building it locally, packaging it into a container image with a tool called Dagger, and deploying that container to a Kubernetes cluster with example configuration files. It requires a Tessie account and API token for the specific car, and a Modbus TCP connection to the inverter. It is licensed under MIT.
A controller that automatically times a Tesla's home charging to use surplus solar power from a Sungrow inverter.
Mainly Go. The stack also includes Go, Modbus TCP, Tessie API.
MIT license: use, modify, and distribute freely, including commercially, as long as you keep the copyright notice.
Setup difficulty is rated hard, with roughly 1h+ to a first successful run.
Mainly developer.
This repo across BitVibe Labs
Don't trust strangers blindly. Verify against the repo.