Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/main' into feature/add-citrine…
Browse files Browse the repository at this point in the history
…-support
  • Loading branch information
ChrisWeissmann committed Jun 5, 2024
2 parents e56c491 + d9cd7bb commit a435152
Show file tree
Hide file tree
Showing 2 changed files with 104 additions and 3 deletions.
6 changes: 3 additions & 3 deletions demo-iso15118-2-ac-plus-ocpp.sh
Original file line number Diff line number Diff line change
Expand Up @@ -223,15 +223,15 @@ if [[ "$DEMO_CSMS" == 'maeve' ]]; then
if [[ "$DEMO_VERSION" =~ sp1 ]]; then
echo "Copying device DB, configured to SecurityProfile: 1"
docker cp manager/device_model_storage_maeve_sp1.db \
everest-ac-demo-manager-1:/workspace/dist/share/everest/modules/OCPP201/device_model_storage.db
everest-ac-demo-manager-1:/ext/source/build/dist/share/everest/modules/OCPP201/device_model_storage.db
elif [[ "$DEMO_VERSION" =~ sp2 ]]; then
echo "Copying device DB, configured to SecurityProfile: 2"
docker cp manager/device_model_storage_maeve_sp2.db \
everest-ac-demo-manager-1:/workspace/dist/share/everest/modules/OCPP201/device_model_storage.db
everest-ac-demo-manager-1:/ext/source/build/dist/share/everest/modules/OCPP201/device_model_storage.db
elif [[ "$DEMO_VERSION" =~ sp3 ]]; then
echo "Copying device DB, configured to SecurityProfile: 3"
docker cp manager/device_model_storage_maeve_sp3.db \
everest-ac-demo-manager-1:/workspace/dist/share/everest/modules/OCPP201/device_model_storage.db
everest-ac-demo-manager-1:/ext/source/build/dist/share/everest/modules/OCPP201/device_model_storage.db
fi
fi

Expand Down
101 changes: 101 additions & 0 deletions demo-scripts/citrine-set-charging-profile.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,101 @@
#!/bin/bash

# Check if the correct number of arguments are provided
if [ "$#" -ne 2 ]; then
echo "Usage: $0 <identifier> <tenantId>"
exit 1
fi

# Assign arguments to variables
IDENTIFIER=$1
TENANT_ID=$2

echo "setChargingProfile called with Identifier: ${IDENTIFIER} and tenandId: ${TENANT_ID}"

curl -X 'POST' \
"http://localhost:8080/ocpp/smartcharging/setChargingProfile?identifier=${IDENTIFIER}&tenantId=${TENANT_ID}" \
-H 'accept: */*' \
-H 'Content-Type: application/json' \
-d '{
"customData": {
"vendorId": "string"
},
"evseId": 0,
"chargingProfile": {
"customData": {
"vendorId": "string"
},
"id": 0,
"stackLevel": 0,
"chargingProfilePurpose": "ChargingStationExternalConstraints",
"chargingProfileKind": "Absolute",
"recurrencyKind": "Daily",
"validFrom": "2024-06-03T21:58:35.240Z",
"validTo": "2024-06-03T21:58:35.240Z",
"chargingSchedule": [
{
"customData": {
"vendorId": "string"
},
"id": 0,
"startSchedule": "2024-06-03T21:58:35.240Z",
"duration": 0,
"chargingRateUnit": "W",
"chargingSchedulePeriod": [
{
"customData": {
"vendorId": "string"
},
"startPeriod": 0,
"limit": 0,
"numberPhases": 0,
"phaseToUse": 0
}
],
"minChargingRate": 0,
"salesTariff": {
"customData": {
"vendorId": "string"
},
"id": 0,
"salesTariffDescription": "string",
"numEPriceLevels": 0,
"salesTariffEntry": [
{
"customData": {
"vendorId": "string"
},
"relativeTimeInterval": {
"customData": {
"vendorId": "string"
},
"start": 0,
"duration": 0
},
"ePriceLevel": 0,
"consumptionCost": [
{
"customData": {
"vendorId": "string"
},
"startValue": 0,
"cost": [
{
"customData": {
"vendorId": "string"
},
"costKind": "CarbonDioxideEmission",
"amount": 0,
"amountMultiplier": 0
}
]
}
]
}
]
}
}
],
"transactionId": "string"
}
}'

0 comments on commit a435152

Please sign in to comment.