-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #94 from US-JOET/polish_and_finalize
🔧 configure limits in a way that is consistent and makes sense
- Loading branch information
Showing
8 changed files
with
153 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
TAG=0.0.21 | ||
TAG=0.0.22 | ||
|
||
EVEREST_MANAGER_CPUS='1.0' | ||
EVEREST_MANAGER_MEMORY='1024mb' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
--- /ext/dist/libexec/everest/modules/JsYetiSimulator/index.js | ||
+++ /ext/dist/libexec/everest/modules/JsYetiSimulator/index.js | ||
@@ -1434,7 +1434,7 @@ boot_module(async ({ | ||
clearData(mod); | ||
|
||
mod.provides.board_support.publish.capabilities({ | ||
- max_current_A_import: 32.0, | ||
+ max_current_A_import: 16.0, | ||
min_current_A_import: 6.0, | ||
max_phase_count_import: 3, | ||
min_phase_count_import: 1, | ||
--- /ext/dist/share/everest/modules/OCPP201/component_config/standardized/SmartChargingCtrlr.json | ||
+++ /ext/dist/share/everest/modules/OCPP201/component_config/standardized/SmartChargingCtrlr.json | ||
@@ -191,7 +191,7 @@ | ||
{ | ||
"type": "Actual", | ||
"mutability": "ReadWrite", | ||
- "value": 48 | ||
+ "value": 16 | ||
} | ||
], | ||
"type": "integer", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
diff --git a/modules/EnergyNode/energy_grid/energyImpl.cpp b/modules/EnergyNode/energy_grid/energyImpl.cpp | ||
index f7afcc99..fc88f8c2 100644 | ||
--- a/modules/EnergyNode/energy_grid/energyImpl.cpp | ||
+++ b/modules/EnergyNode/energy_grid/energyImpl.cpp | ||
@@ -64,6 +64,7 @@ void energyImpl::init() { | ||
|
||
types::energy::ScheduleReqEntry energyImpl::get_local_schedule() { | ||
// local schedule of this module | ||
+ EVLOG_debug << "Getting local schedule with fuse limit: " << mod->config.fuse_limit_A;; | ||
types::energy::ScheduleReqEntry local_schedule; | ||
auto tp = date::utc_clock::now(); | ||
|
||
@@ -79,6 +80,7 @@ types::energy::ScheduleReqEntry energyImpl::get_local_schedule() { | ||
|
||
void energyImpl::set_external_limits(types::energy::ExternalLimits& l) { | ||
std::scoped_lock lock(energy_mutex); | ||
+ EVLOG_debug << "Setting external limits with fuse limit: " << mod->config.fuse_limit_A;; | ||
|
||
if (l.schedule_import.has_value()) { | ||
energy_flow_request.schedule_import = l.schedule_import; | ||
diff --git a/modules/EvseManager/energy_grid/energyImpl.cpp b/modules/EvseManager/energy_grid/energyImpl.cpp | ||
index af290e86..2260e819 100644 | ||
--- a/modules/EvseManager/energy_grid/energyImpl.cpp | ||
+++ b/modules/EvseManager/energy_grid/energyImpl.cpp | ||
@@ -54,6 +54,7 @@ void energyImpl::clear_import_request_schedule() { | ||
const auto tp = | ||
Everest::Date::to_rfc3339(date::floor<std::chrono::hours>(tpnow) + date::get_leap_second_info(tpnow).elapsed); | ||
|
||
+ EVLOG_info << "Clearing import request schedule by setting max current from hw_caps = " << hw_caps.max_current_A_import; | ||
entry_import.timestamp = tp; | ||
entry_import.limits_to_root.ac_max_phase_count = hw_caps.max_phase_count_import; | ||
entry_import.limits_to_root.ac_min_phase_count = hw_caps.min_phase_count_import; | ||
@@ -79,6 +80,7 @@ void energyImpl::clear_export_request_schedule() { | ||
const auto tp = | ||
Everest::Date::to_rfc3339(date::floor<std::chrono::hours>(tpnow) + date::get_leap_second_info(tpnow).elapsed); | ||
|
||
+ EVLOG_info << "Clearing export request schedule by setting max current from hw_caps = " << hw_caps.max_current_A_import; | ||
entry_export.timestamp = tp; | ||
entry_export.limits_to_root.ac_max_phase_count = hw_caps.max_phase_count_export; | ||
entry_export.limits_to_root.ac_min_phase_count = hw_caps.min_phase_count_export; | ||
@@ -353,6 +355,7 @@ void energyImpl::handle_enforce_limits(types::energy::EnforcedLimits& value) { | ||
if (value.limits_root_side.has_value()) { | ||
// set enforced AC current limit | ||
if (value.limits_root_side.value().ac_max_current_A.has_value()) { | ||
+ EVLOG_info << "Handle enforce limits with ac_max_current_A = " << value.limits_root_side.value().ac_max_current_A.value(); | ||
limit = value.limits_root_side.value().ac_max_current_A.value(); | ||
} | ||
|
||
@@ -383,6 +386,7 @@ void energyImpl::handle_enforce_limits(types::energy::EnforcedLimits& value) { | ||
mod->mqtt.publish(fmt::format("everest_external/nodered/{}/state/max_watt", mod->config.connector_id), | ||
value.limits_root_side.value().total_power_W.value()); | ||
|
||
+ EVLOG_info << "Handle enforce limits with total_power_W = " << value.limits_root_side.value().total_power_W.value(); | ||
float a = value.limits_root_side.value().total_power_W.value() / mod->config.ac_nominal_voltage / | ||
mod->ac_nr_phases_active; | ||
if (a < limit) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters