Skip to content
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

Fix demo issues enable two payment modes #57

Merged

Conversation

shankari
Copy link
Collaborator

@shankari shankari commented Jun 9, 2024

No description provided.

shankari added 2 commits June 9, 2024 12:59
The line numbers have changed and the way that the status is handled is
different

Testing done:

```
Patching the CSMS to enable local mo root
patching file 'manager/handlers/ocpp201/authorize.go'
Starting the CSMS
```

Signed-off-by: Shankari <[email protected]>
- Use a nodered flow that only supports AC ISO 15118-2 EIM and PnC
- Patch SwitchEV to plumb through the payment option to the ISO 15118 library
  by following the EnergyTransfer route
  EVerest#44 (comment)
  https://lfenergy.zulipchat.com/#narrow/stream/417677-EVerest.3A-Car-com.2E/topic/.E2.9C.94.20Update.20Node-red.20flows.20because.20of.20JsEvManager.20commit/near/443617217
- Enable `iso15118car` debug logging so that we can see the decoded EXI messages in the absence of
  https://lfenergy.zulipchat.com/#narrow/stream/417677-EVerest.3A-Car-com.2E/topic/EXI.20V2G.20Decoder.20Recommendations/near/442318988
- disable the maeve patches to remove the LB since it is already removed in the updated branch

Testing done:

```
patching file docker-compose.yml
Patching the CSMS to enable local mo root
patching file 'config/manager/config.toml'
Patching the CSMS to enable local mo root
patching file 'manager/handlers/ocpp201/authorize.go'
Starting the CSMS
```

```
[+] Running 4/4
 ✔ Container maeve-csms-firestore-1  Running                                                              0.0s
 ✔ Container maeve-csms-mqtt-1       Healthy                                                              0.1s
 ✔ Container maeve-csms-manager-1    Healthy                                                              0.2s
 ✔ Container maeve-csms-gateway-1    Started                                                              0.2s
Waiting 5s for CSMS to start...
MaEVe CSMS started, adding charge station with Security Profile 3 (note: profiles in MaEVe start with 0 so SP-2 == OCPP SP-3)
Charge station added, adding user token
API calls to CSMS finished, starting EVerest...
```

```
 ✔ Network everest-ac-demo_default          Created                                                       0.1s
 ✔ Container everest-ac-demo-mqtt-server-1  Healthy                                                       0.1s
 ✔ Container everest-ac-demo-nodered-1      Healthy                                                       0.2s
 ✔ Container everest-ac-demo-manager-1      Healthy                                                       0.1s
Successfully copied 60.9kB to everest-ac-demo-nodered-1:/config/config-sil-two-evse-flow.json
everest-ac-demo-nodered-1
Successfully copied 6.66kB to everest-ac-demo-manager-1:/ext/source/config/config-sil-ocpp201-pnc.yaml
Successfully copied 8.19kB to everest-ac-demo-manager-1:/tmp/
Successfully copied 3.58kB to everest-ac-demo-manager-1:/ext/source/build/dist/etc/everest/default_logging.cfg
fetch https://dl-cdn.alpinelinux.org/alpine/v3.17/main/x86_64/APKINDEX.tar.gz
fetch https://dl-cdn.alpinelinux.org/alpine/v3.17/community/x86_64/APKINDEX.tar.gz
fetch https://dl-cdn.alpinelinux.org/alpine/edge/testing/x86_64/APKINDEX.tar.gz
(1/1) Installing patch (2.7.6-r9)
Executing busybox-1.35.0-r29.trigger
OK: 1379 MiB in 230 packages
patching file source/build/dist/libexec/everest/3rd_party/josev/iso15118/evcc/controller/interface.py
patching file source/build/dist/libexec/everest/3rd_party/josev/iso15118/evcc/controller/simulator.py
patching file source/build/dist/libexec/everest/3rd_party/josev/iso15118/evcc/states/iso15118_2_states.py
Successfully copied 29.2kB to everest-ac-demo-manager-1:/ext/source/build
```

