Conversation
… (WebSocket URL path), register in newSession() as BootNotification isn't always sent. Signed-off-by: Peter Rosenberg <prosenb.dev@gmail.com>
Signed-off-by: Peter Rosenberg <prosenb.dev@gmail.com>
splatch
left a comment
There was a problem hiding this comment.
I'm mostly fine with changes, but I am not sure if it will not impact other brands. Seem that spec is not strictly followed by many manufacturers, so maybe we should switch everything to rely on serial number. Thing is - then we can't distinguish multiple connections made by one charger. In such situation I think we should detect duplicate and close previous session. WDYT?
| // Register session immediately on connect, don't wait for BootNotification | ||
| // as some chargers sends the BootNotification only if the charger is rebooted. | ||
| String identifier = information.getIdentifier(); | ||
| if (identifier != null && identifier.startsWith("/")) { |
There was a problem hiding this comment.
I'm not certain of this logic, should we be at all concerned about what comes in the identifier? Does your charger send inconsistent identifier?
There was a problem hiding this comment.
Yes, when my charger connects, the identifier is preceded with /. If we don't remove it here, we force the user to also specify the identifier with a preceded / in case of my charger..
Do you have in mind to de-duplicate on the |
I have only a faulty simulator to test things, I'll try to move forward on top of your commit. So you will be able to to test one more change from me later on. |
chargerPointSerialNumbertoserialwhich is OCPP Identityocpp-j-1.6-specification.pdfin 3.1.1. The spec fileocpp-1.6 edition 2.pdfdescribes the BootNotification request parameterchargePointSerialNumberasOptional. For these reasons, I feel we should useserial(OCPP Identify).newSession()as some chargers like the Ocular IQ Home Solar only sends the BootNotification message when the charger restarts.