mkaiser / Sungrow-SHx-Inverter-Modbus-Home-Assistant

Sungrow SH Integration for Home Assistant for SH3K6, SH4K6, SH5K-20, SH5K-V13, SH3K6-30, SH4K6-30, SH5K-30, SH3.RS, SH3.6RS, SH4.0RS, SH5.0RS, SH6.0RS, SH5.0RT, SH6.0RT, SH8.0RT, SH10RT, SH5.0RT-20, SH6.0RT-20, SH8.0RT-20, SH10RT-20, SH5.0RT-V112, SH6.0RT-V112, SH8.0RT-V112, SH10RT-V112, SH5.0RT-V122, SH6.0RT-V122, SH8.0RT-V122, SH10RT-V122, SH4.6R
304 stars 79 forks source link

total_dc_power over a million watts #299

Open TomMarg opened 1 month ago

TomMarg commented 1 month ago

Using the latest version everything works perfect but every once in a while the total_dc_power is listed as over a million watts. Typically it happens on cloudy days when the sun comes out but I do not yet know how to ignore those values but they make the charts unreadable.

wanted to report this behavior.

Model: SH-10.RT v112]

Home Assistant version:

modbus_sungrow.yaml:

Inverter Firmware Status:

Screenshots If applicable, add screenshots to help explain your problem.

image

Additional context Add any other context about the problem here.

Gnarfoz commented 1 month ago

Some forums suggest it's just a communication issue, but I've also only started noticing this recently. I'm not on the most recent YAML file, so I'd say it is not directly related to this project itself. Possibly Home Assistant related. Or just bad luck and badly shielded network cables. 🫤

Skrotax commented 3 weeks ago

Having the same issues on Total dc power, Load power and Meter active power. MPTT1&2 power and Meter A-B-C active power is showing normal. Skärmbild 2024-06-11 204616 Skärmbild 2024-06-11 204414

Gnarfoz commented 3 weeks ago

I've resorted to deleting such excessive values from the database, but it's pretty clear that it's not just bad cables. It's also quite unlikely to be this project, because it "just" uses the default Home Assistant Modbus integration to do the actual work. Total DC power and load power are straight Modbus sensors with no helpers/templates in between. Meter active power uses a template sensor to filter out the edge case when the power grid is not available.

I wonder how it could be possible that this is related to the change to async library calls in the Modbus integration, but those changes fit the timeline.

Skrotax commented 3 weeks ago

I just added a max_value to Total DC sensor (I have a SH8.0RT - 8000W) in modbus_sungrow.yaml. Not a solution to the issue, but history graph will hopefully be readeable.

image

Gnarfoz commented 3 weeks ago

Yeah, it could help avoid polluting the statistics with wrong data. Too bad max_value replaces the excessive value with the max_value instead of just omitting it, that'd be even cleaner...

If you have a battery and more DC power installed than your inverter's rated AC limit (e.g. SH10RT with 15 kWp), you should set such limits to the higher number. When there's free capacity in the battery, the inverter will send the DC directly to the battery, increasing "total DC power" above the AC limit.

I ran a query in the database to check which entities have shown the problem - I'm not sure there's any pattern: sensor.total_active_power sensor.reactive_power sensor.load_power sensor.meter_active_power_raw sensor.total_direct_energy_consumption sensor.total_dc_power

Limits on a "total energy" value are going to have to be preeetty high...