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

Battery charging/discharging power using wrong registers? #293

Closed Gnarfoz closed 1 month ago

Gnarfoz commented 1 month ago

Describe the bug: It looks like the addresses used for "battery charging start power" and "battery discharging start power" are off by +1? https://github.com/mkaiser/Sungrow-SHx-Inverter-Modbus-Home-Assistant/blob/main/modbus_sungrow.yaml#L1528 https://github.com/mkaiser/Sungrow-SHx-Inverter-Modbus-Home-Assistant/blob/main/modbus_sungrow.yaml#L1541 The Sungrow hybrid inverter Modbus specification lists "Charging/Discharging Power – Wide range U16" as register 33148, but the addresses for registers are normally offset by -1, so the addresses should be 33147 & 33148, no? I'm not exactly sure what Sungrow refers to by "wide range", though. Also, "charging start power" seems to work for me with address 33148.

Your Sungrow inverter:

Home Assistant version:

modbus_sungrow.yaml:

Inverter Firmware Status:

Gnarfoz commented 1 month ago

Never mind, I think I made a simple off-by-one error. Register 33148 is not being used at all (still unsure what it represents), and registers 33149 and 33150 are undocumented registers for charging/discharging start power thresholds.