lorenzodonini / ocpp-go

Open Charge Point Protocol implementation in Go
MIT License
262 stars 125 forks source link

Allow StopTransaction with negative meterStop #114

Closed guelfey closed 3 years ago

guelfey commented 3 years ago

Some charging points send -1 there if the value is unknown. Definitely unexpected, but I actually can't find anything in the spec that excplicitly says that the value has to be positive (although it's reasonable to expect it from a meter reading). In any case, the spec explicitly says that the CS shouldn't reject a StopTransaction even if sanity checks fail, and this validation prevents the ocpp-go user from deciding for themselves.

lorenzodonini commented 3 years ago

Fair point, thanks for fixing this!