Open the-bay-kay opened 1 month ago
Now that we've got a 90% working demo, there are several steps we need to take in order to make this production worthy / "showroom" worthy. Below is a list of the changes that need to take place in order to finish this current iteration (roughly in order):
There are some other ways in which we can improve this functionality. Because these projects have a much larger scale (implementing entirely new portions of ISO15118), I've separated them out into their own list.
... Add Option to skip mid-charge selection
Facing a bizarre issue trying to implement this. Below is a video: TL;DR, the MQTT exchange I've set up works perfect the first time the Node-RED UI is loaded, and then fails subsequent charging sessions.
I've spent a few hours trying fixes -- this issue has never occurred with the algorithm selection process, which made me think it was a timing issue. Delaying the messages to avoid race conditions (e.g., node-red publication prior to simulator subscription), re-arranging messages, and none of it seems to work.... will update accordingly once I find the cause.
We've made the change to selecting our algorithm prior to the charging session (as opposed to during the PowerDeliveryReq handshake). While this works most of the time, we're still running into the bizarre issue described in my last comment.
EDIT: It seems my intuition was correct, but my method of execution was wrong. Adding a Node-Red "Delay" node fixed the issue, no need to futz with setTimeout()
. Keeping the text below for debugging context!
I've included a timing chart with my current theory as to the cause of this issue. Because of the behavior when re-publishing the message, I believe the issue may be that we subscribe to the confirm
message after it has already been sent -- this "race condition: then causes us to stall out. I'm not sold this is the cause, as adding a delay to the confirmAlgorithm()
does not eliminate this bug. Likewise, I'm confused as to why re-deploying Node-RED "fixes" the issue temporarily. I don't have many leads yet, but I will continue to diagnose...
Context
This PR builds off @shankari and I's work in Issue #64 . This work will be done on the functional DepartureTime demos.
High Level Goal:
... to present the user with multiple charging profiles, which they then can select and use for their current charging session
Subsequent Goals:
Edit: Updated timeline to reflect 2-week sprint goals. Multiple SASchedules is a stretch goal, implementation of power curve selection is higher priority.
EDIT 2: Changed goals to reflect implementation adjustments.