Conversation
Signed-off-by: thanaParis <thana.paris@s44.team>
Signed-off-by: <>
…location Signed-off-by: thanaParis <thana.paris@s44.team>
Signed-off-by: <>
Signed-off-by: thanaParis <thana.paris@s44.team>
Signed-off-by: thanaParis <thana.paris@s44.team>
ChrisWeissmann
left a comment
There was a problem hiding this comment.
I want to be sure I understand how this works:
The directus extensions offers an API that can get hit when a charger opens a web socket connection.
To get this update, on commissioning/adding the charger to the location we make a http request to citrine on the endpoint provided by @AsDataEndpoint(Namespace.Subscription, HttpMethod.Put)
This keeps track of the subscriptions in an array with the associated callback actions to take.
What I don't quite grasp is if we are going to run into a problem scaling horizontally, as the callbacks seem to be held in an array in memory.
Is this correct?
directus-extension-charging-stations-bundle/src/hook-on-create-charging-station/index.ts
Outdated
Show resolved
Hide resolved
You do understand how it works, and this is a good point. I'll need to make the subscription api persistent. |
|
@ChrisWeissmann PR opened to make subscriptions persistent: #66 |
…nment. Signed-off-by: thanaParis <thana.paris@s44.team>
Signed-off-by: thanaParis <thana.paris@s44.team>
Signed-off-by: <>
directus-extension-charging-stations-bundle/src/endpoints-charging-stations/index.ts
Show resolved
Hide resolved
Signed-off-by: thanaParis <thana.paris@s44.team>
DirectusExtensions/charging-stations-bundle/src/endpoints-charging-stations/index.ts
Show resolved
Hide resolved
DirectusExtensions/charging-stations-bundle/src/hook-on-create-charging-station/index.ts
Show resolved
Hide resolved
Signed-off-by: <>
Signed-off-by: thanaParis <thana.paris@s44.team>
…h check for directus to docker compose, changed directus config from js to commonjs Signed-off-by: thanaParis <thana.paris@s44.team>
lydiazcheng
left a comment
There was a problem hiding this comment.
The change looks good!
DirectusExtensions/charging-stations-bundle/src/display-true-count/display.vue
Show resolved
Hide resolved
DirectusExtensions/charging-stations-bundle/src/display-true-count/display.vue
Outdated
Show resolved
Hide resolved
…ount/display.vue Co-authored-by: lydiazcheng <lydiazcheng@users.noreply.github.com> Signed-off-by: thanaParis <83840862+thanaParis@users.noreply.github.com>
Signed-off-by: thanaParis <thana.paris@s44.team>
…m/citrineos/citrineos-core into feature/station-connection-status Signed-off-by: <>
Work In Progress, opening to review early
Changes:
DirectusExtensions/charging-stations-bundleaddeda) Custom display "Present or True Count" added, which displays total number of rows with a value that is present, if non-boolean column, or true, if boolean column
b) Custom endpoint "POST /charging-stations/update-station-status" which updates isOnline in response to events POSTed from CitrineOS's OcppRouter Subscription API
c) Custom hook "On Create Charging Station" which subscribes new stations to connect and close events via CitrineOS's OcppRouter Subscription API
Misc:
Missing @column annotation added in ChargingStations data model
Unused images in Server/data/directus/uploads removed
A config.js file was added to Directus via CONFIG_PATH env var to provide necessary context for custom extensions, such as the OcppRouter's url, subscription api path, Directus's url, and the custom update-station-status api path