diff --git a/README.md b/README.md index bd185531..503c76b8 100644 --- a/README.md +++ b/README.md @@ -63,7 +63,7 @@ in your terminal before one of the one-liners presented in the next section. - 🚨 Two EVSE Charging ⚡: `curl https://raw.githubusercontent.com/everest/everest-demo/main/demo-two-evse.sh | bash` - 🚨 E2E Automated Tests ⚡: `curl https://raw.githubusercontent.com/everest/everest-demo/main/demo-automated-testing.sh | bash` - 🚨 Basic and ISO 15118-2 AC Charging with OCPP 1.6J CSMS ⚡: `curl https://raw.githubusercontent.com/everest/everest-demo/main/demo-iso15118-2-ac-plus-ocpp16j.sh | bash` - - 🚨 Basic and ISO 15118-2 AC Charging with OCPP 1.6J CSMS ⚡: `curl https://raw.githubusercontent.com/everest/everest-demo/main/demo-iso15118-2-ac-plus-ocpp16j.sh | bash` + - 🚨 Basic and ISO 15118-2 AC Charging with OCPP 1.6J CSMS ⚡: `curl https://raw.githubusercontent.com/everest/everest-demo/main/demo-iso15118-2-ac-plus-ocpp201.sh | bash` ### STEP 2: Interact with the demo - Open the `nodered` flows to understand the module flows at http://127.0.0.1:1880 diff --git a/demo-iso15118-2-ac-plus-ocpp201.sh b/demo-iso15118-2-ac-plus-ocpp201.sh index 78fc2754..be1698a3 100755 --- a/demo-iso15118-2-ac-plus-ocpp201.sh +++ b/demo-iso15118-2-ac-plus-ocpp201.sh @@ -16,6 +16,8 @@ download_demo_file() { local -r repo_raw_url='https://raw.githubusercontent.com/everest/everest-demo/main' local -r destination_path="${DEMO_DIR}/${repo_file_path}" + echo "Downloading ${repo_raw_url}/${repo_file_path} to ${destination_path}" + mkdir -p "$(dirname ${destination_path})" curl -s -o "${destination_path}" "${repo_raw_url}/${repo_file_path}" if [[ "$?" != 0 ]]; then @@ -30,5 +32,32 @@ download_demo_file() { download_demo_file "${DEMO_COMPOSE_FILE_NAME}" download_demo_file .env +echo "Cloning MaEVe CSMS and starting it" +git clone https://github.com/thoughtworks/maeve-csms.git ${DEMO_DIR}/maeve-csms +pushd ${DEMO_DIR}/maeve-csms +download_demo_file "maeve/maeve-csms.patch" +mv ../maeve/maeve-csms.patch . +patch -p1 -i maeve-csms.patch +docker compose up -d +echo "MaEVe CSMS started, adding charge station" + +curl http://localhost:9410/api/v0/cs/cp001 -H 'content-type: application/json' \ + -d '{"securityProfile": 0, "base64SHA256Password": "3oGi4B5I+Y9iEkYtL7xvuUxrvGOXM/X2LQrsCwf/knA="}' + +echo "Charge station added, adding user token" + +curl http://localhost:9410/api/v0/token -H 'content-type: application/json' -d '{ + "countryCode": "GB", + "partyId": "TWK", + "type": "RFID", + "uid": "DEADBEEF", + "contractId": "GBTWK012345678V", + "issuer": "Thoughtworks", + "valid": true, + "cacheMode": "ALWAYS" +}' + +echo "User token added, starting EVerest..." + docker compose --project-name everest-ac-demo \ --file "${DEMO_DIR}/${DEMO_COMPOSE_FILE_NAME}" up