-
-
Notifications
You must be signed in to change notification settings - Fork 750
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
Daheimladen: Charging station is enabled only when in 'Charging' state #2858
Conversation
Signed-off-by: Utsav Anand <utsavanand2@gmail.com>
I think there is a complete misunderstanding about enable() and enabled-State. enabled is independent from car connection and charging state. enable() will control if a chargepoint is allowed to charge a car (true) or if it has to stay in or transition to a passive, non-charging state (false). |
@premultiply The "Charging" state is not an info we're getting from the connection of the car, but rather the state of the station. The implementation is for I have tested this fix and it has seemed to work with our station and with some of our users to get rid of errors when the connector is plugged into the car Also can you please explain how a charger can be re-enabled, correct me if I'm wrong but I guess re-enabling means a state in which the charge point can start charging again or a state in which the charge point is charging already? |
Enabled is the reading for chargers internal state of Enable(). So if the charger is set into Enable(true) state To make it even clearer: Enable(false) shall prevent the charger from any PWM-activity on CP line. So any car is not allowed to charge. This has absolutly nothing to do with any charging state itself. |
Okay understood @premultiply, so you're suggesting that the implementation of Enabled is incorrect in the first place. What would be the optimum implementation for daheimladen stations in this case then, I would really appreciate if you can provide some code suggestions here. |
As I do not know anything about the API your product provides I would suggest that you may have a look on implementations for other brands chargers. For example a quite popular way to disable a charger is to set the current limitation to 0, to enable it a value of more than 6 ampere must be set. |
For our existing implementation of the API, we can remotely start/stop the charging of a charger with the API. Instead of checking if the current limit is set to 0, we have a status endpoint which tells us if the charging can be started or stopped. I am wondering how is this implementation going to be any different than the current limitation. I'll also check out other examples as you suggested. |
An endpoint would be absolutly fine. |
Our API gives the state output as per the OCPP connector status which could be 'Available', 'Preparing', 'Charging', 'Finishing', and 'Faulted', out of the four states that the REST API would respond with, only when the station is in 'Preparing' state that the charger can start charging an EV, in other states it would refuse to start the charging. |
cc @andig What do you think? |
Hi @premultiply , I took a look into the PR which supports chargers which can communicate via OCPP. I see the Line 101 in c329402
|
@utsavanand2 I‘m not sure. The point is that enabled in evcc terms means that we allow the vehicle to charge, independent of if it actually does. Afaikt that is identical to starting a transaction in Ocpp. Insofar the current implementation is correct and this PR is not. What bugs we is what happens in evcc if a transaction was started that doesn‘t come from evcc, maybe user per app. That SHOULD show enabled and if evcc choses it should be possible to disable. I think this is what you‘ve implemented using the GetCurrentTransaction. imho the current implementation should work as it is. If not I do not yet understand the problem or ocpp good enough to match both. |
In other words: when evcc disabled and a user plugs in. The station MUST remain disabled. It must only start a transaction or go to charging state when it is being enabled. |
If you feel this PR does that we can just give it a try and see if it improves behaviour. |
ping @utsavanand2 how do you want to proceed? |
Hi @andig ! I'll be conducting a test once again with Stephan and I'll paste the logs here just to be very sure before we proceed forward. Is that okay with you? |
@andig Thank you so much for the detailed explanation on the issue above. I have a follow up to the explanation though, if I have to check that evcc is disabled, why do I have to implement the Enabled function? How do I check if evcc itself is disabled?
|
evcc tells you by calling |
@andig If I understand correctly what you mean is that if a user starts the charging from the app, then it should also get that state reflected in evcc, and if required it should be possible for evcc to disable it? If this is what you mean then yes this is what the current implementation provides. |
If the user starts charging from the App while evcc is in PV mode and has disabled charging then that's a problem. How should two competing algorithms decide which one wins? User MUST decide which algorithm/app he uses. You cannot expect both to harmonise. |
@andig Can you provide me with some test cases that we need to check, then I'll check all of those during our test run tomorrow and will work on this PR again if I can. |
There is however a possible approach. We can (and actually had) an interface that allowed the charger to control the loadpoint. If charger becomes aware of user using vendor app he could update the loadpoint by switching loadpoint's mode, maybe from pv to We could re-add this interface if you want to give it a try. |
Not really as I don't have a charger that has app control. |
Ahh okay, if you remember we do start all transactions from evcc with an idtag of "evcc", all other transactions started from the app or by other features do not use this idtag, this is one way we can tell if the charging was started by evcc or not. |
You would still need to map non-evcc sessions to evcc operations. Session startet ist probably Anyway, not much I can contribute here. If you'd like to try that interface I can re-add is as part of this PR. |
@andig If you would like we can close this PR for now, I conducted some tests with Stephan on the latest evcc release and everything seemed to work fine. If I get a better fix or I notice this problem pops up again, I'll reopen this PR. |
evcc-io#2858) Signed-off-by: Utsav Anand <utsavanand2@gmail.com>
Fixes: #2273
Signed-off-by: Utsav Anand utsavanand2@gmail.com
Description:
DaheimLaden charging station needs to return true for
Enabled
function only when the station is in "Charging" state.This will get rid of "charger out of sync" errors before starting the charging and after the charging is completed.