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

Zwei Wechselrichter. Daten unterschiedlich in HA und iSolarCloud | Two inverters. Different data in HA and iSolarCloud #253

Open pille89 opened 4 months ago

pille89 commented 4 months ago

Describe the bug:

Ich habe einen Hybridwechselrichter (SH8.0RT-V112) und einen Wechselrichter (SG5.ORT) in meinem PV System. Leider werden die Werte scheinbar nicht zusammengefasst. Ich habe immer andere Werte in HA wie in der iSolarCloud. Die Werte in der iSolarCloud sind immer höher als die in HA. Kann man da etwas tun?

I have a hybrid inverter (SH8.0RT-V112) and an inverter (SG5.ORT) in my PV system. Unfortunately, the values do not seem to be summarized. I always have different values in HA than in the iSolarCloud. The values in the iSolarCloud are always higher than those in HA. Is there anything that can be done?

A clear and concise description of what the bug is.

iSolarCloud Werte höher als in HA iSolarCloud values higher than in HA

Your Sungrow inverter:

Home Assistant version:

modbus_sungrow.yaml:

Inverter Firmware Status:

Reproduce Steps to reproduce the behavior:

Besteht immer Always exists

Expected behavior Ich habe erwartet, das die Werte in HA undgefähr gleich sind wie auf dem iSolarCloud Portal

I expected the values in HA to be approximately the same as on the iSolarCloud portal

Screenshots 2024-02-11_11h10_00

Additional context Add more information about your problem here.

geni0602 commented 4 months ago

Hi, did you try to log in locally on your inverter (Local IP) and compare with home assistant. I think the data in icloud is not live. They are refreshing in a defined period

pille89 commented 4 months ago

Hello @geni0602 ,

Thank you for your answer. How can I log on to the inverter locally? Do I still need a port? I can't get access via http and https.

geni0602 commented 4 months ago

i have the SG6.0rt connected with WiNetS-LAN. No Wifi active. For me it is possible to open the web interface with my local IP.

You can also go trough the app. Click on support and the LAN Local. (s. my second screenshot)

Bildschirmfoto 2024-02-12 um 10 52 08

Viber-Bild_2024-02-12_10-55-30-316

pille89 commented 4 months ago

Okay, I've been trying the Modbus IP the whole time. It doesn't work with that. It does with the WiNet-S IP. The only question that remains is whether both PV outputs are now added together. Both inverters each show a PV output that is different.

pille89 commented 4 months ago

Hello,

So the data with two inverters is not combined. How does the script work with two inverters? When I read out the Daily PV generation, I only get the data from one inverter, the other data from the second inverter is not taken into account.

Also die Daten mit zwei Wechselrichtern werden nicht zusammen gefasst. Wie funktioniert das Script mit zwei Wechselrichtern? Wenn ich die Daily PV generation auslese, bekomme ich nur die Daten von einem Wechselrichter angezeigt die anderen Daten vom zweiten wechselrichter werden nicht beachtet.

geni0602 commented 4 months ago

Are both invertors connected to each other? Is the first one configure to meter also the date from the second one?

If they are independent from each other, then just configure a modbus for the second one and sum the values in home assistant

Maybe this will help https://www.photovoltaikforum.com/thread/184326-sungrow-zwei-wechselrichter-an-einem-smartmeter/

bleughb commented 4 months ago

Hello,

So the data with two inverters is not combined. How does the script work with two inverters? When I read out the Daily PV generation, I only get the data from one inverter, the other data from the second inverter is not taken into account.

Also die Daten mit zwei Wechselrichtern werden nicht zusammen gefasst. Wie funktioniert das Script mit zwei Wechselrichtern? Wenn ich die Daily PV generation auslese, bekomme ich nur die Daten von einem Wechselrichter angezeigt die anderen Daten vom zweiten wechselrichter werden nicht beachtet.

You create TWO YAML scripts, one for each inverter! you'll have to rename all the entities in the second YAML, which can take a while (just add an _2 or similar thing to each name) add the second IP address / password in the secrets.YAML also

I have two SG5.0RS working superbly and displaying all 4 of my MPPT's

image

vistree commented 4 months ago

@bleughb - Thanx for your hints!!! Do we also need to rename each sensor - or can both inverters share the unique sensor ids?

geni0602 commented 4 months ago

@bleughb - Thanx for your hints!!! Do we also need to rename each sensor - or can both inverters share the unique sensor ids?

Hi, it's in the name unique, one time only. They have to be different.

vistree commented 4 months ago

Uff, that is realy hard work ;-)

geni0602 commented 4 months ago

You don't have to copy everything. Just copy the sensors that you need.

vistree commented 4 months ago

So, do we need to rename each unique_id and each entity_id or just the entity_id?

geni0602 commented 4 months ago

Screenshot_2024-02-24-14-42-05-64_40deb401b9ffe8e1df2f1cc5ba480b12

geni0602 commented 4 months ago

Name and id. Entity will be created automatically according to name/id

vistree commented 4 months ago

Thank you @geni0602 . Am I right, that I also have to rename the sensors within states?

` - name: Battery discharging 2 unique_id: sg_battery_discharging_2

TODO: test more with these parameters for template binary sensors

    # device_class: none / power
    # state_class: measurement
    availability: >-
      {{ 
      not is_state('sensor.**running_state**', 'unavailable') # e.g. here?????
      or
        (   not is_state('sensor.**ems_mode_selection_raw**', 'unavailable')
        and not is_state('sensor.**battery_forced_charge_discharge_cmd_raw**', 'unavailable')
        and not is_state('sensor.**battery_power_raw**', 'unavailable')
        and not is_state('sensor.**total_dc_power**', 'unavailable') 
        and not is_state('sensor.**load_power**', 'unavailable') 
        )
      }}
    state: >-
      {% if states('sensor.**running_state**')|is_number %}

`

geni0602 commented 4 months ago

Jep. Do you have a battery? If not, you don't need them at all.

vistree commented 4 months ago

Yes, I have a battery ;-)

vistree commented 4 months ago

By the way: I found https://github.com/reesaroo74/Sungrow-SHx-Inverter-Modbus-Home-Assistant which has configs for 2 inverters - which I used as a starting point, adding missing commits from mkaiser