-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
SolarEdge Hybrid: add min/max soc maxcharge/discharge power #25929
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey there - I've reviewed your changes - here's some feedback:
- The
maxdischargepowerparameter is marked asrequired: truebut also given a default value; consider dropping either therequiredflag or the default to avoid confusion about how it should be configured. - For the new
minsocandmaxsocparameters, consider adding explicit defaults and/or validation (e.g., 0–100%) to guard against misconfiguration and make their expected range clearer.
Prompt for AI Agents
Please address the comments from this code review:
## Overall Comments
- The `maxdischargepower` parameter is marked as `required: true` but also given a default value; consider dropping either the `required` flag or the default to avoid confusion about how it should be configured.
- For the new `minsoc` and `maxsoc` parameters, consider adding explicit defaults and/or validation (e.g., 0–100%) to guard against misconfiguration and make their expected range clearer.Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
|
Can the required flag be safely removed if a default value is given? Asking for a friend |
|
Seems https://github.com/evcc-io/evcc/pull/25929/files#diff-1408ce27b723146474f25d2a6bb01f07fd13a5fee41c1f2152bdf77a434426f7R212 should use charge power, too? |
Think so, but why? I‘d rather remove the arbitrary default;) |
Don't know. There seems to be a register for setting it ( 0xE00E ). But since it is not used in the current template I'd omit it until someone actually has a usecase for it.
So, according to this 5000W seems to be max Charge / Discharge Limit what 'most' SolarEdge hybrid inverters seem to be capable of. |
|
Lets not invent fake values. If we don‘t need a default we shouldn‘t have one. |
|
Fine with me. |
|
Sorry, I was only refering to the unused chargepower default! The other one is unfortunate but would indeed be breaking which is always a bad idea. |
|
Ah ok :) |
also removed the required flags for maxchargepower / maxdischargepower since no other template uses it for these parameters
|
Does this really work? I've set the |
|
You have to set it to the same value which is set in your inverter configuration. |
|
Because that is not the intent behind this change. It makes the parameters configurable so that the optimizer works with the actual inverter settings and not the default ones in evcc. |
|
Oh 😳 |
|
What I have found now is the "Storage Backup reserved", which can be set via modbus. It looks like it does what I was searching. |
Using templates, it can once we have #25908 |
|
Hi, |
|
Look at what the template does. All other parameters are just there so that the optimizer knows about the inverters settings and uses these for its calculations instead of its default values. |
Added minSoc, maxSoc, maxchargepower and maxdischargepower.
Replaced hardcoded discharge limit in battery control with maxdischargepower setting. Use hardcoded value as new default.