steve-community / steve-plugsurfing

SteVe with PlugSurfing (https://www.plugsurfing.com) integration using their interface OIOI (http://docs.plugsurfing.com/)
GNU General Public License v3.0
8 stars 6 forks source link

Inaccessible charge point after a missed remote start #1

Closed goRaspy closed 8 years ago

goRaspy commented 8 years ago

When a remote start is done by PS app and the user do not "really" start the charge (wrong charge point or car never connected). Or when the user "stop" transaction directly by unplug the cable and not by remote.

In these cases, the user is lock in a strange situation. PS app think the plug is still in transaction and if the user press the "stop" button in PS he get an error and is not able to use the charge point before a clear cache or desinstall / reinstall app.

There is a possibility that the issue come from Plugsurfing but I suspect that Steve do not send/confirm stop informations :

goekay commented 8 years ago

In these cases, the user is lock in a strange situation. PS app think the plug is still in transaction and if the user press the "stop" button in PS he get an error and is not able to use the charge point before a clear cache or desinstall / reinstall app.

hmm, since you are saying that the user can continue using the station, if he/she "clears cache or desinstalls / reinstalls app", i assume the problem is related to the mobile app or plugsurfing.

@apheleia, do you have any idea? do you have communication logs at your side to debug the situation?

@goRaspy, can you provide log files (preferably in private)?

goekay commented 8 years ago

steve, actually, should able to handle all 4 permutations of local/remote transaction start/stop events:

plus, since recently remotely started but unused (cable not plugged in) transactions are closed after 30 seconds, and reported to ps. but still... there might be an edge case we did not consider, or a charging station which misbehaves (interprets the events differently or has a different logic than what's expected).

but we need some data (read: logs) to look into the issue.

goekay commented 8 years ago

we looked at the logs, and could reproduce the "problem". it's not a fault of steve actually. here are the events that occur:

  1. remotely start a session (and do not start charging/transaction)
  2. steve correctly expires/stops the session after the timeout period and sends a session-post to plugsurfing
  3. but the ps mobile app does not disable "stopping the session" for this stopped session, and can send a session-stop
  4. steve does not allow the session-stop operation (because already stopped)

the thing that we changed with the latest commit was sending a more appropriate error message for this case. i think we can close this issue.

schemar commented 8 years ago

Thanks @goekay. We'll see if we can handle the "more appropriate error message" accordingly.

goRaspy commented 8 years ago

Many thanks to both of you. I'll try asap.

goekay commented 8 years ago

We'll see if we can handle the "more appropriate error message" accordingly.

the following is the added error response:

https://github.com/RWTH-i5-IDSG/steve-plugsurfing/blob/master/src/main/java/de/rwth/idsg/steve/extensions/plugsurfing/rest/ResourceImpl.java#L149