e-clearing-net / OCHP

Open Clearing House Protocol
http://ochp.eu
MIT License
50 stars 33 forks source link

OCHP_direct.md - help with "local start of a charging session..." #8

Closed simplerun closed 8 years ago

simplerun commented 8 years ago

Hi, I'm not able to trace messages and data to understand 'local start of a charging session (i.e. via RFID) ... It is confusing for me, how a remote session is established if I start it locally with RFID ? What messages are exchanged between provider and operator ? Could You please write WS action flow for that case ?

Thanks.

mtdern commented 8 years ago

Example: Customer of EMP YYAAA comes to a charging station of CPO YYBBB and starts a charging process using their RFID card. The following happens:

  1. The CPO sees a new charging process got established by a customer of YYAAA.
  2. The CPO checks their stored OCHPdirect endpoints for an endpoint that contains YYAAA in its whitelist.
  3. The CPO does not find an endpoint for YYAAA and does not send any OCHPdirect message. Or:
  4. The CPO finds an endpoint for YYAAA and thus sends an InformProvider towards that endpoint, informing YYAAA of the charging process their customer started and establishing an OCHPdirect session (and direct-ID).
simplerun commented 8 years ago

For third step. CPO continue with Live authorisation. If CPO now can find an endpoint for YYAAA procedure jump to step four. If CPO again can not find an endpoint for YYAAA than user request for charging is refused.
Please correct me if I'm wrong here.

For fourth step. InformProvider conversation is initiated in CPO. In the first message from CPO to EMP, CPO create and send directID in InformProvider.req. All following InformProvider.req messages received by EMP are paired by directID. Please correct me if I'm wrong here.

mtdern commented 8 years ago

In the third step, the CPO cannot do a LiveAuth. If a LiveAuth would be done, it would be done before the actual charging process starts. Let me add to the steps described above:

-4. Customer comes to a charging station and wants to start a charging process. -3. Customer swipes their RFID card. -2. CPO checks their whitelist for this RFID card (or, alternatively, sends a LiveAuth request to eCHS) [Important note: the LiveAuth of OCHP only checks the eCHS whitelist, it does not ask the EMP for authorization] -1. CPO finds the RFID card in the whitelist (or gets confirmation for the LiveAuth).

  1. Charging process is authorized, the customer can plug in.

Steps 3 or 4 are alternatives, there cannot be both (should've called them 3a and 3b maybe). Either the CPO already knows the OCHPdirect endpoint that is responsible for the customer that started the charging process, or they don't. The entire exchange of endpoints happens at night, so they cannot try to find the corresponding endpoint on the fly.

For step four, you are perfectly right. It is always the CPO that establishes the directID. This happens either when an EMP creates a session (SelectEvse.req) for remote control or when the CPO finds a charging process that they can create a session for (InformProvider.req - under the prerequisite that the corresponding EMP has implemented an OCHPdirect endpoint).

simplerun commented 8 years ago

I get it now. Thank You for the details.