```
2024-06-09 19:41:31.667368 [DEBG] iso15118_car    pybind11_init_everestpy(pybind11::module_&)::<lambda(const std::string&)> :: Decoded message (ns=urn:iso:15118:2:2013:MsgDef): {"V2G_Message":{"Header":{"SessionID":"04337FC4777FB77D"},"Body":{"ServiceDiscoveryRes":{"ResponseCode":"OK","PaymentOptionList":{"PaymentOption":["ExternalPayment","Contract"]},"ChargeService":{"ServiceID":1,"ServiceCategory":"EVCharging","FreeService":false,"SupportedEnergyTransferMode":{"EnergyTransferMode":["AC_single_phase_core","AC_three_phase_core"]}},"ServiceList":{"Service":[{"ServiceID":2,"ServiceName":"Certificate","ServiceCategory":"ContractCertificate","FreeService":true}]}}}}}
2024-06-09 19:41:31.670311 [WARN] iso15118_car    pybind11_init_everestpy(pybind11::module_&)::<lambda(const std::string&)> :: V2G_PAYMENT: in function read value from state AuthEnum.PNC_V2
2024-06-09 19:41:31.671413 [DEBG] iso15118_car    pybind11_init_everestpy(pybind11::module_&)::<lambda(const std::string&)> :: Message to encode (ns=urn:iso:15118:2:2013:MsgDef): {"V2G_Message": {"Header": {"SessionID": "04337FC4777FB77D"}, "Body": {"PaymentServiceSelectionReq": {"SelectedPaymentOption": "Contract", "SelectedServiceList": {"SelectedService": [{"ServiceID": 1}]}}}}}
2024-06-09 19:41:34.155595 [INFO] ocpp:OCPP201     :: CSMS certificate status: Accepted
2024-06-09 19:41:34.159815 [INFO] auth:Auth        :: Providing authorization to connector#1
2024-06-09 19:41:35.873697 [DEBG] iso15118_car    pybind11_init_everestpy(pybind11::module_&)::<lambda(const std::string&)> :: Message to encode (ns=urn:iso:15118:2:2013:MsgDef): {"V2G_Message": {"Header": {"SessionID": "04337FC4777FB77D"}, "Body": {"ChargeParameterDiscoveryReq": {"RequestedEnergyTransferMode": "AC_three_phase_core", "AC_EVChargeParameter": {"DepartureTime": 0, "EAmount": {"Value": 60, "Multiplier": 0, "Unit": "Wh"}, "EVMaxVoltage": {"Value": 400, "Multiplier": 0, "Unit": "V"}, "EVMaxCurrent": {"Value": 32000, "Multiplier": -3, "Unit": "A"}, "EVMinCurrent": {"Value": 10, "Multiplier": 0, "Unit": "A"}}}}}}
2024-06-09 19:41:36.948664 [DEBG] iso15118_car    pybind11_init_everestpy(pybind11::module_&)::<lambda(const std::string&)> :: Decoded message (ns=urn:iso:15118:2:2013:MsgDef): {"V2G_Message":{"Header":{"SessionID":"04337FC4777FB77D"},"Body":{"ChargeParameterDiscoveryRes":{"ResponseCode":"OK","EVSEProcessing":"Finished","SAScheduleList":{"SAScheduleTuple":[{"SAScheduleTupleID":1,"PMaxSchedule":{"PMaxScheduleEntry":[{"RelativeTimeInterval":{"start":0,"duration":86400},"PMax":{"Multiplier":0,"Unit":"W","Value":22080}}]}}]},"AC_EVSEChargeParameter":{"AC_EVSEStatus":{"NotificationMaxDelay":0,"EVSENotification":"None","RCD":false},"EVSENominalVoltage":{"Multiplier":-1,"Unit":"V","Value":2300},"EVSEMaxCurrent":{"Multiplier":-1,"Unit":"A","Value":320}}}}}}
```

Signed-off-by: Shankari <[email protected]>
@shankari
Copy link
Collaborator Author

