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

FormatViolation serialization bug with OCPP 1.6-J #381

Closed
rtrbt opened this issue Oct 14, 2022 · 2 comments
Closed

FormatViolation serialization bug with OCPP 1.6-J #381

rtrbt opened this issue Oct 14, 2022 · 2 comments
Labels
bug Something isn't working

Comments

@rtrbt
Copy link

rtrbt commented Oct 14, 2022

While testing my OCPP Charge Point implementation I've noticed that https://github.com/lbbrhzn/ocpp that in turn uses this library sends FormatViolation errors with the error code set to "FormatViolation". While this looks correct at first glance, the spec spells this error code as "FormationViolation" and the OCPP 1.6-J Errata sheet states

Incorrect name in enum: FormationViolation
Old text FormationViolation
New text FormatViolation
Do not fix, this is a message level change, might break implementations
Note: In the next version of OCPP we will add the correct spelling and make the incorrect (typo) value
deprecated.

under section "5. Known issues that will not be fixed -> 5.2"

By the way, the other issue that will not be fixed (5.1) is a typo in the error code Occu_rr_enceConstraintViolation that is spelled as "Occu_r_enceConstraintViolation". I've only found the wrong (i.e. OCPP 1.6-J compatible) spelling in your repo, so maybe this is broken in OCPP 2.0? (Assuming that OCPP 2.0 fixed this.)

@Jared-Newell-Mobility Jared-Newell-Mobility added the bug Something isn't working label Sep 8, 2023
@Jared-Newell-Mobility
Copy link
Contributor

Jared-Newell-Mobility commented Oct 16, 2023

Thanks for highlighting this; OCPP 2.0.1 has corrected this, which makes the incorrect (typo) value deprecated.

CALLERROR(OccurenceConstraintViolation)
CALLERROR(FormatViolation)

@rtrbt
Copy link
Author

rtrbt commented Oct 16, 2023

Yes, but in OCPP 1.6 (which the README states as supported), "FormationViolation" has to be sent.

Currently

code = "FormatViolation"
is used while speaking both OCPP 1.6 and 2.0(.1) but in OCPP 1.6 this is wrong.

Jared-Newell-Mobility added a commit that referenced this issue Oct 24, 2023
In OCPP 1.6, two errors were misspelled. "FormationViolation" Error
should be "FormatViolation" Error, "OccurenceConstraintViolation" Error
should be "OccurrenceConstraintViolation" Error.

The OCA decided not to correct the spelling in OCPP 1.6, since that
would be a breaking change. FormationViolation has been fixed as of OCPP
2.0.1. OccurenceConstraintViolation Error is used for 1.6 and 2.0.1.
"OccurrenceConstraintViolation" Error is used for OCPP 2.1 and up.

This library doesn't support "FormationViolation" Error (for OCPP 1.6
and up)

This commit  adds support for those errors.

See the discussion at #381
and OCPP 1.6-J Errata sheet v1.0, section 5 "Known issues that won't be
fixed".
RoaringDev1203 added a commit to RoaringDev1203/Cratus-OCPP that referenced this issue Aug 27, 2024
In OCPP 1.6, two errors were misspelled. "FormationViolation" Error
should be "FormatViolation" Error, "OccurenceConstraintViolation" Error
should be "OccurrenceConstraintViolation" Error.

The OCA decided not to correct the spelling in OCPP 1.6, since that
would be a breaking change. FormationViolation has been fixed as of OCPP
2.0.1. OccurenceConstraintViolation Error is used for 1.6 and 2.0.1.
"OccurrenceConstraintViolation" Error is used for OCPP 2.1 and up.

This library doesn't support "FormationViolation" Error (for OCPP 1.6
and up)

This commit  adds support for those errors.

See the discussion at mobilityhouse/ocpp#381
and OCPP 1.6-J Errata sheet v1.0, section 5 "Known issues that won't be
fixed".
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Development

No branches or pull requests

2 participants