-
Notifications
You must be signed in to change notification settings - Fork 56
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
Enable / Disable power limiter via MQTT #172
Enable / Disable power limiter via MQTT #172
Conversation
Hello @MalteSchm |
Thanks this is good input. I'll try to do this. EDIT: I tried rebase --interactive but that creates even more commits |
…chm/OpenDTU-OnBattery into mqtt_power_limiter_enable
What is the state of this PR? I see some pending comments. |
Hi @helgeerbe this code has been working in my setup for some time now. The comment is about the # of commits. I can submit a PR with fewer commits if that is what it takes to integrate this. I would probably close this PR then and create a new PR and start all over once more.. |
Hi @MalteSchm there is a pending comment from me, regarding the target power consumption. From my point of view, this shouldn't be uses when solar passthrough is enabled. |
Hi @helgeerbe I feel embarrassed but I have to ask: How do I find this comment? I've kept looking for the last 10 minutes or so using the "files changed" link above but I'm not able to find it. |
Here is the link to the review comment: https://github.com/helgeerbe/OpenDTU-OnBattery/pull/172/files/9521deea2520e0a36bad35cbbea1601860860e96 |
Thanks @helgeerbe but it is odd. I don't see your review comment. I guess it is because of this feature: https://github.com/orgs/community/discussions/23138 Anyway... Your screenshot was good enough to understand the problem. I addressed this in commit 322f532 I did stumble across another case that was problematic (use of lower inverter limit when on old / outdated data). This would discharge the battery even if if use of solarPowerOnly was requested. This can happen for prolonged periods of time if the power meter input fails for some reason. I fixed this too I did re-order few calculations to simplify things further and also touched the solar power calculation code. I hope these changes make sense to you A quick check with my setup was successful but I would wait for tonight to see if this works as expected |
@helgeerbe Status is: Right now I don't plan further changes to this branch (unless I get feedback / bug reports) |
@MalteSchm I merged your PR but I'm not quite happy with it. |
This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new discussion or issue for related concerns. |
This adds basic MQTT control of the power limiter.
The change is larger as I reworked the state machine code and the calc/set functions (there is a separate PR pending in #164)
Rationale for refactoring the existing code was:
Based on my understanding all the old functionality should be enabled, but please let me know if I missed to cover a case.
My original plan was to provide these changes piece wise so that the amount of changes is not overwhelming but I'm currently not clear if an approach with
is actually preferred.