SwitchEV / RISE-V2G

The only fully-featured reference implementation of the Vehicle-2-Grid communication interface ISO 15118
MIT License
220 stars 92 forks source link

Wrong sequence when ReceiptRequired is true in last CurrentDemandRes #66

Closed jpo-stx closed 3 years ago

jpo-stx commented 3 years ago

I have an issue with session termination when using plug and charge with RISE V2G as EV:

  1. Charging session is in the charge loop
  2. The EVSE sets the ReceiptRequired parameter in the last CurrentDemandRes message to true
  3. The EV sends the MeteringReceiptReq message
  4. The EVSE sends the MeteringReceiptRes message
  5. The EV sends the PowerDeliveryReq with ChargeProgess = STOP_CHARGING
  6. The EVSE sends OK response code in PowerDeliveryRes
  7. The EV sends CurrentDemandReq message which is not correct. The EV should continue with WeldingDetection or SessionStop as described in [V2G2-590].

When the EVSE does not set the ReceiptRequired flag in the last CurrentDemandRes message everything works fine.

Log of the session end: session_pnc.log

jpo-stx commented 3 years ago

Hi,

adding these lines from WaitForCurrentDemandRes.java to WaitForMeteringReceiptRes.java solves the issue:

https://github.com/SwitchEV/RISE-V2G/blob/9abd5ae7298c969dc921238dd52b10fcb8ac26ba/RISE-V2G-EVCC/src/main/java/com/v2gclarity/risev2g/evcc/states/WaitForCurrentDemandRes.java#L119-L120