Skip to content

Commit

Permalink
Merge branch 'main' into feature/add-citrine-support
Browse files Browse the repository at this point in the history
Signed-off-by: K. Shankari <[email protected]>
  • Loading branch information
shankari committed Jun 9, 2024
2 parents dd87883 + 0e908ee commit c93fed5
Show file tree
Hide file tree
Showing 2 changed files with 72 additions and 6 deletions.
12 changes: 6 additions & 6 deletions demo-iso15118-2-ac-plus-ocpp.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,9 @@
DEMO_REPO="https://github.com/everest/everest-demo.git"
DEMO_BRANCH="main"

CSMS_REPO="https://github.com/thoughtworks/maeve-csms.git"
CSMS_BRANCH="b990d0eddf2bf80be8d9524a7b08029fbb305c7d" # patch files are based on this commit
CSMS_REPO="https://github.com/louisg1337/maeve-csms.git"
# CSMS_BRANCH="b990d0eddf2bf80be8d9524a7b08029fbb305c7d" # patch files are based on this commit
CSMS_BRANCH="set_charging_profile"

CITRINEOS_REPO="https://github.com/citrineos/citrineos-core.git"
CITRINEOS_BRANCH="feature/everest-demo"
Expand Down Expand Up @@ -93,12 +94,11 @@ echo "Cloning EVerest from ${DEMO_REPO} into ${DEMO_DIR}/everest-demo"
git clone --branch "${DEMO_BRANCH}" "${DEMO_REPO}" everest-demo

if [[ "$DEMO_VERSION" != v1.6j && "$DEMO_CSMS" == meave ]]; then
echo "Cloning MaEVe CSMS from ${MAEVE_REPO} into ${DEMO_DIR}/maeve-csms and starting it"
git clone "${MAEVE_REPO}" maeve-csms
echo "Cloning ${DEMO_CSMS} CSMS from ${CSMS_REPO} into ${DEMO_DIR}/${DEMO_CSMS}-csms and starting it"
git clone --branch "${CSMS_BRANCH}" "${CSMS_REPO}" ${CSMS}-csms

pushd maeve-csms || exit 1

git reset --hard "${MAEVE_BRANCH}"
cp ../everest-demo/manager/cached_certs_correct_name_emaid.tar.gz .

echo "Patching the CSMS to disable load balancer"
Expand Down Expand Up @@ -139,7 +139,7 @@ if [[ "$DEMO_VERSION" != v1.6j && "$DEMO_CSMS" == meave ]]; then
patch -p1 -i ../everest-demo/maeve/maeve-csms-no-wss.patch
fi

echo "Starting the MaEVe CSMS"
docker compose build
docker compose up -d

echo "Waiting 5s for MaEVe CSMS to start..."
Expand Down
66 changes: 66 additions & 0 deletions demo-scripts/maeve-set-charging-profile.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
#!/bin/bash

if [ "$#" -ne 1 ]; then
echo "Usage: $0 <chargingStation>"
exit 1
fi

CS=$1

echo "setChargingProfile called with Charging Station: ${CS}"

curl -X POST \
"http://localhost:9410/api/v0/cs/${CS}/setchargingprofile" \
-H "Content-Type: application/json" \
-d '{
"chargingProfileKind": "Absolute",
"chargingProfilePurpose": "TxProfile",
"chargingSchedule": [
{
"chargingRateUnit": "W",
"chargingSchedulePeriod": [
{
"limit": 22.5,
"startPeriod": 0,
"numberPhases": 3
},
{
"limit": 20.0,
"startPeriod": 3600,
"numberPhases": 3
}
],
"id": 1,
"minChargingRate": 5.0,
"salesTariff": {
"id": 1,
"numEPriceLevels": 2,
"salesTariffDescription": "Standard Tariff",
"salesTariffEntry": [
{
"relativeTimeInterval": {
"start": 0,
"duration": 3600
},
"consumptionCost": [
{
"cost": [
{
"amount": 15,
"costKind": "RelativePricePercentage"
}
],
"startValue": 10.0
}
]
}
]
}
}
],
"id": 1,
"stackLevel": 0,
"transactionId": "12345",
"validFrom": "2024-06-07T10:00:00Z",
"validTo": "2024-06-07T18:00:00Z"
}'

0 comments on commit c93fed5

Please sign in to comment.