shankari commented Jun 9, 2024

Testing done:

patching file docker-compose.yml
Patching the CSMS to enable local mo root
patching file 'config/manager/config.toml'
Patching the CSMS to enable local mo root
patching file 'manager/handlers/ocpp201/authorize.go'
Starting the CSMS
[+] Running 4/4
 ✔ Container maeve-csms-firestore-1  Running                                                              0.0s
 ✔ Container maeve-csms-mqtt-1       Healthy                                                              0.1s
 ✔ Container maeve-csms-manager-1    Healthy                                                              0.2s
 ✔ Container maeve-csms-gateway-1    Started                                                              0.2s
Waiting 5s for CSMS to start...
MaEVe CSMS started, adding charge station with Security Profile 3 (note: profiles in MaEVe start with 0 so SP-2 == OCPP SP-3)
Charge station added, adding user token
API calls to CSMS finished, starting EVerest...
 ✔ Network everest-ac-demo_default          Created                                                       0.1s
 ✔ Container everest-ac-demo-mqtt-server-1  Healthy                                                       0.1s
 ✔ Container everest-ac-demo-nodered-1      Healthy                                                       0.2s
 ✔ Container everest-ac-demo-manager-1      Healthy                                                       0.1s
Successfully copied 60.9kB to everest-ac-demo-nodered-1:/config/config-sil-two-evse-flow.json
everest-ac-demo-nodered-1
Successfully copied 6.66kB to everest-ac-demo-manager-1:/ext/source/config/config-sil-ocpp201-pnc.yaml
Successfully copied 8.19kB to everest-ac-demo-manager-1:/tmp/
Successfully copied 3.58kB to everest-ac-demo-manager-1:/ext/source/build/dist/etc/everest/default_logging.cfg
fetch https://dl-cdn.alpinelinux.org/alpine/v3.17/main/x86_64/APKINDEX.tar.gz
fetch https://dl-cdn.alpinelinux.org/alpine/v3.17/community/x86_64/APKINDEX.tar.gz
fetch https://dl-cdn.alpinelinux.org/alpine/edge/testing/x86_64/APKINDEX.tar.gz
(1/1) Installing patch (2.7.6-r9)
Executing busybox-1.35.0-r29.trigger
OK: 1379 MiB in 230 packages
patching file source/build/dist/libexec/everest/3rd_party/josev/iso15118/evcc/controller/interface.py
patching file source/build/dist/libexec/everest/3rd_party/josev/iso15118/evcc/controller/simulator.py
patching file source/build/dist/libexec/everest/3rd_party/josev/iso15118/evcc/states/iso15118_2_states.py
Successfully copied 29.2kB to everest-ac-demo-manager-1:/ext/source/build
2024-06-09 19:41:31.667368 [DEBG] iso15118_car    pybind11_init_everestpy(pybind11::module_&)::<lambda(const std::string&)> :: Decoded message (ns=urn:iso:15118:2:2013:MsgDef): {"V2G_Message":{"Header":{"SessionID":"04337FC4777FB77D"},"Body":{"ServiceDiscoveryRes":{"ResponseCode":"OK","PaymentOptionList":{"PaymentOption":["ExternalPayment","Contract"]},"ChargeService":{"ServiceID":1,"ServiceCategory":"EVCharging","FreeService":false,"SupportedEnergyTransferMode":{"EnergyTransferMode":["AC_single_phase_core","AC_three_phase_core"]}},"ServiceList":{"Service":[{"ServiceID":2,"ServiceName":"Certificate","ServiceCategory":"ContractCertificate","FreeService":true}]}}}}}
2024-06-09 19:41:31.670311 [WARN] iso15118_car    pybind11_init_everestpy(pybind11::module_&)::<lambda(const std::string&)> :: V2G_PAYMENT: in function read value from state AuthEnum.PNC_V2
2024-06-09 19:41:31.671413 [DEBG] iso15118_car    pybind11_init_everestpy(pybind11::module_&)::<lambda(const std::string&)> :: Message to encode (ns=urn:iso:15118:2:2013:MsgDef): {"V2G_Message": {"Header": {"SessionID": "04337FC4777FB77D"}, "Body": {"PaymentServiceSelectionReq": {"SelectedPaymentOption": "Contract", "SelectedServiceList": {"SelectedService": [{"ServiceID": 1}]}}}}}
2024-06-09 19:41:34.155595 [INFO] ocpp:OCPP201     :: CSMS certificate status: Accepted
2024-06-09 19:41:34.159815 [INFO] auth:Auth        :: Providing authorization to connector#1
2024-06-09 19:41:35.873697 [DEBG] iso15118_car    pybind11_init_everestpy(pybind11::module_&)::<lambda(const std::string&)> :: Message to encode (ns=urn:iso:15118:2:2013:MsgDef): {"V2G_Message": {"Header": {"SessionID": "04337FC4777FB77D"}, "Body": {"ChargeParameterDiscoveryReq": {"RequestedEnergyTransferMode": "AC_three_phase_core", "AC_EVChargeParameter": {"DepartureTime": 0, "EAmount": {"Value": 60, "Multiplier": 0, "Unit": "Wh"}, "EVMaxVoltage": {"Value": 400, "Multiplier": 0, "Unit": "V"}, "EVMaxCurrent": {"Value": 32000, "Multiplier": -3, "Unit": "A"}, "EVMinCurrent": {"Value": 10, "Multiplier": 0, "Unit": "A"}}}}}}
2024-06-09 19:41:36.948664 [DEBG] iso15118_car    pybind11_init_everestpy(pybind11::module_&)::<lambda(const std::string&)> :: Decoded message (ns=urn:iso:15118:2:2013:MsgDef): {"V2G_Message":{"Header":{"SessionID":"04337FC4777FB77D"},"Body":{"ChargeParameterDiscoveryRes":{"ResponseCode":"OK","EVSEProcessing":"Finished","SAScheduleList":{"SAScheduleTuple":[{"SAScheduleTupleID":1,"PMaxSchedule":{"PMaxScheduleEntry":[{"RelativeTimeInterval":{"start":0,"duration":86400},"PMax":{"Multiplier":0,"Unit":"W","Value":22080}}]}}]},"AC_EVSEChargeParameter":{"AC_EVSEStatus":{"NotificationMaxDelay":0,"EVSENotification":"None","RCD":false},"EVSENominalVoltage":{"Multiplier":-1,"Unit":"V","Value":2300},"EVSEMaxCurrent":{"Multiplier":-1,"Unit":"A","Value":320}}}}}}

