Skip to content
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

How to send the CALLERROR message from server to client in handleStatusNotificationRequest() function #350

Open
lgc1993-CN opened this issue Jun 5, 2024 · 1 comment

Comments

@lgc1993-CN
Copy link

In the official document, as shown in the image, there is a situation where the server needs to return CALLERROR:SecurityError. However, I found the only type of handleStatusNotificationRequest() function is StatusNotificationResponse. Can someone show me an example of callerror response implement?
image

robert-s-ubi added a commit to ubitricity/Java-OCA-OCPP that referenced this issue Jun 28, 2024
OCPP 2.0.1 requires a CALLERROR: SecurityError response from the CSMS
if the Charging Station sends a request before having been accepted.

Implement a mechanism to send this response, by throwing the newly
added SecurityErrorException in the message handler of a disallowed
request.

This fixes issue ChargeTimeEU#350.
@robert-s-ubi
Copy link
Contributor

This pull request should close the gap. In your handleStatusNotificationRequest() implementation, add:

throw new SecurityErrorException("The charging station has not been accepted yet.");

at the point where you determine that it is not in the correct registration state, and the library will take care of sending that back as a CALLERROR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants