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
342 stars 92 forks source link

Wrong Register used for Battery Capacity #354

Open RafAustralia opened 1 day ago

RafAustralia commented 1 day ago

https://github.com/mkaiser/Sungrow-SHx-Inverter-Modbus-Home-Assistant/blame/a03c37b82d773ecf1c25ff4f4e66bbecc948b83d/modbus_sungrow.yaml#L1617

I believe that wrong register is being used for this entity and below is adjusted register address to fix that issue:

  - name: Battery capacity
    unique_id: sg_battery_capacity
    device_address: !secret sungrow_modbus_slave
    address: 13038 # reg 13039 changed from reg 33048
    input_type: input # reg changed holding to input
    data_type: uint16
    precision: 1
    unit_of_measurement: kWh
    device_class: energy_storage
    scale: 0.1
    scan_interval: 10

In my case this has fixed all issues with battery capacity... and I have applied it to quite a few sungrow battery units. (they all seem to work)

RafAustralia commented 1 day ago

@purcell-lab - thank you :)

mkaiser commented 21 hours ago

Adapted it - the capacity is still correct in my setup.

address: 13038 # reg 13039 changed from reg 33048

Where did you find the new register address?

RafAustralia commented 16 hours ago

@mkaiser

hey... I have the following version of protocol with me (which was the latest at the time of writing) TI_20231019_Communication Protocol of Residential Hybrid Inverter_V1.1.2_EN (007)

here is the register I used:

image