-
Notifications
You must be signed in to change notification settings - Fork 74
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
Unlock in states A/B instead of B/C #939
base: main
Are you sure you want to change the base?
Conversation
Signed-off-by: Yonatan Dankner <yda@qwello.eu>
@corneliusclaussen as this was your code, I would kindly request your input on if this makes sense to you or breaks anything. Thanks! |
I'm not familiar with this specific code, but I agree the connector shouldn't be unlock in energized state but CP state isn't a reliable state for this. In order to ensure safety you should check the state of the EVSE contactor. The whole point of force unlock is to help the EV owner to get the cable back (even the CP detector is broken or the EV is simplified according to IEC 61851 which doesn't have CP state B). |
@@ -505,7 +505,8 @@ void IECStateMachine::connector_force_unlock() { | |||
cp = cp_state; | |||
} | |||
|
|||
if (cp == RawCPState::B or cp == RawCPState::C) { | |||
// Unlocking in state C violates regulations and risks the user. |
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.
I can only speculate but the reasoning why its only force unlocked in B and C is because we already unlock (without the force) when we enter state A (see same file)
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.
I would think that in general force unlock should always unlock but before doing so open the contactors (and wait for state A or B)
I think there is a bit of confusion what the force_unlock command should do, we probably need to improve the documentation in the interface for this one. The use case is the following: If an EV driver calls the hotline because the cable does not unlock, the CSMS should be able to send an unlock command to unlock, no matter which state the EVSE is currently in. This also includes state C, as there may be a problem with the EV (or it is a simplified charging EV). After all, state C is issued from the vehicle and beyond our control. It should of course only do so if the relay is open, which is what we can control. Following this, the current implementation should:
If it does not behave like this, we should fix it, but I'm not aware of bugs here at the moment. You stated unlocking in state C violates safety standards and regulations. Can you be more specific about this? I have not found any violation with IEC61851-1. |
Signed-off-by: Yonatan Dankner <yda@qwello.eu>
Thank you for your quick responses. I understand the reasoning with unlocking in state C, but I would like to add state A as well - we have cases where the socket can be somehow locked in state A (if the lock didn't open properly previously), which makes it useful to force unlock it anyway. Is there a good reason not to force unlock in state A? I updated the branch accordingly. |
In our legacy charging stack unlock works regardless of the current CP or lock sensor state. The whole reason behind the OCPP unlock is that the mechanics / sensors behind plug locks are not 100% reliable. There are situations (e.g. very cold temperatures) were it seems that the cable has been disconnected, but it's still stuck. In this case it's last chance to get the cable back. |
@lategoodbye that sounds like another reason to add the unlock for state A as well :) |
I don't think your change actually does what you want. Did you test the code? It allows to set the force_unlock flag to true in state A. There are multiple issues here:
The current logic in check_connector_lock() ensures a signal_lock() or signal_unlock() is only send on lock state changes. That means forcing unlocking in A will NOT generate a new unlock attempt as this was already done when entering A. I would propose the following: Rework of the logic so that a force_unlock will send a new unlock attempt command to the interface even if it is already unlocked. Independent of the CP state, but doing it only if the relays are verfied to be open. This however has nothing to do with the changes proposed in this PR, so maybe we can close this one and open a new one with the behaviour that @lategoodbye described. |
Describe your changes
This change is necessary for us for two reasons:
Issue ticket number and link
Checklist before requesting a review