@shankari
Copy link
Collaborator Author

shankari commented Jun 9, 2024

re-verified by using: bash demo-iso15118-2-ac-plus-ocpp.sh -r https://github.com/US-JOET/everesdemo.git -b fix_demo_issues_enable_two_payment_modes -3 and initiating an AC EIM session, which worked. Merging.

@louisg1337 please adding your testing results here as well for the record.

@shankari shankari merged commit 0feea2d into EVerest:main Jun 9, 2024
5 checks passed
@louisg1337
Copy link
Contributor

To start my tests, I pulled the latest changes from everest-demo/main and ran bash demo-iso15118-2-ac-plus-ocpp.sh -3. Below are the two car simulations I tested and the things that I observed:

  • AC ISO15118-2

    • Clicked "Car Plugin", it said waiting for authorization
    • Swiped RFID, the charger started charging
    • In the PaymentServiceSelectionReq message ExternalPayment was displayed
  • AC ISO15118-2 Plug&Charge

    • Clicked "Car Plugin" and the charger started charging after about 5 seconds
    • In the PaymentServiceSelectionReq message Contract was displayed

I also ran the demo-scripts/maeve-set-charging-profile.sh, and I observed the following in the OCPP logs of EVerest.

Screenshot 2024-06-09 at 10 00 35 PM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants