Skip to content

tux-evse/ocpp-csms

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

OCPP test with maeve-csms/podman

Dependencies

Config

csms-host: should point to ip-addr of the containers pod (edit /etc/hosts)

  • privileged: set 'csms-host' to a valid ip-addr within podman bridge
  • unprivileged: set 'csms-host' as an alias to localhost

rebuilding & start docker containers

Build and start podman maeve-csms containers. The script should work for both privileged and un-privilege Podman mode. MAEVE_SRCDIR should point to the git clone of maeve-csms project.

if not config/certificates/csms.pem is not present, the script should regenerate both TLS and https://hubject.stoplight.io certificates. (check https://hubject.stoplight.io/ for further information)

MAEVE_SRCDIR=../maeve-csms ./podman-maeve-start.sh

Check containers are up and running

podman ps -f pod=csms-pod

Testing ocpp-csms connectivity

Create a charger entry. Note: default config use in-memory store that is wiped out each time you restart the pod.

PWD_ASCII="snoopy"
PWD_BASE64=`echo -n $PWD_ASCII | openssl dgst -sha256 -binary | openssl base64`
curl http://csms-host:9410/api/v0/cs/Tux-Basic -H 'content-type: application/json' -d "{\"securityProfile\":0, \"base64SHA256Password\":\"$PWD_BASE64\"}"

Check your charger-id is visible from csms service.

curl http://csms-host:9410/api/v0/cs/Tux-Basic/auth

Start an OCPP client connection. Test directory hold a simple client test based on ocpp-rpc for OCPP-1.6.

cd test
npm install
node client-test.js

Warning: default config use in RAM storage and charger-id are deleted at each restart of the csms containers. When having a 404/authorize error make sure your have provision the charger-id with the right profile and passwd access.

Debug

Access csms-gateway log

podman stop csms-gateway
podman start -a csms-gateway

Access all containers log

podman pod logs -f csms-pod

Enter Debug container. To check pod configuration from inside your may enter the debug container.

podman exec -it csms-debug sh

About

Podman config for an ocpp-csms based on maeve-csms

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published