steve-community / steve

SteVe - OCPP server implementation in Java

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

reservationId=0 being synonymous with "null" in StartTransaction

goekay opened this issue · comments

Checklist

  • I checked other issues already and found no answer
  • I checked the documentation and found no answer
  • I am running the latest version and the feature i am requesting is not implemented there

Describe the problem you are trying to solve

In StartTransaction messages, some charging stations seem to set reservationId=0 to communicate that there is no reservation reference. Actually, reservationId is nullable and therefore this attribute can be omitted from payload.

This is a charging station misbehaviour. But it can be fixed (worked around) easily without harming the integrity of the business flows. Our valid reservation ids are coming from a database sequence (PK) and start with 1 anyways. So, there is no overlap between the value ranges.

Describe the solution you'd like

Treat reservationId=0 the same as reservationId=null

Describe alternative solutions or features you've considered

Leave it as is. It does not harm the behaviour. We are just logging warnings that cause noise and might be annoying.

Additional context

...