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
328 stars 86 forks source link

backup power and reading from the meter added #39

Closed dzarth closed 1 year ago

dzarth commented 1 year ago

Dear mkaiser, I added some values for the backup loads and some power reading from the smart meter. Source for the undocumented addresses is: https://www.photovoltaikforum.com/thread/166134-daten-lesen-vom-sungrow-wechselrichtern-modbus/?pageNo=13

It is tested OK with my SH10RT-V112

Best regards, Dirk

ViktorReinhold commented 1 year ago

Hello dzarth,

I tested your PR and get these values for Backup phase power:

grafik

I have also an SH10RT-V112. Are your values in the same 65 kW range?

The value for Meter active power seems valid:

grafik

dzarth commented 1 year ago

Hi Viktor, you are right, backup power can become negativ so I changed it to a singed int16. Can you please give it a try?

Many thanks, Dirk

ViktorReinhold commented 1 year ago

Hi Dirk,

now it makes sense and it matches with the values from the WiNet-S Device Monitoring page.

grafik

grafik

Thank you, Viktor

ViktorReinhold commented 1 year ago

Just for completeness: the 'Total Backup Power', basically the sum of all three backup power phases can be found under the register address 5725.

      - name: Total backup power
        slave: !secret sungrow_modbus_slave
        address: 5725
        input_type: input
        count: 1
        data_type: int16
        swap: word
        precision: 0
        unit_of_measurement: W
        device_class: power
        state_class: measurement
        scale: 1
        scan_interval: 10

I tested it successfully on my SH10RT-V112.

grafik

dzarth commented 1 year ago

Added, thanks a lot, Viktor :)

mkaiser commented 1 year ago

hi dzarth,

thank you for your contribution! Looks pretty good!

Will test it and merge in the next days :)

mkaiser commented 1 year ago

works with my SGH 10 RT :)

The power readings are a bit confusing:

image

I can only explain that to myself with a loss of 49W (Total DC minus DC Battery Charge minus inverter output)

It looks like the inverter does no load balancing on the three phases (which is not very suprising, because this would increase the costs and has not a large benefit for balanced meters).

I am considering renaming the "Phase x [Voltage | Current|Power]" name to "Inverter Phase x [*]" to make that more clear.

elektrinis commented 1 year ago

This is super cool, thank you. Will test it later. BTW my inverter also reports a loss of around 38W. Before firmware update it reported a loss of around 90W, but only when sun was above horizon. This is weird.

elektrinis commented 1 year ago

Just wanted to say a huge THANK YOU. Finally I can ditch some cloud-based hardware!

Screenshot 2023-01-06 122852

Possible bug? Phases A and B seem to be swapped? Checked the code and can't find a problem.