mirror of
https://github.com/Laxilef/OTGateway.git
synced 2025-12-10 18:24:27 +05:00
feat: added OT option `Sync max heating temp with target temp`
This commit is contained in:
@@ -1021,14 +1021,16 @@ protected:
|
||||
|
||||
if (this->needSetHeatingTemp(convertedTemp)) {
|
||||
// Set max heating temp
|
||||
if (this->setMaxHeatingTemp(convertedTemp)) {
|
||||
Log.sinfoln(
|
||||
FPSTR(L_OT_HEATING), F("Set max heating temp: %.2f (converted: %.2f)"),
|
||||
vars.master.heating.setpointTemp, convertedTemp
|
||||
);
|
||||
if (settings.opentherm.options.maxTempSyncWithTargetTemp) {
|
||||
if (this->setMaxHeatingTemp(convertedTemp)) {
|
||||
Log.sinfoln(
|
||||
FPSTR(L_OT_HEATING), F("Set max heating temp: %.2f (converted: %.2f)"),
|
||||
vars.master.heating.setpointTemp, convertedTemp
|
||||
);
|
||||
|
||||
} else {
|
||||
Log.swarningln(FPSTR(L_OT_HEATING), F("Failed set max heating temp"));
|
||||
} else {
|
||||
Log.swarningln(FPSTR(L_OT_HEATING), F("Failed set max heating temp"));
|
||||
}
|
||||
}
|
||||
|
||||
// Set target heating temp
|
||||
|
||||
@@ -67,6 +67,7 @@ struct Settings {
|
||||
bool dhwToCh2 = false;
|
||||
bool dhwBlocking = false;
|
||||
bool modulationSyncWithHeating = false;
|
||||
bool maxTempSyncWithTargetTemp = true;
|
||||
bool getMinMaxTemp = true;
|
||||
bool nativeHeatingControl = false;
|
||||
bool immergasFix = false;
|
||||
|
||||
@@ -118,6 +118,7 @@ const char S_MAX_FREE_BLOCK[] PROGMEM = "maxFreeBlock";
|
||||
const char S_MAX_MODULATION[] PROGMEM = "maxModulation";
|
||||
const char S_MAX_POWER[] PROGMEM = "maxPower";
|
||||
const char S_MAX_TEMP[] PROGMEM = "maxTemp";
|
||||
const char S_MAX_TEMP_SYNC_WITH_TARGET_TEMP[] PROGMEM = "maxTempSyncWithTargetTemp";
|
||||
const char S_MEMBER_ID[] PROGMEM = "memberId";
|
||||
const char S_MIN[] PROGMEM = "min";
|
||||
const char S_MIN_FREE[] PROGMEM = "minFree";
|
||||
|
||||
10
src/utils.h
10
src/utils.h
@@ -388,6 +388,7 @@ void settingsToJson(const Settings& src, JsonVariant dst, bool safe = false) {
|
||||
otOptions[FPSTR(S_DHW_TO_CH2)] = src.opentherm.options.dhwToCh2;
|
||||
otOptions[FPSTR(S_DHW_BLOCKING)] = src.opentherm.options.dhwBlocking;
|
||||
otOptions[FPSTR(S_MODULATION_SYNC_WITH_HEATING)] = src.opentherm.options.modulationSyncWithHeating;
|
||||
otOptions[FPSTR(S_MAX_TEMP_SYNC_WITH_TARGET_TEMP)] = src.opentherm.options.maxTempSyncWithTargetTemp;
|
||||
otOptions[FPSTR(S_GET_MIN_MAX_TEMP)] = src.opentherm.options.getMinMaxTemp;
|
||||
otOptions[FPSTR(S_NATIVE_HEATING_CONTROL)] = src.opentherm.options.nativeHeatingControl;
|
||||
otOptions[FPSTR(S_IMMERGAS_FIX)] = src.opentherm.options.immergasFix;
|
||||
@@ -821,6 +822,15 @@ bool jsonToSettings(const JsonVariantConst src, Settings& dst, bool safe = false
|
||||
}
|
||||
}
|
||||
|
||||
if (src[FPSTR(S_OPENTHERM)][FPSTR(S_OPTIONS)][FPSTR(S_MAX_TEMP_SYNC_WITH_TARGET_TEMP)].is<bool>()) {
|
||||
bool value = src[FPSTR(S_OPENTHERM)][FPSTR(S_OPTIONS)][FPSTR(S_MAX_TEMP_SYNC_WITH_TARGET_TEMP)].as<bool>();
|
||||
|
||||
if (value != dst.opentherm.options.maxTempSyncWithTargetTemp) {
|
||||
dst.opentherm.options.maxTempSyncWithTargetTemp = value;
|
||||
changed = true;
|
||||
}
|
||||
}
|
||||
|
||||
if (src[FPSTR(S_OPENTHERM)][FPSTR(S_OPTIONS)][FPSTR(S_GET_MIN_MAX_TEMP)].is<bool>()) {
|
||||
bool value = src[FPSTR(S_OPENTHERM)][FPSTR(S_OPTIONS)][FPSTR(S_GET_MIN_MAX_TEMP)].as<bool>();
|
||||
|
||||
|
||||
@@ -378,6 +378,7 @@
|
||||
"dhwToCh2": "Duplicate DHW to CH2",
|
||||
"dhwBlocking": "DHW blocking",
|
||||
"modulationSyncWithHeating": "Sync modulation with heating",
|
||||
"maxTempSyncWithTargetTemp": "Sync max heating temp with target temp",
|
||||
"getMinMaxTemp": "Get min/max temp from boiler",
|
||||
"immergasFix": "Fix for Immergas boilers"
|
||||
},
|
||||
|
||||
@@ -378,6 +378,7 @@
|
||||
"dhwToCh2": "Дублировать параметры ГВС в канал 2",
|
||||
"dhwBlocking": "DHW blocking",
|
||||
"modulationSyncWithHeating": "Синхронизировать модуляцию с отоплением",
|
||||
"maxTempSyncWithTargetTemp": "Синхронизировать макс. темп. отопления с целевой темп.",
|
||||
"getMinMaxTemp": "Получать мин. и макс. температуру от котла",
|
||||
"immergasFix": "Фикс для котлов Immergas"
|
||||
},
|
||||
|
||||
@@ -449,6 +449,11 @@
|
||||
<span data-i18n>settings.ot.options.modulationSyncWithHeating</span>
|
||||
</label>
|
||||
|
||||
<label>
|
||||
<input type="checkbox" name="opentherm[options][maxTempSyncWithTargetTemp]" value="true">
|
||||
<span data-i18n>settings.ot.options.maxTempSyncWithTargetTemp</span>
|
||||
</label>
|
||||
|
||||
<label>
|
||||
<input type="checkbox" name="opentherm[options][getMinMaxTemp]" value="true">
|
||||
<span data-i18n>settings.ot.options.getMinMaxTemp</span>
|
||||
@@ -715,6 +720,7 @@
|
||||
setCheckboxValue("[name='opentherm[options][dhwToCh2]']", data.opentherm.options.dhwToCh2);
|
||||
setCheckboxValue("[name='opentherm[options][dhwBlocking]']", data.opentherm.options.dhwBlocking);
|
||||
setCheckboxValue("[name='opentherm[options][modulationSyncWithHeating]']", data.opentherm.options.modulationSyncWithHeating);
|
||||
setCheckboxValue("[name='opentherm[options][maxTempSyncWithTargetTemp]']", data.opentherm.options.maxTempSyncWithTargetTemp);
|
||||
setCheckboxValue("[name='opentherm[options][getMinMaxTemp]']", data.opentherm.options.getMinMaxTemp);
|
||||
setCheckboxValue("[name='opentherm[options][nativeHeatingControl]']", data.opentherm.options.nativeHeatingControl);
|
||||
setCheckboxValue("[name='opentherm[options][immergasFix]']", data.opentherm.options.immergasFix);
|
||||
|
||||
Reference in New Issue
Block a user