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
322 stars 82 forks source link

Two inverters #16

Closed bergh-io closed 1 year ago

bergh-io commented 1 year ago

First off, great work!

I have two SH10RT, is it possible to add both? I only have battery on one of them, the master, and that works like a charm but for information like current solar power, daily yield and such its not enough to add the master as it doesn't show the stats from the slave.

mkaiser commented 1 year ago

hi,

should be do-able somehow:

First guess (there might be other options):

Copy and adapt the three secrets/ variables to match the second inverter:

secrets.yaml:
#first inverter
sungrow_modbus_host_ip: 192.168.178.20 # TODO update with the IP of your inverter. No default. Check your router.
sungrow_modbus_port: 502 # TODO update with the Modbus port of your inverter. Default is '502'
sungrow_modbus_slave: 100 #TODO update with the slave address of your inverter. Default is '1'
#second inverter
sungrow2_modbus_host_ip: 192.168.178.21 # TODO update with the IP of your inverter. No default. Check your router.
sungrow2_modbus_port: 502 # TODO update with the Modbus port of your inverter. Default is '502'
sungrow2_modbus_slave: 100 #TODO update with the slave address of your inverter. Default is '1'

Copy modbus_sungrow.yaml and rename it to "modbus_sungrow2.yaml" and adapt sungrow2.yaml:

Hope that helps :)

bergh-io commented 1 year ago

Thanks! I did try that quickly but did not got it to work, but I'm sure its because I did not rename the sensors etc unique names, I'm guessing you mean unique instead of identical in you last section? But I'll give it another go :)

Edit: I have got it to work now. And I also discovered that you need to add the numbers from both inverters together to get accurate results for e.g. Load Power. I have been able to create my own sensors where i add the values from bot inverters together but I'm getting odd numbers that dosen't add upp with iSolarCloud så thes still some investigations to do.

mkaiser commented 1 year ago

cool!

Would you share your changes for other users?

bergh-io commented 1 year ago

Yes, I will but right now I’m getting completely different numbers from modbus and iSolarCloud. so I’m going to hold of until I get it to work correctly. But it shouldn’t be the code for this though. I do think that modbus is wrong but I can’t figure out why so I have asked Sungrow for help. It probably has something to do with the communication between the inverters or that it is different modbus address when you have two but I’m not sure why that would be.

Matze5593 commented 1 year ago

@mkaiser

hi, i have problems with the power mppt 1/2. I don't understand how the code works and my mistake lies. I just don't get any values ​​for the power. Could you please help me

`

reesaroo74 commented 9 months ago

FYI: https://github.com/reesaroo74/Sungrow-SHx-Inverter-Modbus-Home-Assistant

I've managed to get my SH10RT and SH10RS (independent systems) up an running. Few wrinkles to work out with the installer because they've clamped the wrong lines in the main board for one of my systems.

I'm pretty new to yaml and only found out that the unique id in hass is generated from the name ... and the unique_id that Martin has wired up is only used to allow Ui interaction - https://community.home-assistant.io/t/template-sensor-unique-id-is-ignored/485206.

We have three phase, but for the system that is on the three phase line to the house, we had to install an RS on a single phase because the RT has an 18A per phase limit due to the EMS breaker (we'd might have kicked that with a spike if we had an oven on and the A/C kicked in).

I'm not sure if anyone has an SH10RS out there, but I had to connect my RJ45 hard-wired LAN connection line into the end of the wifi-dongle. There are two RJ45 ports (under a large cover with the EMS connector - so not on its own like in the RT). I tried connecting directly to those, but wasn't able to connect to the modbus. Not sure if they are for something else?

Gnarfoz commented 2 months ago

The user manual for the SH10RS describes the connectors within the COM2 terminal in section 6.2. Neither of the RJ45 ports are Ethernet ports, I'm afraid. So Modbus TCP directly to the inverter (like on the SH10RT) is not available. There's a RS485 connection (A1/B1) but I think you're probably using that already (should be connected to your SH10RT). There's also the connector for the energy meter (A2/B2). I'm not sure if that uses Modbus.

If you're desperate, you could check if it's possible to loop in some kind of Modbus RTU serial converter between the inverter and the WiNet-S dongle. But be aware, since the dongle is a Modbus master, and there can only be one Modbus master active at a time, you'd have to be very careful that the converter never sends anything when the dongle does. Maybe passively reading everything would be good enough. Either way, that's probably a lot of effort.