Skip to content

Commit

Permalink
added sequence diagram for interaction between powermeter, evse manag…
Browse files Browse the repository at this point in the history
…er and OCPP covering handling of OCMF/Eichrecht

Signed-off-by: pietfried <[email protected]>
  • Loading branch information
Pietfried authored and corneliusclaussen committed Oct 1, 2024
1 parent 65fa38e commit 689836c
Show file tree
Hide file tree
Showing 3 changed files with 150 additions and 0 deletions.
40 changes: 40 additions & 0 deletions doc/powermeter_start_transaction.puml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
@startuml
autonumber "<b><font color=red>"
participant Powermeter
participant EVSE_Manager
participant OCPP
participant CSMS

title Start of a Transaction

== User plugs in EV and authorizes ==

EVSE_Manager->OCPP: Event(SessionStarted)

OCPP->CSMS: StatusNotification.req(Preparing)
return StatusNotification.conf

alt successful case
EVSE_Manager -> Powermeter: startTransaction
return startTransaction Response (OK/ID)

EVSE_Manager -> OCPP: Event(TransactionStarted)
OCPP->CSMS: StartTransaction.req
return StartTransaction.conf

note over EVSE_Manager: Transaction started successfully

else startTransaction failing due to power loss
EVSE_Manager -> Powermeter: startTransaction
return startTransaction Response (FAIL)

EVSE_Manager -> OCPP: Event(Deauthorized)

OCPP->CSMS: StatusNotification.req(Finishing)
return StatusNotification.conf

note over EVSE_Manager: Transaction did not start

end

@enduml
56 changes: 56 additions & 0 deletions doc/powermeter_stop_transaction_in_error.puml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
@startuml
participant Powermeter
participant EVSE_Manager
participant OCPP
participant CSMS

title Stopping transaction in error

== Transaction is running ==

Powermeter -> Powermeter: livemeasure FAILED

!pragma teoz true
Powermeter -> EVSE_Manager: raiseError (CommunicationFault)
& Powermeter -> OCPP: raiseError (CommunicationFault)

EVSE_Manager->EVSE_Manager: Pause charging

OCPP->CSMS: StatusNotification.req(Faulted)
return StatusNotification.conf

Powermeter -> Powermeter: livemeasure OK
Powermeter -> Powermeter: get Powermeter status
!pragma teoz true
Powermeter -> EVSE_Manager: clearError (CommunicationFault)
& Powermeter -> OCPP: clearError (CommunicationFault)

== User stops transaction while powermeter communication error ==

EVSE_Manager->EVSE_Manager: Stop Transaction internally
EVSE_Manager->EVSE_Manager: Wait for powermeter to clear error
note right of EVSE_Manager: Note that EvseManager does not stop transaction immediately

Powermeter -> EVSE_Manager: clearError (CommunicationFault)
& Powermeter -> OCPP: clearError (CommunicationFault)

alt successful case
EVSE_Manager -> Powermeter: stopTransaction (ID)
return stopTransaction Response (OK/OCMF)
EVSE_Manager -> OCPP: Event(TransactionFinished(ID/stopReason:PowerLoss/OCMF))

OCPP->CSMS: StopTransaction.req(ID/stopReason:PowerLoss/OCMF)
return StopTransaction.conf

else stopTransaction failing due to subsequent power loss
EVSE_Manager -> Powermeter: stopTransaction (ID)
Powermeter -> Powermeter: livemeasure FAILED
Powermeter -> EVSE_Manager: stopTransaction Response (FAIL)
EVSE_Manager -> OCPP: Event(TransactionFinished(ID/stopReason:PowerLoss/OCMF))

note right of OCPP: In this case we can't stop the transaction including the OCMF
OCPP->CSMS: StopTransaction.req(ID/stopReason:PowerLoss)
return StopTransaction.conf
end

@enduml
54 changes: 54 additions & 0 deletions doc/powermeter_stop_transaction_without_error copy.puml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
@startuml
participant Powermeter
participant EVSE_Manager
participant OCPP
participant CSMS

title Stopping transaction

== Transaction is running ==

Powermeter -> Powermeter: livemeasure FAILED

!pragma teoz true
Powermeter -> EVSE_Manager: raiseError (CommunicationFault)
& Powermeter -> OCPP: raiseError (CommunicationFault)

EVSE_Manager->EVSE_Manager: Pause charging

OCPP->CSMS: StatusNotification.req(Faulted)
return StatusNotification.conf

Powermeter -> Powermeter: livemeasure OK
Powermeter -> Powermeter: get Powermeter status
!pragma teoz true
Powermeter -> EVSE_Manager: clearError (CommunicationFault)
& Powermeter -> OCPP: clearError (CommunicationFault)

EVSE_Manager->EVSE_Manager: Resume charging

OCPP->CSMS: StatusNotification.req(Charging)
return StatusNotification.conf

== User stops transaction ==

alt successful case
EVSE_Manager -> Powermeter: stopTransaction (ID)
return stopTransaction Response (OK/OCMF)
EVSE_Manager -> OCPP: Event(TransactionFinished(ID/stopReason:PowerLoss/OCMF))

OCPP->CSMS: StopTransaction.req(ID/stopReason:PowerLoss/OCMF)
return StopTransaction.conf

else stopTransaction failing due to subsequent power loss
EVSE_Manager -> Powermeter: stopTransaction (ID)
Powermeter -> Powermeter: livemeasure FAILED
Powermeter -> EVSE_Manager: stopTransaction Response (FAIL)
EVSE_Manager -> OCPP: Event(TransactionFinished(ID/stopReason:PowerLoss/OCMF))

note right of OCPP: In this case we can't stop the transaction including the OCMF
OCPP->CSMS: StopTransaction.req(ID/stopReason:PowerLoss)
return StopTransaction.conf
end

@enduml

0 comments on commit 689836c

Please sign in to comment.