jerome-benoit / e-mobility-charging-stations-simulator

OCPP-J charging stations simulator
Apache License 2.0
3 stars 3 forks source link

[FEATURE] Save authorization tokens to be reused after simulator restart #196

Closed mocotrah closed 2 years ago

mocotrah commented 2 years ago

Following the evolution of token mechanism from sap emobility in regards to "initialization" and "authorization" tokens. The simulator will use initialization token (which can be 1 for all charging stations) and will receive from the server an authorization token which it keeps it in memory and uses it for further calls (start transaction, meter values, etc.). If we stop the simulator, the authorization token gets lost. The idea would be to save this authorization token in a file locally and reused when starting the simulator. This file would be some kind of set or map containing the charging station name (or some id) and the wss url containing the whole string. (example: "wss://ev-ocpp-json-server.xxx.com/OCPP16/a208124a-4286-44be-9417-c06a2b99b881/u9wqWEx3/e8befa8b") where a208124a-4286-44be-9417-c06a2b99b881 is the tenant id u9wqWEx3/e8befa8b is the unique compiled key to identify the charging station

jerome-benoit commented 2 years ago

Saving the in memory OCPP parameters associated to a simulated charging station will also deal with that issue. It does not require more work than the proposal in that issue and is a generic feature: persistent OCPP parameters on simulated CS.

jerome-benoit commented 2 years ago

Version 1.1.55 implements the feature.