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

💄 ⚡Add grid integration using node-red #91

Merged
merged 10 commits into from
Nov 18, 2024
2 changes: 1 addition & 1 deletion .env
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
TAG=0.0.20
TAG=0.0.21

EVEREST_MANAGER_CPUS='1.0'
EVEREST_MANAGER_MEMORY='1024mb'
4 changes: 0 additions & 4 deletions demo-iso15118-2-ocpp-201.sh
Original file line number Diff line number Diff line change
Expand Up @@ -129,10 +129,6 @@ docker cp manager/config-sil-ocpp201-pnc.yaml everest-ac-demo-manager-1:/ext/so
docker exec everest-ac-demo-manager-1 rm /ext/dist/share/everest/modules/OCPP201/component_config/custom/EVSE_2.json
docker exec everest-ac-demo-manager-1 rm /ext/dist/share/everest/modules/OCPP201/component_config/custom/Connector_2_1.json

echo "Configuring and restarting nodered"
docker cp nodered/config/config-sil-iso15118-ac-flow.json everest-ac-demo-nodered-1:/config/config-sil-iso15118-ac-flow.json
docker restart everest-ac-demo-nodered-1

if [[ "$DEMO_VERSION" =~ sp2 || "$DEMO_VERSION" =~ sp3 ]]; then
docker cp manager/cached_certs_correct_name_emaid.tar.gz everest-ac-demo-manager-1:/ext/source/build
docker exec everest-ac-demo-manager-1 /bin/bash -c "pushd /ext/source/build && tar xf cached_certs_correct_name_emaid.tar.gz"
Expand Down
2 changes: 2 additions & 0 deletions docker-compose.ocpp201.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ services:
mqtt-server:
image: ghcr.io/everest/everest-demo/mqtt-server:${TAG}
platform: linux/x86_64
ports:
- 2727:1883 # (CSCS)
logging:
driver: none

Expand Down
2 changes: 1 addition & 1 deletion maeve/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ services:
target: /mosquitto/config
read_only: true
ports:
- "1883:1883"
- "2767:1883" # CSMS
- "9000:9000"
user: "10000:10000"
healthcheck:
Expand Down
1 change: 1 addition & 0 deletions manager/demo-patch-scripts/apply-compile-patches.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@
echo "Applying compile-time patches"

cd / && patch -p0 -i /tmp/demo-patches/enable_iso_dt.patch
cd / && patch -p1 -i /tmp/demo-patches/composite_schedule_fixes.patch
34 changes: 34 additions & 0 deletions manager/demo-patches/composite_schedule_fixes.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
diff --git a/modules/API/API.cpp b/modules/API/API.cpp
index 68c4900d..03425dc4 100644
--- a/ext/source/modules/API/API.cpp
+++ b/ext/source/modules/API/API.cpp
@@ -573,6 +573,7 @@ void API::init() {
if (this->r_ocpp.size() == 1) {

this->r_ocpp.at(0)->subscribe_is_connected([this](bool is_connected) {
+ EVLOG_info << "Received OCPP connection status callback with is_connected: " << is_connected;
std::scoped_lock lock(ocpp_data_mutex);
if (is_connected) {
this->ocpp_connection_status = "connected";
@@ -582,6 +583,7 @@ void API::init() {
});

this->r_ocpp.at(0)->subscribe_charging_schedules([this, &var_ocpp_schedule](json schedule) {
+ EVLOG_info << "Received OCPP charging schedule update: " << schedule;
std::scoped_lock lock(ocpp_data_mutex);
this->ocpp_charging_schedule = schedule;
this->ocpp_charging_schedule_updated = true;
diff --git a/modules/OCPP201/OCPP201.cpp b/modules/OCPP201/OCPP201.cpp
index 83f2324b..8eb7900f 100644
--- a/ext/source/modules/OCPP201/OCPP201.cpp
+++ b/ext/source/modules/OCPP201/OCPP201.cpp
@@ -1181,6 +1181,9 @@ void OCPP201::process_deauthorized(const int32_t evse_id, const int32_t connecto
}

void OCPP201::publish_charging_schedules(const std::vector<ocpp::v201::CompositeSchedule>& composite_schedules) {
+ EVLOG_info << "About to publish composite charging schedules: ";
+ for (ocpp::v201::CompositeSchedule cs: composite_schedules)
+ EVLOG_info << cs << '\n';
const auto everest_schedules = conversions::to_everest_charging_schedules(composite_schedules);
this->p_ocpp_generic->publish_charging_schedules(everest_schedules);
}
Loading