-
Notifications
You must be signed in to change notification settings - Fork 80
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
Doc/powermeter error handling #834
Open
florinmihut
wants to merge
11
commits into
main
Choose a base branch
from
doc/powermeter_error_handling
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+98
−0
Open
Changes from all commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
f628deb
If LEM is returning from Communication Error, try to get its state id…
florinmihut f5abb54
Fix formatting
florinmihut 65fa38e
Draft error handling
florinmihut 689836c
added sequence diagram for interaction between powermeter, evse manag…
Pietfried 60c75b5
update powermeter sequence diagrams
Pietfried 56cda12
Merge branch 'main' into doc/powermeter_error_handling
Pietfried 7cb2b04
Fixing potential missunderstanding regarding stop transaction
florinmihut a69359b
Modify the format to Mermaid
florinmihut 6a144b5
Update the comments
florinmihut eca2e46
Update doc/ocmf/powermeter_start_transaction.md
Pietfried 9fdc021
Update doc/ocmf/powermeter_stop_transaction.md
Pietfried File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
```mermaid | ||
sequenceDiagram | ||
autonumber | ||
participant Powermeter | ||
participant EvseManager | ||
participant OCPP | ||
participant CSMS | ||
|
||
title Start of a Transaction | ||
|
||
Note over EvseManager: User plugs in EV and authorizes | ||
|
||
EvseManager->>OCPP: Event(SessionStarted) | ||
|
||
OCPP->>CSMS: StatusNotification.req(Preparing) | ||
CSMS-->>OCPP: StatusNotification.conf | ||
|
||
alt successful case | ||
EvseManager->>Powermeter: startTransaction | ||
Powermeter-->>EvseManager: startTransaction Response (OK/ID) | ||
|
||
EvseManager->>OCPP: Event(TransactionStarted) | ||
OCPP->>CSMS: StartTransaction.req | ||
CSMS-->>OCPP: StartTransaction.conf | ||
|
||
Note over EvseManager: Transaction started successfully | ||
|
||
else startTransaction failing due to power loss | ||
EvseManager->>Powermeter: startTransaction | ||
Powermeter-->>EvseManager: startTransaction Response (FAIL) | ||
|
||
EvseManager->>OCPP: Event(Deauthorized) | ||
|
||
OCPP->>CSMS: StatusNotification.req(Finishing) | ||
CSMS-->>OCPP: StatusNotification.conf | ||
|
||
EvseManager->>OCPP: raiseError (PowermeterTransactionStartFailed) | ||
OCPP->>CSMS: StatusNotification.req(Finishing, PowermeterTransactionStartFailed) | ||
CSMS-->>OCPP: StatusNotification.conf | ||
|
||
Note over EvseManager: Transaction did not start | ||
end | ||
|
||
alt EvseManager configured to become inoperative in case of Powermeter CommunicationError | ||
Powermeter->>EvseManager: raise_error(CommunicationError) | ||
Note over Powermeter,EvseManager: Powermeter raises a CommunicationError <br/>and EvseManager is registered for notification | ||
EvseManager->>OCPP: raise_error (Inoperative) | ||
OCPP->>CSMS: StatusNotification.req(Faulted) | ||
CSMS-->>OCPP: StatusNotification.conf | ||
end | ||
|
||
``` | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
```mermaid | ||
sequenceDiagram | ||
autonumber | ||
participant Powermeter | ||
participant EvseManager | ||
participant OCPP | ||
participant CSMS | ||
|
||
title Stopping Transaction in Error | ||
|
||
Note over Powermeter, CSMS: Transaction is running | ||
|
||
Powermeter->>Powermeter: detects a <br/> CommunicationError | ||
Note over Powermeter,EvseManager: Powermeter raises a CommunicationError <br/>and EvseManager is registered for notification | ||
Powermeter->>EvseManager: raise_error (CommunicationFault) | ||
Powermeter->>OCPP: raise_error (CommunicationFault) | ||
|
||
OCPP->>CSMS: StatusNotification.req(Charging, CommunicationFault) | ||
CSMS-->>OCPP: StatusNotification.conf | ||
|
||
alt EvseManager configured to become inoperative in case of PowermeterCommError | ||
EvseManager->>EvseManager: Pause charging | ||
EvseManager->>OCPP: raiseError (Inoperative) | ||
OCPP->>CSMS: StatusNotification.req(Faulted) | ||
Note over EvseManager: Note that we just continue charging otherwise | ||
end | ||
|
||
Note over Powermeter, CSMS: User stops the transaction | ||
|
||
alt successful case (Powermeter has no CommunicationError) | ||
EvseManager->>Powermeter: stopTransaction (ID) | ||
Powermeter-->>EvseManager: stopTransaction Response (OK/OCMF) | ||
EvseManager->>OCPP: Event(TransactionFinished(OCMF)) | ||
|
||
OCPP->>CSMS: StopTransaction.req(OCMF) | ||
CSMS-->>OCPP: StopTransaction.conf | ||
else stopTransaction failing due to subsequent power loss (this applies as well when Powermeter still in CommunicationError) | ||
EvseManager->>Powermeter: stopTransaction (ID) | ||
Powermeter->>EvseManager: stopTransaction Response (FAIL) | ||
EvseManager->>OCPP: Event(TransactionFinished) | ||
|
||
Note right of OCPP: In this case we can't stop the transaction including the OCMF | ||
OCPP->>CSMS: StopTransaction.req() | ||
CSMS-->>OCPP: StopTransaction.conf | ||
end | ||
``` | ||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Please see my comment here which would change this flow.
#993