Closed davidgiga1993 closed 1 year ago
Some further analysis:
The charger reports 16A as max current, which is correct given that the charger limit is set to 16A for this test. The eebus code updates the max current to 16A. I would open a discussion here that the max current of the charger should not be able to override the max current of the loadpoint if LP.maxCurrent < charger.maxCurrent
. If you agree with this I can create an MR for that.
It's still unclear to me where the 32A came from, either the charger reported wrong values or something else in EVCC sets this to 32A.
Update 2: Disabling the eebus maxCurrent update by setting a maxCurrent for the vehicle seems to resolve the issue. Thus there are 2 points:
@davidgiga1993 thanks for getting in contact! Always nice to hear from you.
The logic I mentioned above should be revisited.
Works as (currently) designed. We've already noticed that this has its drawbacks. The EEBus charger overrides the currents. We will change this with https://github.com/evcc-io/evcc/pull/10335. See precedent rules there.
The PMCC seems to report wrong max current values from time to time.
/cc @DerAndereAndi
Thanks @andig! One question: The new logic has the min/maxcurrent priority vehicle, charger, lp. From a pure abstract perspective I would see the LP value as more important than the charger because the loadpoint in my mind includes the electrical installation. Or is the idea that the values from the charger are always seen as "more correct"?
Would it make sense to always use the min value of all the 3?
because the loadpoint in my mind includes the electrical installation
Fully acknowledged. We treat the charger as logically controlled by evcc. We never override any of the "physical" layer limits in the charger. That is always afaik a separate "physical limits" settings.
But shouldn't then the loadpoint settings have higher priority than the one reported from the charger itself? Or is the charger seen as "source of truth" about the physical layer?
Not sure if you're referring to the current implementation or the PR? Point is: whatever we write to the charger, the chargers "this is the physical limit" setting will remain untouched and still be the upper boundary. That way safety is in hardware (or rather: in the charger's software), but not in evcc!
Not sure if you're referring to the current implementation or the PR? Point is: whatever we write to the charger, the chargers "this is the physical limit" setting will remain untouched and still be the upper boundary. That way safety is in hardware (or rather: in the charger's software), but not in evcc!
This PR. And no, the PMCC for example specific tells the user that the current limit is overwritten by the Powermanagement system (aka evcc). So if I specific 5A on the PMCC itself and evcc sends 20A it will charge with 20A. I would have also expected the charger to always use its own limit, but it explicitly doesn't, see
Evcc should set the „current“ but never (!) change the chargers min/max. Evcc will still send current within the min/max limits it is aware of. If these are outside charger limits, charger will clip/clamp them.
/cc @DerAndereAndi
Yes exactly I agree, but the PMCC doesn't use it's own limits if evcc sends a "charge current" value. Therefore in this case evcc is the source of truth for the global charge current limiter :-)
That's why my idea above was that the LP limit should have higher priority than the values from the charger itself (as the PMCC also apparently reports the max value sometimes instead of the actual set limit). Or maybe it's just a bug in the PMCC communication. In that case the PR logic will be fine as long as the limits received from the PMCC are correct.
I agree, but the PMCC doesn't use it's own limits if evcc sends a "charge current" value.
@DerAndereAndi is this due to the way we're using EEbus or is that a defect in the PMCC implementation?
@davidgiga1993 lets please take one step back to better understand the context: how much current does your house installation allow and how is your PMCC connected? Reason for asking: physical connection (CEE16 vs CEE32) must match allowed physical limits.
lets please take one step back to better understand the context: how much current does your house installation allow and how is your PMCC connected? Reason for asking: physical connection (CEE16 vs CEE32) must match allowed physical limits.
In this instance the power connection was made using CEE16, the limit on the PMCC was set to 15A (16A in the test above for testing purposes).
Also it looks like this rejected change did remove updating the LP min/max with the values reported by the charger. Might be related
The PMCC is connected using CEE or Schuko plugs and has its limits set by the used cables automatically. Using EEBUS it assumes that overload protection is done dynamically with the connected HEMS, which evcc does not support as of now. This is usually the main feature of compatible EEBUS HEMS systems.
The algorithm is added in the EEBUS charger because more and more EEBUS chargers (including PMCC, Spelsberg, and more) also support ISO15118-2 connections over AC to the EV. And the min limits are lower than using PWM. And also an ISO connection can always falls back to PWM. And therefore the limits can always change and should not be hardcoded in any configuration. So the logic is not because of EEBUS, but because of corresponding EVSEs that also support ISO15118-2 and cars that do so (e.g. Porsche Taycan, Cayenne Hybrid, MEB based EVs, Mercedes, some BMW, and more).
If the EVSE doesn't have charging authorization turned on, the EV will charge immediately and evcc may take a few seconds to lower the charging limits due to the way EEBUS and ISO work. The time depends on how long the evcc interface is set up and when within that intervall the EV is plugged in. So even by setting up a loadpoint limit to lower than what the cable can provide, you might have the same effects! A change in logic and evcc implementation will not guarantee that it works for you.
Trying to set the max limit on the loadpoint imho is a workaround for your specific setup but falls short because of the described needs. The suggestion discussed in the ticket and the new PR would not solve that either as it defined as vehicles takes precedence over charger over loadpoint. To make this work in an optimal case the loadpoint should define outer limits (with minCurrent being 0!), the charger might only reduce these limits, and the vehicle further reducing these.
A workaround for now may be to let the charger implementation only overwrite the minCurrent limit, as mostly the maxCurrent does not change with the communication protocol.
Thanks for confirming that! It would also be enough imho to just use the smalles value of the 3 sources (vehicle, loadpoint, charger) and use that for the maxCurrent value. Should be easy enough to do
In this instance the power connection was made using CEE16, the limit on the PMCC was set to 15A (16A in the test above for testing purposes).
Which means 16A ist the limit that physics allow. Evcc can never go above this limit since PMCC would enforce 16A. If it does not do that (whatever setting evcc supplies) then that is a bad PMCC bug.
Evcc will not respect the 15A, partly because it's not even aware of that.
In this instance the power connection was made using CEE16, the limit on the PMCC was set to 15A (16A in the test above for testing purposes).
Which means 16A ist the limit that physics allow. Evcc can never go above this limit since PMCC would enforce 16A. If it does not do that (whatever setting evcc supplies) then that is a bad PMCC bug.
Evcc will not respect the 15A, partly because it's not even aware of that.
No, the PMCC allowed 32A, causing the breaker to trip, because the PMCC reported 32A. Probably because it resets the reported limit when receiving a message from the HEMS.
Nevertheless I opened a PR which resolves the issue and is imho the only way to handle the merging of multiple limit definitions correct.
That is a bad issue in the PMCC imho, because it would allow software (HEMS) to override hardware (cable) safety limits. I would suggest to immediately raise this with Porsche. Evcc is not designed to ensure physical safety- that is a hardware task!
That is a bad issue in the PMCC imho, because it would allow software (HEMS) to override hardware (cable) safety limits. I would suggest to immediately raise this with Porsche. Evcc is not designed to ensure physical safety- that is a hardware task!
I will try, but in my experience with software issues on cars and their accessories things like these will take years to get acknowledges and even longer to get fixed.
But if evcc should not include a workaround/solution in the meantime I'll probably just run a fork with my patch until something gets fixed :-)
Absolutely! But this one is really gross. ❤️🩹
Probably because it resets the reported limit when receiving a message from the HEMS.
This is absolutely not what is happening guys!
if the PMCC is connected to a CEE32 plug, it allows 32A per phase. And thus this is reported to the HEMS.
If the HEMS sets a lower charging limit, then it does it for this charging session only. Any higher values than reported by the plug connection will be rejected.
The suggested PR does NOT change the behvaiour or "fix" anything. I already mentioned what is going on and what the options are.
The suggested PR does NOT change the behvaiour or "fix" anything. I already mentioned what is going on and what the options are.
Do you mean my PR or the other one? Because mine definitely fixes it :-) I'm using it right now and the max current used is 15A (as specified in the LP yml definition). Even when the vehicle is plugged in and evcc takes a bit to respond the pmcc first uses it's own limit setting (which is 15A) and then evcc sends 15A as max value due to the min clamping (evcc basically ignores the 32A maxCurrent reported by the pmcc). This can even be easily verified by unit testing the entire logic
Your PR. It breaks other behaviour.
Not sure I understand why because you mentioned
To make this work in an optimal case the loadpoint should define outer limits (with minCurrent being 0!), the charger might only reduce these limits, and the vehicle further reducing these.
Which is basically what's happening in the end since the minimum value for the "maxCurrent" wins, or am I overlooking something here? Not trying to argue, just trying to understand
I provided a PR which would solve your issue and not break others.
In general: You would also get the same result without any code changes by setting the max current of the connected vehicle to your desired max. Update: If the identification happens before the breaker reacts.
if the PMCC is connected to a CEE32 plug, it allows 32A per phase. And thus this is reported to the HEMS.
@DerAndereAndi @davidgiga1993 said its connected via CEE16
No, the only reference I find is:
In this instance the power connection was made using CEE16, the limit on the PMCC was set to 15A (16A in the test above for testing purposes).
The limit in the PMCC is ONLY used, if no HEMS is connected. As it is stated in the screenshot mentioned in https://github.com/evcc-io/evcc/issues/10456#issuecomment-1775844020
I do not see a reference anywhere in here where it is stated that using a CEE16 cable a 32A limit is reported.
Update: I can see that following the discussion from the beginning where your understanding is coming from. For me it is still not clear what the actual physical setup looks like.
Maybe it would help to get a clarification of the setup and what actually happens :)
The screenshot shows a reported max of 32A. So the charger must think it is connected to a 32A cable.
To clarify: The pmcc cable is 32A, the wall plug CEE16. So from a pmcc side it detects a 32A cable. Thus the realization when the manual limit behavior didn't work as expected. Nevertheless, even with a CEE32 I wouldn't want to use the full 32A for charging. And yes the 16A pmcc cable would probably be better but it's not on stock and I still need to charge somehow until it gets shipped. But then again, I would like evcc to honor my settings, so #10478 should solve that.
@davidgiga1993 So this all is expected behaviour from the PMCC side.
The pmcc cable is 32A, the wall plug CEE16. So from a pmcc side it detects a 32A cable.
That is a physical security issue. Your setup cannot guarantee that the hardware can maintain the physical limits. The PMCC current limit is only a fallback limit for when a HEMS is not configured.
Describe the bug
EVCC resets / overrides the maxCurrent defined in the yml file as soon as a vehicle has been detected.
This causes a lot of issues as it also overrides the maximum current configured on the charger (PMCC) causing the breaker to trip on overload.
Steps to reproduce
Configuration details
Log details
What type of operating system are you running?
Docker container
Version
0.121.0 - 0.121.2
Additional infos