You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Re: Implementation of ClearCache and AuthorizationCache functionalities #428
I didn't find any function that implements the "Clear Cache" OCPP feature, also on enabling the "AuthorizationCacheEnabled" key nothing happens as such, so do we have to create an Authorization Cache or is there any other way we can achieve this particular functionality.
Also "AuthorizeRemoteTxRequests", "LocalAuthorizeOffline", "LocalPreAuthorize" configuration key implementation.
@matth-x can you please guide me as to how can I implement these above features?
Also anyone else knows the solution please share your thoughts.
AuthorizationCache is currently not supported, only LocalAuthLists.
To implement it, you need to implement NFC based authorization in firmware. Then you can build a list of known idTags. After NFC swipe, check if the idTag exists in the list and still valid, and if not, send an Authorize request like here:
if (strcmp("Accepted", idTagInfo["status"] | "UNDEFINED")) {
The Authorization confirmation handler needs to contain the logic to update the local cache and to initiate the transaction if all looks good using beginTransaction_authorized(...)
The ClearCache command needs to be overridden in the firmware. There are plenty of examples in the unit tests, in general it looks like this:
There are a few examples in the MicroOCPP source code about Configurations. I would recommend searching for similar functionality in the source, and then copy and paste the necessary to the outer firmware integration.
Activity
matth-x commentedon Nov 11, 2025
AuthorizationCache is currently not supported, only LocalAuthLists.
To implement it, you need to implement NFC based authorization in firmware. Then you can build a list of known idTags. After NFC swipe, check if the idTag exists in the list and still valid, and if not, send an Authorize request like here:
MicroOcpp/src/MicroOcpp/Model/ConnectorBase/Connector.cpp
Lines 789 to 801 in da3428a
The Authorization confirmation handler needs to contain the logic to update the local cache and to initiate the transaction if all looks good using
beginTransaction_authorized(...)The ClearCache command needs to be overridden in the firmware. There are plenty of examples in the unit tests, in general it looks like this:
MicroOcpp/tests/Reset.cpp
Lines 53 to 62 in da3428a
To check for the OCPP Configurations, use the Configuation API for existing Configurations:
MicroOcpp/src/MicroOcpp/Core/Configuration.h
Line 29 in da3428a
Or if you need to add new Configurations:
MicroOcpp/src/MicroOcpp/Core/Configuration.h
Line 22 in da3428a
There are a few examples in the MicroOCPP source code about Configurations. I would recommend searching for similar functionality in the source, and then copy and paste the necessary to the outer firmware integration.