-
Notifications
You must be signed in to change notification settings - Fork 67
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
Added various options to AC charger settings #480
Conversation
…reshold to AcChargerConfig
I don't own a Huawei charger. Who can test this PR? |
@indie89 @Phantomias2006 @CaCu15 any volunteers? In case you don't want to clone the whole repo, I uploaded precompiled binaries here These build also include the new CAN bus latency fix from @MalteSchm (which is working incredibly well btw, nice work 👍) |
As I perform the whole control part over iobroker and use on battery mainly as a universal interface between hardware and mqtt, I am probably not much of a help. But honestly I haven't checked the "automatic power Control" section yet. Do I have to turn on the option in order to profit from your improvements or is it also possible to just have my iobroker control "overwritten"/limited by the "soc limits"? |
Thx, EU-GH for your work! It's a little complicated for me to test this as I don't have a relay connected to the ESP to switch the pre-charge pins of the AC charger currently. My charger keeps the fan spinning even if I disconnect the pre-charge pins. Additionally the charger has quite a high idle power consumption, thus I'm currently switching the charger on the AC side using a Shelly. Thus this test would require me to keep the charger switched on for the complete duration of the test. Despite that I'm going to do this test, but I've to run it on the next weekend (currently not enough time). For me it would be a valuable addition to have the option to configure REST calls or MQTT messages to a switch on the AC side of the charger (preferably REST instead of MQTT as I'm trying to eliminate all additional server processes required to run the solution) My thinking is: |
This function will automatically calculate the power supply's output parameters directly on the ESP, based on a power meter reading, I believe that this is the lowest latency option we currently have, also it's really simple to use. In my setup, a Node Red flow is sending the data. To disable the charger, I'll simply set the power meter value to 0. But no, if you don't use that function at all, there is no point in flashing my build. Thanks for your reply anyway!
I stumbled upon the same observations and to be honest, I never got the internal slot detection power switching mechanism to work. My solution is also an externally controlled Tasmota switch, which turns the AC power on if the solar yield exceeds 350W and off after 7pm (and the output power is 0/output temp is below 40°C). I don't see why this would do any harm to the unit, as long as you don't disconnect it under full load (or after a lot of heat had accumulated, which is unlikely to happen in this scenario, as the power output decreases gradually with the sun setting). Disconnecting the DC side, however, seems stressful (fan spinning like crazy, I suppose to dissipate as much heat as possible in preparation for an upcoming shutdown?) |
If you need a hint for convenient application of the slot detect relais, just let me know (a bit off-topic, sorry). If you speak German or want to use an online translator, you can also have a look at my project presentation in this forum. I most recently added an update, how I put the slot detect relais to good use (similar to your AC-disconnect): https://www.akkudoktor.net/forum/postid/156717/ |
OK, I will run this test starting today. For the test I can control the Shelly for the charger manually. . If the test is successful, I will implement a similar logic to switch the AC side of the charger (i.e. based on solar production & soc). Than I only need to keep my absorption logic outside of OpenDTU on Battery. I still like to have the possibility to run absorption phases in case the battery cells get out of balance. But that can be accomplished by disabling the OpenDTU logic temporarily and control the absorption by external logic. |
Running this version (used the binaries linked in the message #480 (comment) above ) since yesterday and first impression is very good.
Some "wishes" for improvement:
|
Der Branch läuft jetzt seit 3 Tagen ohne Probleme bei mir. Einschließlich Test der REST API zum Lesen und Schreiben der Huawei Konfiguration. Jetzt muss der Branch nur noch in ein Release gemerged werden. |
This conflicts with #500. I am happy to rebase onto your work in case helgeerbe merges your work first. If not, you will need to rebase onto #500. Also, some remarks:
|
One last comment concerning this PR: I noticed, that this causes some "flapping" between charging (via Huawei) and discharging (via inverter) when the power export is just a little bit higher than the configured minimum power to be used for charging. I configured a minimum power of 150W (which equals 3A current roughly). But at least at this low setting my Huawei does provide a little bit more current (4 - 4.5 A) which causes the overall power usage to be so high, that the DPL switches on the inverter and starts providing power. This in turn stops the Huawei from charging causing the power draw to drop again thus the inverter stops providing power and the loop to start again from the beginning. This loop stops as soon as power export is significantly higher (approx. 250W in my case) than the configured minimum charging power. Thus I propose to think of some kind of hysteresis to avoid flapping between the dynamic power control of the inverter and the charger when the charging power is near the minimum. |
@eu-gh can you check the remarks from @CaCu15 and @schlimmchen |
@CaCu15 Apart from that. The DPL is locked and should not start as long as the PSU is on and vice versa. |
More detailed view or a time frame with very fast switches between inverter and charger. Caused by a microwave oven running while the charger was charging as well. NOt sure, whether this is really healthy? |
@eu-gh what is the state of this PR? Can you rebase it and solve the merge conflicts. |
@MalteSchm Can you help us and decide whether or not this is a useful improvement? Can people other than @eu-gh use these changes? Would you like to see them merged? I would be willing to rebase this, solve the conflicts as well as I can, but I would like to be sure that it is worth the efort. Otherwise, due to @eu-gh's silence, I would close this. |
@schlimmchen : Even this question was not directed to me I would like to comment: I think, that the most important change introduced with this change is no longer necessary, as Malte create #767. PR 767 already contains the logic to adapt the charge current to the limit communicated by the battery, thus it renders the setting "Reduced Output Power" and "Reduced output power at SoC" useless, at least for Pylontech batteries and any other battery types able to communicate a charge current limitation. The only setting remaining than is the "Stop charging at SoC" setting, but this kind of conflicts with the current logic to stop the charging. You can either stop charging:
If either one (or both) of this two criteria is met, then charging needs to stop. But than the questions is: What's the added value of the SoC based control? You can determine the target SoC be means of the charge voltage already. |
If I take a step back I have implemented exactly the same functionality: Stop the AC charger when the battery reaches a SoC threshold. I use a RPI currently to turn the charger off when SoC goes above a certain value. So I realized this usecase in a different way and one could argue that this is functionality that could also be integrated in OpenDTU. Regarding this power reduction I did not understand this back then when this PR was first introduced. The explanation from CaCu15 makes sense to me however and I'd also consider this as being addressed. So I would support parts of the PR as being relevant and their inclusion into the project. The thing to check with this PR is how the full solar pass-through of the power limiter and the SoC limitation of the AC charger would interact. I had to handle locking the PL while the AC charger was active on the RPI so this may also be something to take into account. I just skimmed through the changes and did not spot anything so maybe this is something to look into. |
Thanks both of you for your input! So..... We drop |
Yes I guess so. But we should take a look at the dependency with the full solar passthrough |
I forced-pushed to the wrong remote a couple of minutes ago, which I think I reverted by pushing the previous commit hash. Sorry about that. @MalteSchm @CaCu15 Let's continue in #848. |
Superseded by #848. |
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. |
In addition to my (now obsolete) PR #449, I made the following changes to the AC charger settings page: