lorenzodonini / ocpp-go

Open Charge Point Protocol implementation in Go
MIT License
277 stars 126 forks source link

Altered auto-reconnection attempt logic to comply with part 4 of the OCPP2.0.1 standard #221

Closed Jonesywolf closed 1 year ago

Jonesywolf commented 1 year ago

According to part 4 of the OCPP2.0.1 standard: JSON over WebSockets implementation guide, section 5.3. Reconnecting, there are some configuration variables, specifically:

which dictate auto reconnection behaviour of the charge point. I have done my best to implement these changes and update the corresponding network test accordingly.

While the websocket code is shared between both OCPP versions, since OCPP1.6J (to my understanding) doesn't specify auto reconnection behaviour, it shouldn't be incompatible.

Jonesywolf commented 1 year ago

This is not quite ready yet, will reopen when it's more fully tested.

Jonesywolf commented 1 year ago

I got toxiproxy working, this code should at least pass the pipeline and worked in our implementation.

Jonesywolf commented 1 year ago

Hi Lorenzo, I'm happy to contribute, thank you for making such a fantastic open source library. As far as both your comments go, you're totally right, they were both oversights on my part, I'm glad you caught them. Both should be resolved by commit c5ef78b

Please let me know if you have any more suggestions or find anything else I missed.

lorenzodonini commented 1 year ago

LG2M, merged 👍