Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Network Connection Lost while Charging. Effect: Extra Energy Consumption by car. #387

Open
demirschmid61 opened this issue Nov 22, 2024 · 0 comments

Comments

@demirschmid61
Copy link

demirschmid61 commented Nov 22, 2024

Hi @matth-x and the team,

Thank you very much for the library. I have been using it for the past year and congratulate the team behind it.

I am facing one issue of extra energy consumption when the user selects a specific unit to charge. Still, due to network connectivity, the charger won't stop charging, as the charger is not connected to the server due to an internet issue. Hence the outcome of this particular problem is, vehicle will consume extra energy and user wallet balance can go to negative, even if the check is added on server side to trigger remoteStopTransaction req.

Please have a look at the logs.
////////////////////////////////////////////LOG STARTED//////////////////////////////////////////////
11:10:02.266 > [MO] Send: [2,"1000016","StatusNotification",{"connectorId":1,"errorCode":"NoError","status":"Available","timestamp":"2024-11-22T05:43:38.955Z"}]
11:10:02.503 > [MO] info (StatusNotification.cpp:52): New status: Preparing (connectorId 1)
11:10:02.677 > [MO] Recv: WS ping
11:10:02.980 > [MO] Recv: [3,"1000016",{}]
11:10:02.986 > [MO] Send: [2,"1000017","StatusNotification",{"connectorId":1,"errorCode":"NoError","status":"Preparing","timestamp":"2024-11-22T05:43:39.546Z"}]
11:10:03.283 > [MO] Recv: [3,"1000017",{}]
11:10:30.422 > [MO] Recv: WS ping
11:10:31.403 > [MO] Recv: WS ping
----------------------------RemoteStartTransaction Request trigger with the energy of 30 Whr------------------------
11:10:32.889 > [MO] Recv: [2,"1a86e1bc-c4bf-4fca-bfe5-7693c87901f2","RemoteStartTransaction",{"connectorId":1,"idTag":"dip8806558451"}]
11:10:33.507 > [MO] Send: [3,"1a86e1bc-c4bf-4fca-bfe5-7693c87901f2",{"status":"Accepted"}]
11:10:33.515 > [MO] Send: [2,"1000019","Authorize",{"idTag":"dip8806558451"}]
11:10:33.801 > [MO] Recv: [3,"1000019",{"idTagInfo":{"status":"Accepted"}}]
11:10:33.808 > [MO] info (Authorize.cpp:39): Request has been accepted
11:10:33.886 > [MO] info (Connector.cpp:280): Session mngt: trigger StartTransaction
11:10:34.103 > [MO] info (StartTransaction.cpp:49): StartTransaction initiated
----------------------------meterStart=0----------------------------
11:10:34.115 > [MO] Send: [2,"1000020","StartTransaction",{"connectorId":1,"idTag":"dip8806558451","meterStart":0,"timestamp":"2024-11-22T05:44:10.938Z"}]
11:10:34.129 > [MO] info (StatusNotification.cpp:52): New status: Charging (connectorId 1)
11:10:34.417 > [MO] Recv: WS ping
11:10:34.450 > [MO] Recv: [3,"1000020",{"idTagInfo":{"status":"Accepted"},"transactionId":282333}]
11:10:34.729 > [MO] info (StartTransaction.cpp:143): Request has been accepted
11:10:35.009 > [MO] Send: [2,"1000021","StatusNotification",{"connectorId":1,"errorCode":"NoError","status":"Charging","timestamp":"2024-11-22T05:44:11.172Z"}]
11:10:35.339 > [MO] Recv: [3,"1000021",{}]
11:10:36.364 > [MO] Recv: WS ping
11:10:46.604 > [MO] Recv: WS ping
11:10:48.451 > [MO] Recv: WS ping
11:10:49.121 > [MO] Send: [2,"1000022","MeterValues",{"connectorId":1,"transactionId":282333,"meterValue":[{"timestamp":"2024-11-22T05:44:26.155Z","sampledValue":[{"value":"234.458","context":"Sample.Periodic","measurand":"Voltage","phase":"L1-N","location":"Outlet","unit":"V"},{"value":"0.440","context":"Sample.Periodic","measurand":"Current.Import","phase":"L1","location":"Outlet","unit":"A"},{"value":"0.850","context":"Sample.Periodic","measurand":"Energy.Active.Import.Register","phase":"L1","location":"Outlet","unit":"Wh"},{"value":"103.000","context":"Sample.Periodic","measurand":"Power.Active.Import","phase":"L1","location":"Outlet","unit":"W"},{"value":"32.000","context":"Sample.Periodic","measurand":"Temperature","location":"Body","unit":"Celsius"}]}]}]
11:10:49.468 > [MO] Recv: [3,"1000022",{}]
11:18:10.413 > [MO] Recv: WS ping
11:18:19.454 > [MO] Send: [2,"1000056","MeterValues",{"connectorId":1,"transactionId":282333,"meterValue":[{"timestamp":"2024-11-22T05:51:56.484Z","sampledValue":[{"value":"234.943","context":"Sample.Periodic","measurand":"Voltage","phase":"L1-N","location":"Outlet","unit":"V"},{"value":"0.440","context":"Sample.Periodic","measurand":"Current.Import","phase":"L1","location":"Outlet","unit":"A"},{"value":"26.479","context":"Sample.Periodic","measurand":"Energy.Active.Import.Register","phase":"L1","location":"Outlet","unit":"Wh"},{"value":"103.000","context":"Sample.Periodic","measurand":"Power.Active.Import","phase":"L1","location":"Outlet","unit":"W"},{"value":"33.000","context":"Sample.Periodic","measurand":"Temperature","location":"Body","unit":"Celsius"}]}]}]
11:18:19.837 > [MO] Recv: [3,"1000056",{}]
11:18:20.451 > [MO] Recv: WS ping
11:18:28.434 > [MO] Recv: WS ping
11:19:04.491 > [MO] Send: [2,"1000059","MeterValues",{"connectorId":1,"transactionId":282333,"meterValue":[{"timestamp":"2024-11-22T05:52:41.517Z","sampledValue":[{"value":"235.077","context":"Sample.Periodic","measurand":"Voltage","phase":"L1-N","location":"Outlet","unit":"V"},{"value":"0.441","context":"Sample.Periodic","measurand":"Current.Import","phase":"L1","location":"Outlet","unit":"A"},{"value":"29.168","context":"Sample.Periodic","measurand":"Energy.Active.Import.Register","phase":"L1","location":"Outlet","unit":"Wh"},{"value":"103.000","context":"Sample.Periodic","measurand":"Power.Active.Import","phase":"L1","location":"Outlet","unit":"W"},{"value":"33.000","context":"Sample.Periodic","measurand":"Temperature","location":"Body","unit":"Celsius"}]}]}]
11:19:18.364 > [MO] Recv: WS ping
11:19:19.239 > [MO] Send: [2,"1000060","Heartbeat",{}]
----------------------------Wifi connection lost----------------------------
11:20:00.705 > [MO] info (main.cpp:3935): OCPP Disconnected
11:23:03.770 > [MO] info (RequestQueue.cpp:45): operation timeout: MeterValues
11:24:04.627 > [MO] info (RequestQueue.cpp:45): operation timeout: MeterValues
11:24:16.876 > [MO] info (RequestQueue.cpp:45): operation timeout: MeterValues
11:24:47.337 > [MO] info (RequestQueue.cpp:45): operation timeout: MeterValues
11:25:02.568 > [MO] info (RequestQueue.cpp:45): operation timeout: MeterValues
11:25:19.686 > [MO] info (RequestQueue.cpp:45): operation timeout: MeterValues
----------------------------Want to stop charging when energy consumption is 30Whr----------------------------
11:26:18.715 > [MO] info (RequestQueue.cpp:45): operation timeout: MeterValues //Extra energy consume
11:26:49.178 > [MO] info (RequestQueue.cpp:45): operation timeout: MeterValues //Extra energy consume
11:27:19.638 > [MO] info (RequestQueue.cpp:45): operation timeout: MeterValues //Extra energy consume
11:27:22.150 > [MO] info (main.cpp:3944): OCPP Connected to url: /xz4s8
11:27:22.157 > [MO] Send: [2,"1000086","MeterValues",{"connectorId":1,"transactionId":282333,"meterValue":[{"timestamp":"2024-11-22T05:59:11.814Z","sampledValue":[{"value":"235.140","context":"Sample.Periodic","measurand":"Voltage","phase":"L1-N","location":"Outlet","unit":"V"},{"value":"0.441","context":"Sample.Periodic","measurand":"Current.Import","phase":"L1","location":"Outlet","unit":"A"},{"value":"51.313","context":"Sample.Periodic","measurand":"Energy.Active.Import.Register","phase":"L1","location":"Outlet","unit":"Wh"},{"value":"103.000","context":"Sample.Periodic","measurand":"Power.Active.Import","phase":"L1","location":"Outlet","unit":"W"},{"value":"34.000","context":"Sample.Periodic","measurand":"Temperature","location":"Body","unit":"Celsius"}]}]}]
11:27:22.519 > [MO] Recv: WS ping
11:27:22.681 > [MO] Recv: WS pong
11:27:22.931 > [MO] Recv: [3,"1000086",{}]
11:27:23.748 > [MO] Send: [2,"1000089","MeterValues",{"connectorId":1,"transactionId":282333,"meterValue":[{"timestamp":"2024-11-22T05:59:56.853Z","sampledValue":[{"value":"235.047","context":"Sample.Periodic","measurand":"Voltage","phase":"L1-N","location":"Outlet","unit":"V"},{"value":"0.441","context":"Sample.Periodic","measurand":"Current.Import","phase":"L1","location":"Outlet","unit":"A"},{"value":"53.946","context":"Sample.Periodic","measurand":"Energy.Active.Import.Register","phase":"L1","location":"Outlet","unit":"Wh"},{"value":"103.000","context":"Sample.Periodic","measurand":"Power.Active.Import","phase":"L1","location":"Outlet","unit":"W"},{"value":"34.000","context":"Sample.Periodic","measurand":"Temperature","location":"Body","unit":"Celsius"}]}]}]
11:27:24.161 > [MO] Recv: [3,"1000089",{}]
11:27:25.699 > [MO] Send: [2,"1000093","MeterValues",{"connectorId":1,"transactionId":282333,"meterValue":[{"timestamp":"2024-11-22T06:00:56.900Z","sampledValue":[{"value":"235.460","context":"Sample.Periodic","measurand":"Voltage","phase":"L1-N","location":"Outlet","unit":"V"},{"value":"0.441","context":"Sample.Periodic","measurand":"Current.Import","phase":"L1","location":"Outlet","unit":"A"},{"value":"57.497","context":"Sample.Periodic","measurand":"Energy.Active.Import.Register","phase":"L1","location":"Outlet","unit":"Wh"},{"value":"103.000","context":"Sample.Periodic","measurand":"Power.Active.Import","phase":"L1","location":"Outlet","unit":"W"},{"value":"34.000","context":"Sample.Periodic","measurand":"Temperature","location":"Body","unit":"Celsius"}]}]}]
11:27:25.764 > {"optype":201,"gunOut":32}[MO] Recv: [3,"1000093",{}]
11:27:26.721 > [MO] Recv: WS ping
11:27:30.407 > [MO] Recv: WS ping
-----------------As soon as charger got wifi connection, server triggers RemoteStopTransaction--------------------------
11:27:31.645 > [MO] Recv: [2,"47902fa4-301a-45b1-91e1-1fabb6ca7a32","RemoteStopTransaction",{"transactionId":282333}]
11:27:31.733 > [MO] Send: [3,"47902fa4-301a-45b1-91e1-1fabb6ca7a32",{"status":"Accepted"}]
11:27:31.740 > [MO] info (Connector.cpp:333): Session mngt: trigger StopTransaction
11:27:31.959 > [MO] info (StopTransaction.cpp:51): StopTransaction initiated
-----------PROBLEM: I want to stop at 30 Whr but, its stops at 58, extra energy consume is 28Whr------------------------
11:27:32.004 > [MO] Send: [2,"1000094","StopTransaction",{"meterStop":58,"timestamp":"2024-11-22T06:01:08.778Z","transactionId":282333,"reason":"Remote"}]
11:27:32.015 > [MO] info (StatusNotification.cpp:52): New status: Finishing (connectorId 1)
11:27:32.360 > [MO] Recv: [3,"1000094",{"idTagInfo":{"status":"Accepted"}}]
11:27:32.460 > [MO] info (StopTransaction.cpp:204): Request has been accepted!
11:27:32.559 > [MO] Send: [2,"1000095","StatusNotification",{"connectorId":1,"errorCode":"NoError","status":"Finishing","timestamp":"2024-11-22T06:01:09.043Z"}]
11:27:32.964 > [MO] Recv: WS ping
11:27:33.267 > [MO] Recv: [3,"1000095",{}]
11:27:34.502 > [MO] Recv: WS ping
----------------------------LOG ENDS----------------------------

My questions:

  1. Is there any configuration preset value I can use to stop charging even when the WebSocket connection lost between the charger and server
  2. Can the server send some preset value during the remoteStartTransaction request?
  3. Is this problem solved in the library, any configuration key I should enable for this?

Thank you very much @matth-x for your kind attention to this problem, waiting for your kind reply

@demirschmid61 demirschmid61 changed the title Network Connection Lost while Charging, outcome will be Extra Energy Consumption. Network Connection Lost while Charging. Effect: Extra Energy Consumption by car. Nov 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant