SolarEdge Multi Inverter: Preventing Discharge In EVCC

by SLV Team 55 views
Solving Discharge Issues with SolarEdge Multi-Inverter Setups in EVCC

Hey everyone,

Having issues with your SolarEdge multi-inverter setup and EVCC? Specifically, are you seeing your battery discharge even when you've set it to prevent discharge in fast mode or during planned charging? You're not alone! This article breaks down a common problem encountered when using multiple SolarEdge inverters with EVCC and offers insights into potential solutions.

Understanding the Problem: Prevent Discharge Not Working

The core issue revolves around the interaction between EVCC and SolarEdge inverters in a multi-inverter configuration. Here’s the scenario:

  • You have two SolarEdge inverters, each with a battery connected.
  • Both inverters are networked, but only one has a direct LAN connection.
  • You can configure both inverters via Modbus (IDs 1 and 2).
  • You've set the StorageConfCtrlMode (0xE004) to 4 ("Remote") on the main inverter (Modbus ID 2).
  • You've enabled "Prevent discharge in fast mode and planned charging" in EVCC.

Despite these settings, during car charging (either in planned or fast mode), the battery continues to discharge. This indicates that the inverter isn't correctly receiving or processing the command from EVCC to prevent discharge.

Why This Happens: Multi-Inverter Complexity

The most likely culprit is how EVCC handles multi-inverter setups. In a typical single-inverter setup, EVCC directly communicates with the inverter to manage battery modes and charging behavior. However, with multiple inverters, EVCC might not be correctly identifying the main inverter responsible for controlling the battery's operation. Since both inverters are connected and configurable via Modbus, EVCC needs a clear way to know which inverter is the master for battery control.

Without a designated primary inverter in the EVCC configuration, it's possible that the commands to prevent discharge aren't being sent to the correct inverter or that the inverters are conflicting in their operation. This can cause your settings not to work as expected, leading to the battery discharge problem you're experiencing. It's crucial to establish a clear line of communication with the correct inverter to ensure proper control.

Troubleshooting Steps: Diagnosing the Issue

Before diving into solutions, let's confirm the problem and gather more information:

  1. Verify Inverter Configuration: Double-check that StorageConfCtrlMode (0xE004) is indeed set to 4 ("Remote") on the primary inverter (Modbus ID 2). Ensure this setting is consistently applied and saved.

  2. Review EVCC Configuration: Carefully examine your evcc.yaml configuration file. Look for any settings related to SolarEdge, Modbus, and battery management. Ensure the inverter IDs are correctly specified, and there are no conflicting configurations. Use the command evcc dump --cfg to output the active configuration, but be mindful of the database warnings (more on that later).

  3. Analyze EVCC Logs: The EVCC logs are your best friend. Increase the log verbosity (if possible) to capture more detailed information about Modbus communication and battery control commands. Specifically, look for messages related to:

    • Modbus communication with the inverters.
    • Setting the battery charge/discharge mode.
    • Battery power and state of charge (SOC).
    • Any errors or warnings related to SolarEdge communication.

    The provided log snippet shows battery discharge even when charging the car. This is a key indicator that the "prevent discharge" setting is not being honored. Also, note the separate power readings for "battery 1" and "battery 2," confirming the presence of multiple batteries. This reinforces the need to correctly configure the multi-inverter setup in EVCC.

Potential Solutions: Getting Things Working

Here are several approaches to try, ranging from simple checks to more advanced configuration tweaks:

  1. Explicitly Define the Primary Inverter (If Possible): The ideal solution would be an EVCC configuration option to designate one of the SolarEdge inverters as the primary controller for battery management. Check the EVCC documentation and configuration options to see if such a setting exists or is planned for a future release. If you find a way to define the primary inverter, make sure it corresponds to the inverter with Modbus ID 2, as it's the one controlling the battery mode.
  2. Modbus Configuration Verification: Double-check all Modbus-related settings in your evcc.yaml file. This includes the Modbus IDs, communication parameters (baud rate, parity, etc.), and any custom Modbus register mappings. Ensure that the Modbus configuration aligns with the SolarEdge Modbus documentation for multi-inverter setups.
  3. Rule Out External Automation Conflicts: As mentioned in the bug report, it's critical to ensure no other systems (like Home Assistant or Node-RED) are interfering with EVCC's control of the inverters. Temporarily disable any external automation that might be accessing the SolarEdge inverters via Modbus to isolate the problem.
  4. Database Considerations: The evcc dump --cfg command output warns about potential database conflicts when running multiple instances of EVCC with different database paths. While this might not be directly related to the discharge issue, it's essential to address the database warning to ensure EVCC operates reliably. Follow the instructions provided in the output to either use the existing service database or create a new user-space database.
  5. Experiment with Inverter Connection Order: While it might seem counterintuitive, try swapping the LAN connections between the two inverters. In other words, connect the inverter with Modbus ID 1 to the LAN and disconnect the inverter with Modbus ID 2. This could potentially influence how EVCC discovers and interacts with the inverters. Remember to update your EVCC configuration accordingly if you change the Modbus IDs.
  6. Contact EVCC Support: If you've exhausted all troubleshooting steps and the issue persists, reach out to the EVCC community or support channels. Provide them with detailed information about your setup, including your evcc.yaml configuration, EVCC logs, and the steps you've already taken. The EVCC developers might be able to provide specific guidance or identify a bug in the multi-inverter handling logic.

Analyzing the Provided Log Details

The log details offer valuable clues. Here's a breakdown:

  • Battery Discharge: The lines [site ] DEBUG 2025/11/02 09:56:21 battery 2 power: -1531W and [site ] DEBUG 2025/11/02 09:56:21 battery 1 power: -1530W clearly show that both batteries are discharging (-1531W and -1530W respectively).
  • PV Production: The lines [site ] DEBUG 2025/11/02 09:56:23 pv 2 power: 1818W and [site ] DEBUG 2025/11/02 09:56:24 pv 1 power: 1786W indicate that the solar panels are producing power (1818W and 1786W respectively).
  • Charging Attempt: Later in the log, we see [lp-1 ] DEBUG 2025/11/02 09:56:52 charge power: 10690W indicating a charging process has begun at 10690W.
  • Simultaneous Battery Charge and Discharge: Simultaneously, the log shows [site ] DEBUG 2025/11/02 09:56:56 battery 2 power: 3867W and [site ] DEBUG 2025/11/02 09:56:56 battery 1 power: 3863W which indicates batteries are charging, however the setting to prevent discharge during charging is not working.

This pattern confirms that the batteries are discharging even when they shouldn't be, given the "prevent discharge" setting. The fact that the log reports both battery 1 and battery 2 separately further emphasizes the need to handle multi-inverter setups correctly.

Final Thoughts: Multi-Inverter Challenges

Managing multiple inverters and batteries can introduce complexities. I hope this guide helps you troubleshoot and resolve the discharge issues you're experiencing with your SolarEdge setup and EVCC. Hang in there, and don't hesitate to seek help from the EVCC community if you get stuck!