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

[FEATURE REQUEST] Add vehicle status in notifications #541

Open
edwinvandenbelt opened this issue Mar 13, 2024 · 5 comments
Open

[FEATURE REQUEST] Add vehicle status in notifications #541

edwinvandenbelt opened this issue Mar 13, 2024 · 5 comments
Assignees
Labels
WT1 To be discussed at the next meeting
Milestone

Comments

@edwinvandenbelt
Copy link
Collaborator

Is your feature request related to a problem? Please describe.

The MP can request operations on a leg, to change the status (like set_in_use). It is not possible for the TO to notify the MP (and end user) on a clear, uniform way the status of the asset (like 'it is unlocked now').

Urgency

Major (the TOMP API works as advertised but this is really necessary to implement), because this is standardisable.

Additional context

The status lock of the bike is remotely monitored, and standardized messages of the status of the asset should be send to the MP.

Describe the solution you'd like

Add new notificationTypes: corresponding with the leg status, including some more details like 'locked' and 'unlocked'

Describe alternatives you've considered

Call /legs/{id}/events on the MP side, but this has another meaning

Possible Implementation

Add to notification.type: LOCKED, UNLOCKED, PAUSED, PREPARING, IN_USE, RESUMED, FINISHING, FINISHED (and maybe some additional ones for support use cases?)

@edwinvandenbelt edwinvandenbelt added the WT1 To be discussed at the next meeting label Mar 13, 2024
@edwinvandenbelt edwinvandenbelt added this to the 1.6 milestone Mar 13, 2024
@matt-wirtz
Copy link
Collaborator

Trying to make the sequence of the proposed new notification type more clearly. I had in mind a bike with a lock that can be closed manually. Generally should be transferable to a car as well.
I still don't really see how this could improve the UX. With the response to SET_IN_USE the TO can already give a definite answer if the unlocking of the vehicle was successful or not. Is there an additional notification helpful?
tomp_issue541_vehicle_status_in_notification

@edwinvandenbelt
Copy link
Collaborator Author

edwinvandenbelt commented Mar 21, 2024 via email

@matt-wirtz
Copy link
Collaborator

Hi Edwin,
yes there are locking systems - I think especially for bikes - where the lock does not snap open when it's unlocked. Typically there is a bolt or pin blocking the wheel from spinning which has to be removed by the user manually. And this can only be done, when the bolt has been unlocked.
I think in this case it should be part of the process identifiers like UNLOCK_TRUNK or TAKE_HELMET. There could be an additional identifier e.g. REMOVE_LOCKING_BOLT or UNLOCK_BIKE. Maybe UNLOCK_BIKE would be better because there is already an UNLOCK_LOCKER and UNLOCK_TRUNK. Does that make sense?
And yes, I stopped with my sequence diagram in the middle of the trip execution when I realized that the notifications don't add any value. At least I should have put some points at the end (...) indicating that I omitted some parts.

@matt-wirtz
Copy link
Collaborator

@zerwuff Hi! We discussed this issue at our last WT meeting. If we understand it correctly it's related to manually operated bike locks where typically there is a bolt or pin blocking the wheel from spinning which has to be removed by the user manually. And this can only be done, after the bolt/pin has been unlocked remotely.
The process of remotely unlocking is taking time and should/can not be safely completed in between the calls of /legs/{id}/events { "event": "SET_IN_USE" } and it's response. Therefore the initial idea to later send a notification once the lock was remotely unlocked is logically.
The problem we see is that in this case the response to /legs/{id}/events { "event": "SET_IN_USE" } would be a 200 { leg object: "state": "IN_USE" } which indicates to the MP that the bike is "IN_USE", it's unlocked and can be used. But that is not the case since the unlocking takes more time.
We therefore suggest to not make use of notifications but rather wait to send the 200 { leg object: "state": "IN_USE" } response until the lock has been remotely unlocked. See the sequence diagram below.
Would this be a solution for your case?

tomp_issue541_manually_operated_bike_locks

@zerwuff
Copy link

zerwuff commented Apr 2, 2024

hello @matt-wirtz, this looks much simpler. As i understood, the idea is not to push any notifications back from TO to MP, but let the MP use long polling the TO until the TO response switches from 503 to 200. This would indicate that the set in use process has been 2-face-commited by the end user (open-lock) and the ride is ready to go (CONFIRMED).
I think this would solve our problem, thanks a lot

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
WT1 To be discussed at the next meeting
Projects
Status: In progress
Development

No branches or pull requests

3 participants