MicroOcpp icon indicating copy to clipboard operation
MicroOcpp copied to clipboard

Unable to Remote Start Transaction strangely one day

Open chandan-ultraviolette opened this issue 1 year ago • 3 comments

I am using OCPP 1.6J stack. All working fine but one day I started the setup and sent the RemoteStartTransaction command but stack was rejecting it. Later after debug, I found out connector->getTransaction() was returning the non zero value due to same, stack was rejecting the request and printing "No connector to start transaction". When I request for connector status, connector was available with no error.

I restarted the system but again issue. May be transaction data was stored in non volatile memory and loaded back, any suggestion on solving this ?

Logs are as below

MOCPP:loadJson 81: doc: {"session":{"active":false,"idTag":"1aVz2y3srmPSTYE3s8WC","authorized":true,"timestamp":"2024-06-11T07:57:25.330Z"},"start":{"requested":true,"confirmed":true,"meter":0,"timestamp":"2024-06-11T07:57:25.367Z","bootNr":1,"transactionId":35304794},"stop":{"requested":true,"idTag":"1aVz2y3srmPSTYE3s8WC","meter":93,"timestamp":"2024-06-11T07:58:26.526Z","bootNr":1,"reason":"EVDisconnected"}}

image

"MOCPP:Connector 61: 80ab0890": 0x80ab0890 is address of transaction which is assigned in the connector constructor.

image

chandan-ultraviolette avatar Jun 11 '24 07:06 chandan-ultraviolette

Now this issue is occurring all the time after rebooting post stop charging session.

chandan-ultraviolette avatar Jun 11 '24 13:06 chandan-ultraviolette

I believe this is due to a regression bug which has already been resolved. Did you already upgrade to v1.1?

Nevertheless, the connector would still report to be Available in similar circumstances (while the connector is blocked by a stale transaction). I changed this behavior so that it sends Finishing, to make similar malicious behavior easier to track down.

matth-x avatar Jun 15 '24 13:06 matth-x

@matth-x I found the bug. Basically, after stopping the charging, I was accessing the tx-connector_id-txNo.jsn file and uploading it to the cloud. During this time, the OCPP stack was updating the complete field in the tx-connector_id-txNo.jsn file after receiving confirmation from the OCPP CMS. As a result, it was unable to update. Therefore, once I restarted the system, the OCPP stack still considered the last session as not over.

I have to handle this issue in firmware.

Also I didn't update to v1.1 as I didn't lots of changes in OCPP stack based on my firmware requirement, can you suggest which file you modified for the changes related to same? So I can manually modify it.

chandan-ultraviolette avatar Jun 15 '24 15:06 chandan-ultraviolette