-
-
Notifications
You must be signed in to change notification settings - Fork 171
Correct Mode 1 Export Limit Bound and Loop Exit #1719
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
base: main
Are you sure you want to change the base?
Conversation
The bound check was incorrectly adding on house load. This means the more the house uses, the less the inverter was allowed to output to the home. This is backwards. Instead the more the house uses, the more the inverter should be allowed to output power so that it can continue to cover the house load, and still export to the grid up to the grid export limit.
|
Let me check. Might have missed testing this case with the rewrite. I will test tonight when I get back from my trip. |
| elif ap_target < 0: | ||
| # Exporting (negative = export). | ||
| # Inverter output cannot be more than the export limit plus any used by the house load | ||
| export_bound = -(export_limit + house_load) |
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.
Yes this looks correct. I must have missed testing exporting. I will validate this later today.
The mode 1 loop was calling autorepeat_stop() on the mode 8 trigger. This meant that the mode 1 run loop never actually stopped running. If trying to then use mode 8, the still running mode 1 loop would cancel the newly started mode 8 loop.
|
|
||
| if power_control == "Disabled": | ||
| autorepeat_stop(datadict, "powercontrolmode8_trigger") | ||
| autorepeat_stop(datadict, "remotecontrol_trigger") |
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.
Good catch.
|
Confirmed. Thank you! My apologies for missing those two earlier. |
The bound check was incorrectly adding on house load. This means the more the house uses, the less the inverter was allowed to output to the home. This is backwards.
Instead the more the house uses, the more the inverter should be allowed to output power so that it can continue to cover the house load, and still export to the grid up to the grid export limit.
Furthermore,, the mode 1 exit clause changes meant mode 1 never actually stopped - rather it kept trying to stop the mode 8 loop.
A couple of quick tests with the Self-use mode 1 option
With the current
mainbranch after feat: Solax Add parallel mode support with remote control fixes and comprehensive documentation #1694 was applied:Notice how the target is the 3062W house load, but because of the bound check, it's incorrectly set the target to only 618W. So grid import is covering the use rather than the battery. This is incorrect.
With the changes in this PR:
Now the target is 3125W house load, while the bound is now set to 6805W (The 3680W export limit plus the 3125W house load). The resulting target is the unchanged 3125W house load required from the battery. The battery now covers the house as it should rather than import
Notice how the change now allows the battery to discharge to cover the house load. While before it was having to import from the grid because the value was being clamped incorrectly.