Giter Site home page Giter Site logo

ocpp-csms's Introduction

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

ocpp-csms's People

Contributors

fulup-bzh avatar

Stargazers

Julien Herr avatar Sylwester Lachiewicz avatar Barry yuan avatar

Watchers

ronan [iot.bzh] avatar Stephane Desneux avatar benierc avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.