2 Commits

Author SHA1 Message Date
Yurii
8641f9f1e4 feat: added OT option alwaysSetIndoorTemp #180 2025-12-10 17:31:19 +03:00
Yurii
c9fee6f1eb chore: bump version to 1.6.0 2025-12-10 17:16:20 +03:00
7 changed files with 26 additions and 4 deletions

View File

@@ -14,7 +14,7 @@ extra_configs = secrets.default.ini
core_dir = .pio
[env]
version = 1.5.6
version = 1.6.0
framework = arduino
lib_deps =
bblanchon/ArduinoJson@^7.4.2

View File

@@ -1209,8 +1209,8 @@ protected:
}
}
// Native heating control
if (settings.opentherm.options.nativeHeatingControl) {
// Set indoor temp for Native heating control/Always set indoor temp
if (settings.opentherm.options.nativeHeatingControl || settings.opentherm.options.alwaysSetIndoorTemp) {
// Converted current indoor temp
float convertedTemp = convertTemp(vars.master.heating.indoorTemp, settings.system.unitSystem, settings.opentherm.unitSystem);
@@ -1237,10 +1237,13 @@ protected:
Log.swarningln(FPSTR(L_OT_HEATING), F("Failed set current CH2 indoor temp"));
}
}
}
// Native heating control
if (settings.opentherm.options.nativeHeatingControl) {
// Converted target indoor temp
convertedTemp = convertTemp(vars.master.heating.targetTemp, settings.system.unitSystem, settings.opentherm.unitSystem);
float convertedTemp = convertTemp(vars.master.heating.targetTemp, settings.system.unitSystem, settings.opentherm.unitSystem);
// Set target indoor temp
if (this->needSetHeatingTemp(convertedTemp)) {

View File

@@ -78,6 +78,7 @@ struct Settings {
bool autoFaultReset = false;
bool autoDiagReset = false;
bool setDateAndTime = false;
bool alwaysSetIndoorTemp = true;
bool nativeHeatingControl = false;
bool immergasFix = false;
} options;

View File

@@ -38,6 +38,7 @@ const char S_ACTION[] PROGMEM = "action";
const char S_ACTIONS[] PROGMEM = "actions";
const char S_ACTIVE[] PROGMEM = "active";
const char S_ADDRESS[] PROGMEM = "address";
const char S_ALWAYS_SET_INDOOR_TEMP[] PROGMEM = "alwaysSetIndoorTemp";
const char S_ANTI_STUCK_INTERVAL[] PROGMEM = "antiStuckInterval";
const char S_ANTI_STUCK_TIME[] PROGMEM = "antiStuckTime";
const char S_AP[] PROGMEM = "ap";

View File

@@ -468,6 +468,7 @@ void settingsToJson(const Settings& src, JsonVariant dst, bool safe = false) {
otOptions[FPSTR(S_AUTO_FAULT_RESET)] = src.opentherm.options.autoFaultReset;
otOptions[FPSTR(S_AUTO_DIAG_RESET)] = src.opentherm.options.autoDiagReset;
otOptions[FPSTR(S_SET_DATE_AND_TIME)] = src.opentherm.options.setDateAndTime;
otOptions[FPSTR(S_ALWAYS_SET_INDOOR_TEMP)] = src.opentherm.options.alwaysSetIndoorTemp;
otOptions[FPSTR(S_NATIVE_HEATING_CONTROL)] = src.opentherm.options.nativeHeatingControl;
otOptions[FPSTR(S_IMMERGAS_FIX)] = src.opentherm.options.immergasFix;
@@ -1003,6 +1004,15 @@ bool jsonToSettings(const JsonVariantConst src, Settings& dst, bool safe = false
}
}
if (src[FPSTR(S_OPENTHERM)][FPSTR(S_OPTIONS)][FPSTR(S_ALWAYS_SET_INDOOR_TEMP)].is<bool>()) {
bool value = src[FPSTR(S_OPENTHERM)][FPSTR(S_OPTIONS)][FPSTR(S_ALWAYS_SET_INDOOR_TEMP)].as<bool>();
if (value != dst.opentherm.options.alwaysSetIndoorTemp) {
dst.opentherm.options.alwaysSetIndoorTemp = value;
changed = true;
}
}
if (src[FPSTR(S_OPENTHERM)][FPSTR(S_OPTIONS)][FPSTR(S_NATIVE_HEATING_CONTROL)].is<bool>()) {
bool value = src[FPSTR(S_OPENTHERM)][FPSTR(S_OPTIONS)][FPSTR(S_NATIVE_HEATING_CONTROL)].as<bool>();

View File

@@ -457,6 +457,7 @@
"autoFaultReset": "Auto fault reset <small>(not recommended!)</small>",
"autoDiagReset": "Auto diag reset <small>(not recommended!)</small>",
"setDateAndTime": "Set date & time on boiler",
"alwaysSetIndoorTemp": "Always set indoor temperature",
"immergasFix": "Fix for Immergas boilers"
},

View File

@@ -687,6 +687,11 @@
<span data-i18n>settings.ot.options.setDateAndTime</span>
</label>
<label>
<input type="checkbox" name="opentherm[options][alwaysSetIndoorTemp]" value="true">
<span data-i18n>settings.ot.options.alwaysSetIndoorTemp</span>
</label>
<label>
<input type="checkbox" name="opentherm[options][immergasFix]" value="true">
<span data-i18n>settings.ot.options.immergasFix</span>
@@ -1117,6 +1122,7 @@
setCheckboxValue("[name='opentherm[options][autoFaultReset]']", data.opentherm.options.autoFaultReset);
setCheckboxValue("[name='opentherm[options][autoDiagReset]']", data.opentherm.options.autoDiagReset);
setCheckboxValue("[name='opentherm[options][setDateAndTime]']", data.opentherm.options.setDateAndTime);
setCheckboxValue("[name='opentherm[options][alwaysSetIndoorTemp]']", data.opentherm.options.alwaysSetIndoorTemp);
setCheckboxValue("[name='opentherm[options][nativeHeatingControl]']", data.opentherm.options.nativeHeatingControl);
setCheckboxValue("[name='opentherm[options][immergasFix]']", data.opentherm.options.immergasFix);
setBusy('#ot-settings-busy', '#ot-settings', false);