-
Notifications
You must be signed in to change notification settings - Fork 21
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
Add general citrine support #58
Add general citrine support #58
Conversation
…mand with argument `-c`. Testing done: Used local branch to test before pushing to remote `./demo-iso15118-2-ac-plus-ocpp.sh -2 -c -r $(pwd) -b feature/add-citrine-support-signedoff` ``` [+] Running 5/5 ✔ Network citrineos-csms_default Created 0.0s ✔ Container citrineos-csms-ocpp-db-1 Healthy 22.6s ✔ Container citrineos-csms-amqp-broker-1 Healthy 22.6s ✔ Container citrineos-csms-directus-1 Healthy 22.6s ✔ Container citrineos-csms-citrine-1 Healthy 22.5s ``` Adding charger successfully: ``` Adding a charger to CitrineOS Adding new station... {"data":{"id":"cp001","isOnline":null,"locationId":2,"createdAt":"2024-06-10T15:10:18.175Z","updatedAt":"2024-06-10T15:10:18.176Z"}}{"data":{"id":"cp001","isOnline":null,"locationId":2,"createdAt":"2024-06-10T15:10:18.175Z","updatedAt":"2024-06-10T15:10:18.176Z"}} Add cp001 password to citrine... ``` ``` [+] Running 4/4 ✔ Network everest-ac-demo_default Created 0.0s ✔ Container everest-ac-demo-mqtt-server-1 Healthy 1.1s ✔ Container everest-ac-demo-nodered-1 Healthy 31.0s ✔ Container everest-ac-demo-manager-1 Healthy ``` ``` 2024-06-10 15:13:05.314829 [INFO] ocpp:OCPP201 :: Received BootNotificationResponse: { "currentTime": "2024-06-10T15:13:05.306Z", "interval": 60, "status": "Accepted" } ``` Signed-off-by: Christian Weissmann <[email protected]>
Signed-off-by: Christian Weissmann <[email protected]>
Thank you guys for getting this over to us. I took some time to try out the new demo script and almost everything worked as expected. Here are the steps I took and the results I saw.
Let me know if I did something wrong somewhere along the line that would get 5 working. Other than that one issue, it all looked great. We really appreciate all the work that was put into getting this PR together! EDIT: I forgot to check this before, but MaEVe doesn't work with this new script. There are a few changes that need to be made to make it work in this new script, all of which I am working on getting into the review. |
@thanaParis @ChrisWeissmann please see comment from @louisg1337 |
citrineos/add-charger.sh
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you could put in an extra function to support adding in EVerest's authorization token to Citrine that would be great. I put more context regarding this in my comment here.
demo-iso15118-2-ac-plus-ocpp.sh
Outdated
|
||
if [[ "$DEMO_VERSION" != v1.6j ]]; then | ||
echo "Cloning ${CSMS} CSMS from ${CSMS_REPO} into ${DEMO_DIR}/${CSMS}-csms and starting it" | ||
if [[ "$DEMO_VERSION" != v1.6j && "$DEMO_CSMS" == meave ]]; then |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Small typo meave
--> 'maeve'
demo-iso15118-2-ac-plus-ocpp.sh
Outdated
echo "Cloning ${CSMS} CSMS from ${CSMS_REPO} into ${DEMO_DIR}/${CSMS}-csms and starting it" | ||
if [[ "$DEMO_VERSION" != v1.6j && "$DEMO_CSMS" == meave ]]; then | ||
echo "Cloning ${DEMO_CSMS} CSMS from ${MAEVE_REPO} into ${DEMO_DIR}/${DEMO_CSMS}-csms and starting it" | ||
git clone --branch "${MAEVE_BRANCH}" "${MAEVE_REPO}" "${CSMS}-csms" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Change "${CSMS}-csms"
to "${DEMO_CSMS}-csms"
if [[ "$DEMO_VERSION" =~ sp1 ]]; then | ||
echo "MaEVe CSMS started, adding charge station with Security Profile 1 (note: profiles in MaEVe start with 0 so SP-0 == OCPP SP-1)" | ||
curl http://localhost:9410/api/v0/cs/cp001 -H 'content-type: application/json' \ | ||
-d '{"securityProfile": 0, "base64SHA256Password": "3oGi4B5I+Y9iEkYtL7xvuUxrvGOXM/X2LQrsCwf/knA="}' | ||
elif [[ "$DEMO_VERSION" =~ sp2 ]]; then | ||
echo "MaEVe CSMS started, adding charge station with Security Profile 2 (note: profiles in MaEVe start with 0 so SP-1 == OCPP SP-2)" | ||
curl http://localhost:9410/api/v0/cs/cp001 -H 'content-type: application/json' \ | ||
-d '{"securityProfile": 1, "base64SHA256Password": "3oGi4B5I+Y9iEkYtL7xvuUxrvGOXM/X2LQrsCwf/knA="}' | ||
elif [[ "$DEMO_VERSION" =~ sp3 ]]; then | ||
echo "MaEVe CSMS started, adding charge station with Security Profile 3 (note: profiles in MaEVe start with 0 so SP-2 == OCPP SP-3)" | ||
curl http://localhost:9410/api/v0/cs/cp001 -H 'content-type: application/json' -d '{"securityProfile": 2}' | ||
fi | ||
|
||
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" | ||
}' | ||
|
||
curl http://localhost:9410/api/v0/token -H 'content-type: application/json' -d '{"countryCode": "UK", "partyId": "Switch", "contractId": "UKSWI123456789G", "uid": "UKSWI123456789G", "issuer": "Switch", "valid": true, "cacheMode": "ALWAYS"}' | ||
fi | ||
|
||
echo "API calls to CSMS finished, starting EVerest..." |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All of this needs to be re-added into the MaEVe section. You can just copy and paste all of it into line 147, although please don't include the fi
on line 338.
Signed-off-by: thanaParis <[email protected]>
Signed-off-by: thanaParis <[email protected]>
Signed-off-by: Christian Weissmann <[email protected]>
eb7c43a
to
0b1584a
Compare
Signed-off-by: Christian Weissmann <[email protected]>
@louisg1337 the issues with maeve have been fixed! the add-charger.sh script was expanded to add-charger-and-rfid-card.sh and now adds an idToken to CitrineOS with value 'DEADBEEF' and type 'ISO14443'. |
@louisg1337 in the absence of github actions, can you please try to rerun this for both MaEVe and Citrine? I can then merge this. @MukuFlash03 for an example of what the lack of GH actions is doing 😦 |
I can confirm everything works as expected now. I tested both Citrine and MaEVe and they both posted |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great, thanks again for getting this in to us!
feat: add general citrine support with own device-model. Run bash command with argument
-c
.Testing done:
Used local branch to test before pushing to remote
./demo-iso15118-2-ac-plus-ocpp.sh -2 -c -r $(pwd) -b feature/add-citrine-support-signedoff
Adding charger successfully: