mirror of
https://github.com/Laxilef/OTGateway.git
synced 2025-12-10 18:24:27 +05:00
feat: added OT option dhwStateAsDhwBlocking
For Baxi Slim with Bertelli
This commit is contained in:
@@ -205,6 +205,12 @@ protected:
|
||||
summerWinterMode = vars.master.heating.enabled == summerWinterMode;
|
||||
}
|
||||
|
||||
// DHW blocking
|
||||
bool dhwBlocking = settings.opentherm.options.dhwBlocking;
|
||||
if (settings.opentherm.options.dhwStateAsDhwBlocking) {
|
||||
dhwBlocking = vars.master.dhw.enabled == dhwBlocking;
|
||||
}
|
||||
|
||||
unsigned long response = this->instance->setBoilerStatus(
|
||||
vars.master.heating.enabled,
|
||||
vars.master.dhw.enabled,
|
||||
@@ -212,7 +218,7 @@ protected:
|
||||
settings.opentherm.options.nativeHeatingControl,
|
||||
vars.master.ch2.enabled,
|
||||
summerWinterMode,
|
||||
settings.opentherm.options.dhwBlocking,
|
||||
dhwBlocking,
|
||||
statusLb
|
||||
);
|
||||
|
||||
|
||||
@@ -71,6 +71,7 @@ struct Settings {
|
||||
bool heatingToCh2 = false;
|
||||
bool dhwToCh2 = false;
|
||||
bool dhwBlocking = false;
|
||||
bool dhwStateAsDhwBlocking = false;
|
||||
bool maxTempSyncWithTargetTemp = true;
|
||||
bool getMinMaxTemp = true;
|
||||
bool ignoreDiagState = false;
|
||||
|
||||
@@ -68,6 +68,7 @@ const char S_DATE[] PROGMEM = "date";
|
||||
const char S_DEADBAND[] PROGMEM = "deadband";
|
||||
const char S_DHW[] PROGMEM = "dhw";
|
||||
const char S_DHW_BLOCKING[] PROGMEM = "dhwBlocking";
|
||||
const char S_DHW_STATE_AS_DHW_BLOCKING[] PROGMEM = "dhwStateAsDhwBlocking";
|
||||
const char S_DHW_SUPPORT[] PROGMEM = "dhwSupport";
|
||||
const char S_DHW_TO_CH2[] PROGMEM = "dhwToCh2";
|
||||
const char S_DIAG[] PROGMEM = "diag";
|
||||
|
||||
10
src/utils.h
10
src/utils.h
@@ -461,6 +461,7 @@ void settingsToJson(const Settings& src, JsonVariant dst, bool safe = false) {
|
||||
otOptions[FPSTR(S_HEATING_TO_CH2)] = src.opentherm.options.heatingToCh2;
|
||||
otOptions[FPSTR(S_DHW_TO_CH2)] = src.opentherm.options.dhwToCh2;
|
||||
otOptions[FPSTR(S_DHW_BLOCKING)] = src.opentherm.options.dhwBlocking;
|
||||
otOptions[FPSTR(S_DHW_STATE_AS_DHW_BLOCKING)] = src.opentherm.options.dhwStateAsDhwBlocking;
|
||||
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_IGNORE_DIAG_STATE)] = src.opentherm.options.ignoreDiagState;
|
||||
@@ -923,6 +924,15 @@ bool jsonToSettings(const JsonVariantConst src, Settings& dst, bool safe = false
|
||||
}
|
||||
}
|
||||
|
||||
if (src[FPSTR(S_OPENTHERM)][FPSTR(S_OPTIONS)][FPSTR(S_DHW_STATE_AS_DHW_BLOCKING)].is<bool>()) {
|
||||
bool value = src[FPSTR(S_OPENTHERM)][FPSTR(S_OPTIONS)][FPSTR(S_DHW_STATE_AS_DHW_BLOCKING)].as<bool>();
|
||||
|
||||
if (value != dst.opentherm.options.dhwStateAsDhwBlocking) {
|
||||
dst.opentherm.options.dhwStateAsDhwBlocking = value;
|
||||
changed = true;
|
||||
}
|
||||
}
|
||||
|
||||
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>();
|
||||
|
||||
|
||||
@@ -404,6 +404,7 @@
|
||||
"heatingToCh2": "Duplicate heating to CH2",
|
||||
"dhwToCh2": "Duplicate DHW to CH2",
|
||||
"dhwBlocking": "DHW blocking",
|
||||
"dhwStateAsDhwBlocking": "DHW state as DHW blocking",
|
||||
"maxTempSyncWithTargetTemp": "Sync max heating temp with target temp",
|
||||
"getMinMaxTemp": "Get min/max temp from boiler",
|
||||
"ignoreDiagState": "Ignore diag state",
|
||||
|
||||
@@ -404,6 +404,7 @@
|
||||
"heatingToCh2": "Riproduci riscaldamento su CH2",
|
||||
"dhwToCh2": "Riproduci ACS su CH2",
|
||||
"dhwBlocking": "Bloccare ACS",
|
||||
"dhwStateAsDhwBlocking": "Stato ACS come bloccare ACS",
|
||||
"maxTempSyncWithTargetTemp": "Sincronizza la temperatura massima di riscaldamento con la temperatura target",
|
||||
"getMinMaxTemp": "Prendi temp min/max dalla caldaia",
|
||||
"ignoreDiagState": "Ignora lo stato diagnostico",
|
||||
|
||||
@@ -404,6 +404,7 @@
|
||||
"heatingToCh2": "Дублировать параметры отопления в канал 2",
|
||||
"dhwToCh2": "Дублировать параметры ГВС в канал 2",
|
||||
"dhwBlocking": "DHW blocking",
|
||||
"dhwStateAsDhwBlocking": "DHW blocking в качестве состояния ГВС",
|
||||
"maxTempSyncWithTargetTemp": "Синхронизировать макс. темп. отопления с целевой темп.",
|
||||
"getMinMaxTemp": "Получать мин. и макс. температуру от котла",
|
||||
"ignoreDiagState": "Игнорировать состояние диагностики",
|
||||
|
||||
@@ -526,6 +526,11 @@
|
||||
<span data-i18n>settings.ot.options.dhwBlocking</span>
|
||||
</label>
|
||||
|
||||
<label>
|
||||
<input type="checkbox" name="opentherm[options][dhwStateAsDhwBlocking]" value="true">
|
||||
<span data-i18n>settings.ot.options.dhwStateAsDhwBlocking</span>
|
||||
</label>
|
||||
|
||||
<label>
|
||||
<input type="checkbox" name="opentherm[options][maxTempSyncWithTargetTemp]" value="true">
|
||||
<span data-i18n>settings.ot.options.maxTempSyncWithTargetTemp</span>
|
||||
@@ -818,6 +823,7 @@
|
||||
setCheckboxValue("[name='opentherm[options][heatingToCh2]']", data.opentherm.options.heatingToCh2);
|
||||
setCheckboxValue("[name='opentherm[options][dhwToCh2]']", data.opentherm.options.dhwToCh2);
|
||||
setCheckboxValue("[name='opentherm[options][dhwBlocking]']", data.opentherm.options.dhwBlocking);
|
||||
setCheckboxValue("[name='opentherm[options][dhwStateAsDhwBlocking]']", data.opentherm.options.dhwStateAsDhwBlocking);
|
||||
setCheckboxValue("[name='opentherm[options][maxTempSyncWithTargetTemp]']", data.opentherm.options.maxTempSyncWithTargetTemp);
|
||||
setCheckboxValue("[name='opentherm[options][getMinMaxTemp]']", data.opentherm.options.getMinMaxTemp);
|
||||
setCheckboxValue("[name='opentherm[options][ignoreDiagState]']", data.opentherm.options.ignoreDiagState);
|
||||
|
||||
Reference in New Issue
Block a user