The Tesla Sungrow Charge Controller intelligently manages a Tesla's charging by utilizing surplus solar power from a Sungrow inverter via Modbus. It operates seamlessly, ensuring the vehicle charges only when parked and the solar output exceeds household demand. This efficient setup maximizes solar energy use and minimizes electricity costs.
The Tesla Sungrow Charge Controller is designed to optimize electric vehicle (EV) charging by utilizing surplus solar energy generated by a Sungrow inverter. This innovative controller leverages Modbus TCP to obtain real-time data on exported power from the Sungrow inverter, facilitating efficient management of a Tesla’s home charging process through the Tessie API.
Key Features
- Solar Power Maximization: The controller automatically adjusts the charging rates of the Tesla to align with the surplus energy produced by the Sungrow solar system, ensuring that the EV draws energy primarily during the car's presence at home.
- Real-time Monitoring: The system retrieves data from the inverter to assess how much power is available for charging, thereby ensuring optimal usage of excess solar generation.
- Geofencing Technology: It operates exclusively when the vehicle is within a specified distance from home, enhancing efficiency and automation.
How It Operates
The system works through a cyclical polling process that occurs every 30 seconds (default interval). The operational steps include:
- Reading the exported power from the Sungrow inverter using the Modbus input register (default register is 5600).
- Obtaining the current state of the Tesla through the Tessie API, including parameters like charging state, battery level, charge limit, and more.
- Computing a target charging power based on available solar energy, which determines when to initiate or stop charging.
Essential Configuration
Configuration is straightforward, allowing for customization through environment variables:
| Variable | Required | Description |
|---|---|---|
TESLA_VIN | yes | Vehicle VIN used in Tessie API interactions. |
TESSIE_AUTH_TOKEN | yes | Authentication token for Tessie API access. |
MODBUS_HOSTPORT | yes | Host and port for the Sungrow Modbus TCP gateway. |
HOME_LATITUDE | no | Latitude for geofencing. |
HOME_LONGITUDE | no | Longitude for geofencing. |
Additional Insights
Excess energy is harnessed by the controller which not only promotes sustainability by maximizing the use of renewable energy but also helps reduce electricity bills associated with EV charging. Using logs generated in JSON format, users can track performance and adjustments made by the controller for improved transparency and insights.
Development and Deployment
The project is built using Go and includes features for local running, building, testing, and deployment into Kubernetes environments. Detailed instructions for building and running the application are encapsulated in the Makefile, facilitating easy collaboration and extension of the controller's capabilities.
No comments yet.
Sign in to be the first to comment.