-
Notifications
You must be signed in to change notification settings - Fork 70
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
Add support for multiple inverters #47
base: master
Are you sure you want to change the base?
Add support for multiple inverters #47
Conversation
@WillCodeForCats please could you test this? @binsentsu any blockers to getting this upstream? |
No blockers for me. Can't test it myself though. @WillCodeForCats Have you got feedback on this one? |
The pace on changes is too fast for me to keep up with everything else I've got going on in life, and I don't have any batteries so I can't really test that aspect. But I see the control part is not adapted for multiple inverters, so probably having only some of the code multi-inverter aware other parts single-only is probably not a good idea. I would just say compare it to my fork since that's what I am using and confirmed working for what I need (which is multiple inverters, no batteries, no control). Ideally multiple inverter support should have been added before significantly expanding it to include unit control, rather than now trying to work backwards. I see in the docs that multiple units and multiple battery is possible, so I'd say anything from here on out should include multiple inverter awareness or stick to single unit systems, otherwise I think this runs the risk of a problem if multiple units are set to conflicting or mismatching control modes. I'm not really willing to try setting conflicting control modes on my hardware outside of a lab environment where possible damage to the hardware is unknown. |
6999a82
to
d66ba29
Compare
@mpredfearn Is my understanding correct?: As all entities are now prefixed with the inverter number. This PR introduces a breaking change as all entities for people with just one inverter are now renamed with the prefix. Just a thought: Would it be backwards compatible if we would omit the prefix in case numberOfInverters = 1 ? |
Correct, in it's current form it is a breaking change since all sensors become prefixed by the inverter number. I could eliminate that as you suggest, by only prefixing the sensor name if the configured number of inverters is > 1, which makes sense, but is a bit inconsistent with how meters are named, since they are always prefixed by meter number even if only a single meter is configured. What would you prefer? |
d66ba29
to
4a48e1a
Compare
@binsentsu Updated the PR such that inverter sensor names are only prefixed with an inverter number if multiple inverters are configured. If only a single inverter is configured then the sensor names are unchanged from previous versions. |
Inverters must (for now) be numbered 1,2,3 etc on RS485-1 bus, with the primary inverter being ID1. If multiple inverters are configured, inverter sensor names are prefixed by the inverter number.
4a48e1a
to
b329855
Compare
@mpredfearn I would love to test the support for multiple inverters, but I'm not really sure I'm understanding the current status. Which version should I test? Or should I test your fork? |
@rzulian your assistance in testing this PR would be hugely appreciated! My system has only a single inverter so I cannot test it unfortunately :-/ nevertheless I think that this is an important feature to get merged, so if you could test it that would be awesome 👍 The current status is, with this MR branch, you should get sensors created for each inverter. With a single inverter system, the names of the sensors are just |
@mpredfearn I'm happy to help on this. I will submit a PR to allow non consecutive inverters IDs. My primary inverter, connected to the battery and the meter, has the ID 1, the other connected to the panels has ID 3. The meter has ID 2. I've managed to let it work in the meantime. I'm trying to clarify the different sensors that I'm reading from the different threads, here and in the community. This is my current understanding using your sensors and running this branch, using also the solaredge app to double check:
Those are correct
I've noriced that when the battery is charging (i.e power_battery_charging is >0), sensor.solaredge_i1_ac_power is more or less equal to power_battery_charging. Please note that I'm not charging the battery from the grid, but it should probably be
I don't think we should subtract
Why are you subtracting power_battery_discharging? |
Hi @rzulian As you have 2 inverters, one for the panels and one for the battery, it sounds like your sensor set up may be simpler, because inverter 1's AC power matches up to what the battery is doing and inverter 2 is what the panels are doing. Please feel free to edit the wiki page and add your sensors set up, but the sensors I've listed are correct for my set up with a single inverter, single battery and single meter. This one:
I am calculating the power used by the house loads which is coming from the grid. So I take the power coming from the grid, measured by the meter, and subtract what is being directed to the battery. That leaves the flow to house loads.
Because I am calculating the power coming from the panels. Since on my single inverter set up , "inverter AC power" includes both power coming from panels and battery, I subtract the flows to and from the battery from the "inverter AC power" to get (an approximation of) the DC power from the panels. |
@rzulian If you have to make further changes on top of my commit to add the basic multiple inverters, please do and we can either get this merged first followed by yours, or I can close this and merge your PR including the support for non consecutive IDs. |
@mpredfearn I've submitted a PR on your fork. |
Has this been abandoned? I have 2 inverters, each with a battery and 2 strings of PV. My modbus ids are also non-consecutive, in fact, I believe that slave inverters cannot be numbered 1 or 2, and so have to start at 3 (from issues we had during setup and a call to solaredge). Interested in testing this, or getting it working if it's been abandoned. |
If you have multiple inverters, you should use the integration over at https://github.com/WillCodeForCats/solaredge-modbus-multi |
Thank you!!!! |
This is basically a slight rework of #12, rebased on current master.
Inverters must (for now) be numbered 1,2,3 etc on RS485-1 bus, with the
primary inverter being ID1.
All inverter sensor names are now prefixed by the inverter number.