-
Notifications
You must be signed in to change notification settings - Fork 92
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support for SH10RS #184
Comments
Getting mine installed in two weeks so keen to see how this goes!! |
The integration is surprisingly easy. the code modbus_sungrow.yaml holds 90% of the stuff youread the inverter modbus register manual then add a line in the yaml file to cover what you want For example, in this code -Voltage A quick google shows these following registers at another github ModBusRegister(5011, "mppt_1_voltage", "U16", 0.1, VOLTAGE), |
Doesn't seem to be as straight forward as this. For some reason my inverter is returning illegal register codes for the MPPT 3 and 4 registers you've listed, not sure if another firmware update is required or not
|
ok. I'd have a good google about then as the registers seem to change a little depending on the inverter.....
|
Yes commenting out the 4 sensors relating to backup power seems to have made a big difference. I am still getting some modbus errors in my logs so there are obviously still some sensors that are not supported but I haven't been able to find them yet. My inverter got a firmware update overnight but it doesn't seem to have made a difference as yet. I'm guessing it is the WINet module which needs the firmware update to resolve some of these issues now but it doesn't have one yet. |
Maybe try downloading a modbus scanner and start sniffing registers? |
This is what I'm doing. So far I'm finding what is in the doc doesn't match how the inverter is behaving. Not sure if I can ask Sungrow for help here or if they will tell me to go away Also, my first update to recognise the inverters instead of displaying unknown device code just got merged in #205 |
It won't hurt asking some sungrow guys to send you an updated modbus register description - they are kind of secretive with these information, so I don't have a recent version, too... |
Sorry I found a more recent version and downloaded it but need to find the link for you |
Found it, attached here and the original link I found it from was https://www.photovoltaikforum.com/thread/166134-data-read-from-sungrow-inverters-modbus/? postID=3452929#post3452929 |
For anyone else with this model inverter I've found the cause of the remainder of the modbus errors I was getting. In the latest doc (above) there are a bunch of registers that are listed as not supported when using Ethernet via the WINET-S which is unfortunately the only option we have. So I've now had to comment out
I've also had to change the battery capacity sensor to an input sensor on register 13038 |
Hey Team, EDIT: realised the only reason i had to change the hub was because i stupidly changed the name at the top of the file haha! |
I realized the delayed charging using sg_battery_charging_start_power and sg_battery_max_charge_power. The first one is for efficiency always set to 200 W. For me it makes no sense to let the inverter start charging below 200W (arbitrarily defined by me). If I would like to delay charging I set sg_battery_max_charge_power to 100 W. And when charging should start at noon I set it back to the power I like to charge with. |
@dylan09, Do you have a SH10RS that you were able to get to follow the max battery charge power setting? I have tried setting mine as low as 100W and it just ignores the setting and sends everything to the battery. I have a case with Sungrow about this but for now I am using the same approach as @frankyman88 and setting the EMS mode to forced early in the morning and then setting it back to self consumption when I want to start charging the battery |
Sorry. I am on the wrong thread. Missed that you have SH10RS. |
How did you get on with things like Grid Frequency and Battery Discharging Start Power? I'll have a crack at your fix for the battery capacity sometime this week. Thanks for the tip! I'm also having trouble with my Daily's. |
The HA automation is triggered when you change max battery charge? There should be a message in the log file. Did you check if you see the new value in iSolarCloud? |
I found some other comments on here for another issue that the Grid frequency is out by a factor of 10 when using the WInet dongle which is our only option so I had to change the scale for that sensor Battery charge/discharge start power are not anywhere I can see in the latest modbus docs so I have not done anything with those yet. I've checked the registers and they're not valid on my inverter so I have no idea how to get that value
In terms of the daily import/export figures I mainly got HA to calculate those so hadn't noticed the registers are returning 0. I've just checked now and the registers are correct according to the doc but both are zero on mine which is not correct so I have the same behaviour as you. I'll add these to my chat with Sungrow |
Has anyone been able to get total DC power working? @reesaroo74 I have put the code below for working battery capacity and grid frequency entities :) Grid frequency: |
Bit of an update on charging speed, I was out by a factor of 10 (10.6kW equates to value 1060). |
well I’m glad to see you’ve got the same result as me but at the same time was hoping it would work and I had missed something. Would be good if you could also raise it with Sungrow so they know there’s a few of us trying to get it working |
Submitted a request for more modbus info or another way to control battery charge time to utilise excess DC power which would be wasted. I also asked them how long it will before they partner with Ergon Energy here in QLD to provide dynamic export support (seems to be exactly the same as South Australia which is already active!) |
Has anyone managed to get a copy of the Modbus info for the SH10RS? |
The latest I have is above #184 (comment) Is there something specific you're after? My attempts to get anything further out of Sungrow still haven't gotten anywhere |
@ABredhauer I was fiddling today with the charging rates again. When the EMS is in self consumption mode you can't control anything, but if you set forced mode and forced charge setting, register 13052 (Charge/discharge I also managed to get Inverter state working. As described in the PDF linked above, "system state" has been replaced by running state at register 13000. So need to edit that section:
Also I updated the full list of running states based on the PDF too:
|
I put my graduated charging speed settings (changes based on time and whether or not it is sunny) into a yaml here. I am on an Ergon time of use tariff (12C solar soaker) which makes power cheap between 9-4pm, so I have it set to force charge max speed from 2-4pm to top up from grid if needed. |
Do you by chance know the behaviour of the inverter in the following two scenarios when using that approach?
My current approach is to set the Battery Max SOC value to 50% (as low at it goes), and then ramp it up to 100% around midday. Definitely not an ideal approach, but it doesn't appear to cause any issues with backup operation when cutting off mains or cutting off the solar panels. It would definitely be nicer to be able to put a limit on the charge rate. |
Thanks @frankyman88 this looks great. My only concern with this approach is the possibility of drawing from the grid to charge the battery - sounds like its not really an issue for you though. I have been thinking about an alternative using the Max SOC setting to gradually ramp up production during the day but the weather here hasn't been great so I haven't had a chance to test it yet
Is this official from Sungrow or what you have noticed? I was wondering if this was the case but was hoping it wasn't. Sungrow support haven't been super helpful on why the max charging is being ignored but from their responses they seem to expect it to be honoured by the inverter so I'm hopeful of a fix coming eventually @jbekkema I haven't tested your scenarios but I suspect you would need to set the inverter back to self consumption for it to draw from the battery. The way I understand it is that in the forced modes the battery will only do what you tell it to. That said I've seen twice now that when in forced discharge mode my inverter will sometimes send some power to the battery |
I just simulated a blackout by switching off my grid supply, while my house load was higher than total DC power. The inverter state changed from "Forced Charge" to "Off Grid" instantly, and started discharging the battery to make up the difference in power. No devices in my house experienced an impact, and my UPS didn't trigger etc. So that is a relief!
I haven't been able to test this conclusively, but I from looking at my data it would choose to pull from grid instead of battery if you have mode set to "Forced Charge" or "Stop"
Yeah that's fair enough, I'm just trying to restrict the rate enough to get my battery full without causing too much drop off in Exports. I have a few plant sensors which report illuminance, might give that a go with my automation instead of the weather integration -> stop altogether if <1000lux, charge at 1000w if between 1000-2000lux, 3000w between 2000-3000lux and no restriction above 4000lux.
Just what I've noticed, I agree I hope that they fix it too as their support seemed to imply that those max charging power registers should work shrug |
Following up on my own post, I did some scanning via the web socket, and the following registers (all UInt16, 0.1 Scale) appear to hold the correct MPPT values: MPPT 1 Voltage Register: 5333 However frustrating they only appear accessible via the web socket, not via Ethernet (I have not tested via Wi-Fi). |
That's good to know, thanks for testing!
Ah, damn. You could test it by flipping the DC isolator on the left to Off to cut the power from your panels, but it sounds like if you've seen it drawing from the grid instead of the battery at times of low solar output (or high house usage) then it's likely unnecessary. Hopefully Sungrow can fix it in a future firmware update so the standard charge/discharge values are not ignored, as that would be the ideal solution. |
My work around is to use gosungrow for getting ant missing info. |
I emailed Sungrow Aust today requesting a Modbus communication document. They replied with the version 1.0.25. I explained it was old and didnt work for SH10RS. He said he will request an updated version and pass it on. Hopefully he gets somewhere and it is actually suited to SH10RS..... |
I just got my SH10RS and yeah the inconsistent sensors are quite annoying. Does this affect the inverter as a whole? Or is it purely from the WiNet-S2? |
has anyone got Daily Imported Energy working? I have figures for Total Imported Energy but nothing showing for daily. Doesn't even show when logging in via inverters ip (yet total does). I assume they don't provide a daily and just use a calculation to show it on iSolarCloud (total - yesterdays total reading) |
You can easily define a helper in home assistant (utility meter) to calculate your daily imported energy (or any other interval or sensor). (see https://www.home-assistant.io/integrations/utility_meter/ for documentation) |
After extensive poking around with a range of options, I've determined the easiest way to get fast reliable data from my SH10RS is via the WiNet S2 websocket API. I've mocked up some Typescript code to talk to the websocket API and extract all available information and feed it to Home Assistant with all the correct types and units every 10 seconds. With my SH10RS and SBR192 I've got both devices showing separately in Home Assistant with 83 sensors showing up between them. Since it's a local API there's no cloud dependency and no issues with hammering it as much as you want (10 seconds seems to be a good rate), and it doesn't interfere with any normal operations either. If there's interest I could wrap this up in to a HA addon. It's rather simple, only needing the WINet S2 IP/hostname and a MQTT connection string. The local API doesn't need any complicated authentication. |
Does it allow for control of PV to Battery charge rate (power)? i.e. set battery to only charge at a rate of 2000W from PV. |
Yes please. If you've already reliably obtained the metrics, please share as quite a few of us here are still waiting for it. |
Ok I've published a new addon which gets all the data from the Winet S2 dongle over it's internal websocket API. https://github.com/NickStallman/home-assistant-repo/tree/main/winet-extractor Please treat this as alpha quality, however I've been running it for ~3 weeks now and I'm getting really good live data and it's quite stable. Any feedback is appreciated. |
I'm a little confused over the status of RS inverters and access. I've got a new SH8.RS inverter with isolarcloud and it has no external lan port. So it fails the picture at the top of this GitHub. But it does listen on port 502 and I appear to be able to query slave 1 registers. Also when logging in to the inverter web interface I think it has modbus forwarding configuration tabs. So is this enough to get the integrations that would allow me to write some intelligent charge/discharging stuff? Or am I missing something -- Should I use your Winet S2 integration tool ? thanks! |
@jbardu so to pull info from your inverter with frequent 10 second updates, it's best to use my addon. Then take the mkaiser YAML file, and delete or comment out all the modbus sensors that are duplicates of what my addon provides. Then you can use the mkaiser settings and automations for control in your own automations. :) After looking in to it further, my addon possibly wont get write support as it seems the Websockets API I'm using doesn't allow for changing values. For that there's a HTTP API and Modbus, and Modbus allows for a few extra settings which the dongle's UI doesn't show at all so it's probably best. |
thanks, any links to anything on the HTTP API ? you mean a REST interface or something less documented. |
It's an entirely undocumented Websocket API which is used when you navigate to the Winet's IP address directly. It's rather efficient and had all the values I needed so I reverse engineered it to use that interface to get the data in to Home Assistant. |
thanks, I'm still totally lost as to how programmatically people manage a battery dynamically. Or do they. With any sungrow inverters. Is it writing to certain modbus registers? |
2024-05-24 03:36:46 error: MQTT error: ErrorWithReasonCode: Connection refused: Not authorized any help please |
mkaiser provides some automations/buttons/etc.. which you can then trigger with your own automations.
For my addon it's best you open an issue there rather than clutter mkaiser's issues. |
I have already installed MQTT Broker and work with Zigbee2MQTT and i have 7 devices work without issue I write something like this |
Need to create a user and passwd in mqtt. |
For those of us sticking with this integration I've found that the backup power values are now available following one of the recent firmware updates from Sungrow. Still to change for the MPPT3 and 4 readings though |
@ABredhauer I have just been testing with the new firmware too (updated inverter, communications dongle and battery this week). The max battery charging and discharging power registers (33047 and 33048) now work, and control charging speed even while on self consumption mode!! So I have switched all my automations from using forced charge speed to using the max battery charge speed instead :) will update with my experiences.... also with dynamic connection when it finally gets running (what a run-around, I'll update on the whirlpool about it more when it's all working). |
@NickStallman I am keen to try your Websocket API interface for pulling data from the inverter instead of Modbus, but I run home assistant in a docker container and therefore can't install addons. Any possibility of spinning up a separate docker container, proxmox LXC, HACS integration or other way of accessing this? Appreciate your efforts!! |
SH10RS inverter still? |
Sorry I completely forgot to mention those now work as well which was probably the bigger news. I'm still manually setting them while I work out how I want to automate them but they are working very well. Coming into winter has dropped my production but I still occasionally peak over the 10kw mark and can now use all my production
Yes those comments were for the SH10RS |
Yep, just tested after firmware update. Awesome. Going to make things a lot better over summer! |
I've just had a SH10RS and battery installed and am finding there's a number of quirks that look like this particular (very new) inverter isn't fully supported by the current integrtion.
First of which is the inverter has 4MPTTs and I can only see 2 reported by the integration
I'm also seeing some strange values reported such as
I'm also getting a large number of Index out of range and Unable to decode request errors in my logs
I realise there's not many of these inverters around yet so happy to help work through adding the support but also trying to get my head around how this integration works at the same time.
I'm also running into issues where the LAN connection from the inverter simply drops off my network randomly. So far my only solution is to unplug the dongle or shutdown and restart the inverter
The text was updated successfully, but these errors were encountered: