mirror of
https://github.com/Laxilef/OTGateway.git
synced 2025-12-11 02:34:29 +05:00
feat: added opentherm option 'immergasFix'
This commit is contained in:
@@ -79,7 +79,7 @@ public:
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
unsigned long setBoilerStatus(bool enableCentralHeating, bool enableHotWater, bool enableCooling, bool enableOutsideTemperatureCompensation, bool enableCentralHeating2, bool summerWinterMode, bool dhwBlocking) {
|
unsigned long setBoilerStatus(bool enableCentralHeating, bool enableHotWater, bool enableCooling, bool enableOutsideTemperatureCompensation, bool enableCentralHeating2, bool summerWinterMode, bool dhwBlocking, uint8_t lb = 0) {
|
||||||
unsigned int data = enableCentralHeating
|
unsigned int data = enableCentralHeating
|
||||||
| (enableHotWater << 1)
|
| (enableHotWater << 1)
|
||||||
| (enableCooling << 2)
|
| (enableCooling << 2)
|
||||||
@@ -87,7 +87,9 @@ public:
|
|||||||
| (enableCentralHeating2 << 4)
|
| (enableCentralHeating2 << 4)
|
||||||
| (summerWinterMode << 5)
|
| (summerWinterMode << 5)
|
||||||
| (dhwBlocking << 6);
|
| (dhwBlocking << 6);
|
||||||
|
|
||||||
data <<= 8;
|
data <<= 8;
|
||||||
|
data |= lb;
|
||||||
|
|
||||||
return this->sendRequest(buildRequest(
|
return this->sendRequest(buildRequest(
|
||||||
OpenThermMessageType::READ_DATA,
|
OpenThermMessageType::READ_DATA,
|
||||||
|
|||||||
@@ -165,6 +165,16 @@ protected:
|
|||||||
heatingCh2Enabled = settings.opentherm.dhwPresent && settings.dhw.enable;
|
heatingCh2Enabled = settings.opentherm.dhwPresent && settings.dhw.enable;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Set boiler status LB
|
||||||
|
// Some boilers require this, although this is against protocol
|
||||||
|
uint8_t statusLb = 0;
|
||||||
|
|
||||||
|
// Immergas fix
|
||||||
|
// https://arduino.ru/forum/programmirovanie/termostat-opentherm-na-esp8266?page=15#comment-649392
|
||||||
|
if (settings.opentherm.immergasFix) {
|
||||||
|
statusLb = 0xCA;
|
||||||
|
}
|
||||||
|
|
||||||
unsigned long response = this->instance->setBoilerStatus(
|
unsigned long response = this->instance->setBoilerStatus(
|
||||||
heatingEnabled,
|
heatingEnabled,
|
||||||
settings.opentherm.dhwPresent && settings.dhw.enable,
|
settings.opentherm.dhwPresent && settings.dhw.enable,
|
||||||
@@ -172,7 +182,8 @@ protected:
|
|||||||
settings.opentherm.nativeHeatingControl,
|
settings.opentherm.nativeHeatingControl,
|
||||||
heatingCh2Enabled,
|
heatingCh2Enabled,
|
||||||
settings.opentherm.summerWinterMode,
|
settings.opentherm.summerWinterMode,
|
||||||
settings.opentherm.dhwBlocking
|
settings.opentherm.dhwBlocking,
|
||||||
|
statusLb
|
||||||
);
|
);
|
||||||
|
|
||||||
if (!CustomOpenTherm::isValidResponse(response)) {
|
if (!CustomOpenTherm::isValidResponse(response)) {
|
||||||
|
|||||||
@@ -63,6 +63,7 @@ struct Settings {
|
|||||||
bool modulationSyncWithHeating = false;
|
bool modulationSyncWithHeating = false;
|
||||||
bool getMinMaxTemp = true;
|
bool getMinMaxTemp = true;
|
||||||
bool nativeHeatingControl = false;
|
bool nativeHeatingControl = false;
|
||||||
|
bool immergasFix = false;
|
||||||
} opentherm;
|
} opentherm;
|
||||||
|
|
||||||
struct {
|
struct {
|
||||||
|
|||||||
10
src/utils.h
10
src/utils.h
@@ -354,6 +354,7 @@ void settingsToJson(const Settings& src, JsonVariant dst, bool safe = false) {
|
|||||||
dst["opentherm"]["modulationSyncWithHeating"] = src.opentherm.modulationSyncWithHeating;
|
dst["opentherm"]["modulationSyncWithHeating"] = src.opentherm.modulationSyncWithHeating;
|
||||||
dst["opentherm"]["getMinMaxTemp"] = src.opentherm.getMinMaxTemp;
|
dst["opentherm"]["getMinMaxTemp"] = src.opentherm.getMinMaxTemp;
|
||||||
dst["opentherm"]["nativeHeatingControl"] = src.opentherm.nativeHeatingControl;
|
dst["opentherm"]["nativeHeatingControl"] = src.opentherm.nativeHeatingControl;
|
||||||
|
dst["opentherm"]["immergasFix"] = src.opentherm.immergasFix;
|
||||||
|
|
||||||
dst["mqtt"]["enable"] = src.mqtt.enable;
|
dst["mqtt"]["enable"] = src.mqtt.enable;
|
||||||
dst["mqtt"]["server"] = src.mqtt.server;
|
dst["mqtt"]["server"] = src.mqtt.server;
|
||||||
@@ -800,6 +801,15 @@ bool jsonToSettings(const JsonVariantConst src, Settings& dst, bool safe = false
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (src["opentherm"]["immergasFix"].is<bool>()) {
|
||||||
|
bool value = src["opentherm"]["immergasFix"].as<bool>();
|
||||||
|
|
||||||
|
if (value != dst.opentherm.immergasFix) {
|
||||||
|
dst.opentherm.immergasFix = value;
|
||||||
|
changed = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// mqtt
|
// mqtt
|
||||||
if (src["mqtt"]["enable"].is<bool>()) {
|
if (src["mqtt"]["enable"].is<bool>()) {
|
||||||
|
|||||||
@@ -269,7 +269,8 @@
|
|||||||
"dhwToCh2": "Duplicate DHW to CH2",
|
"dhwToCh2": "Duplicate DHW to CH2",
|
||||||
"dhwBlocking": "DHW blocking",
|
"dhwBlocking": "DHW blocking",
|
||||||
"modulationSyncWithHeating": "Sync modulation with heating",
|
"modulationSyncWithHeating": "Sync modulation with heating",
|
||||||
"getMinMaxTemp": "Get min/max temp from boiler"
|
"getMinMaxTemp": "Get min/max temp from boiler",
|
||||||
|
"immergasFix": "Fix for Immergas boilers"
|
||||||
},
|
},
|
||||||
|
|
||||||
"faultState": {
|
"faultState": {
|
||||||
|
|||||||
@@ -269,7 +269,8 @@
|
|||||||
"dhwToCh2": "Дублировать параметры ГВС в канал 2",
|
"dhwToCh2": "Дублировать параметры ГВС в канал 2",
|
||||||
"dhwBlocking": "DHW blocking",
|
"dhwBlocking": "DHW blocking",
|
||||||
"modulationSyncWithHeating": "Синхронизировать модуляцию с отоплением",
|
"modulationSyncWithHeating": "Синхронизировать модуляцию с отоплением",
|
||||||
"getMinMaxTemp": "Получать мин. и макс. температуру от котла"
|
"getMinMaxTemp": "Получать мин. и макс. температуру от котла",
|
||||||
|
"immergasFix": "Фикс для котлов Immergas"
|
||||||
},
|
},
|
||||||
|
|
||||||
"faultState": {
|
"faultState": {
|
||||||
|
|||||||
@@ -443,6 +443,11 @@
|
|||||||
<span data-i18n>settings.ot.options.getMinMaxTemp</span>
|
<span data-i18n>settings.ot.options.getMinMaxTemp</span>
|
||||||
</label>
|
</label>
|
||||||
|
|
||||||
|
<label for="opentherm-immergas-fix"></label>
|
||||||
|
<input type="checkbox" id="opentherm-immergas-fix" name="opentherm[immergasFix]" value="true">
|
||||||
|
<span data-i18n>settings.ot.options.immergasFix</span>
|
||||||
|
</label>
|
||||||
|
|
||||||
<hr />
|
<hr />
|
||||||
<fieldset>
|
<fieldset>
|
||||||
<label for="opentherm-fault-state-gpio">
|
<label for="opentherm-fault-state-gpio">
|
||||||
@@ -736,6 +741,7 @@
|
|||||||
setCheckboxValue('#opentherm-sync-modulation-with-heating', data.opentherm.modulationSyncWithHeating);
|
setCheckboxValue('#opentherm-sync-modulation-with-heating', data.opentherm.modulationSyncWithHeating);
|
||||||
setCheckboxValue('#opentherm-get-min-max-temp', data.opentherm.getMinMaxTemp);
|
setCheckboxValue('#opentherm-get-min-max-temp', data.opentherm.getMinMaxTemp);
|
||||||
setCheckboxValue('#opentherm-native-heating-control', data.opentherm.nativeHeatingControl);
|
setCheckboxValue('#opentherm-native-heating-control', data.opentherm.nativeHeatingControl);
|
||||||
|
setCheckboxValue('#opentherm-immergas-fix', data.opentherm.immergasFix);
|
||||||
setBusy('#opentherm-settings-busy', '#opentherm-settings', false);
|
setBusy('#opentherm-settings-busy', '#opentherm-settings', false);
|
||||||
|
|
||||||
// MQTT
|
// MQTT
|
||||||
|
|||||||
Reference in New Issue
Block a user