- Add ocpp-simulator-multi.js: 15 stations CP001-CP015 via WebSocket SP1 - Add ocpp-sp0-connector.js: Security Profile 0 connector - Add configure-auth.py: BasicAuthPassword setup for all stations - Add Dockerfile.simulator + Dockerfile.sp0 for containerized simulators - Fix Hasura DB password (ALTER USER citrine) - Fix UI NEXTAUTH_SECRET mismatch (C1tR1n30S2... vs Digitribe972) - Fix UI network (traefik-public) + Traefik labels - Update docker-compose-citrineos.yml with simulator services - Set isOnline=true for all 15 stations in DB
34 lines
1.1 KiB
Bash
34 lines
1.1 KiB
Bash
#!/usr/bin/env bash
|
|
# Configure BasicAuthPassword for all 15 Cariflex charging stations
|
|
# This allows OCPP 2.0.1 simulators to connect via Security Profile 1
|
|
|
|
set -e
|
|
|
|
CitRINEOS_URL="http://localhost:8081"
|
|
PASSWORD="DEADBEEFDEADBEEF"
|
|
|
|
echo "=== Configuring BasicAuthPassword for all stations ==="
|
|
|
|
for i in $(seq 1 15); do
|
|
# Format: CP001, CP002, ... CP015
|
|
CP_ID=$(printf "CP%03d" $i)
|
|
|
|
response=$(curl -s -o /dev/null -w "%{http_code}" --location --request PUT \
|
|
"${CitRINEOS_URL}/data/monitoring/variableAttribute?stationId=${CP_ID}&setOnCharger=true" \
|
|
--header "Content-Type: application/json" \
|
|
--data-raw "{
|
|
\"component\": { \"name\": \"SecurityCtrlr\" },
|
|
\"variable\": { \"name\": \"BasicAuthPassword\" },
|
|
\"variableAttribute\": [{ \"value\": \"${PASSWORD}\" }],
|
|
\"variableCharacteristics\": { \"dataType\": \"passwordString\", \"supportsMonitoring\": false }
|
|
}")
|
|
|
|
if [ "$response" -ge 200 ] && [ "$response" -lt 300 ]; then
|
|
echo "✅ ${CP_ID}: BasicAuthPassword configured"
|
|
else
|
|
echo "❌ ${CP_ID}: Failed (HTTP ${response})"
|
|
fi
|
|
done
|
|
|
|
echo "=== Done ==="
|