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:
@@ -165,6 +165,16 @@ protected:
|
||||
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(
|
||||
heatingEnabled,
|
||||
settings.opentherm.dhwPresent && settings.dhw.enable,
|
||||
@@ -172,7 +182,8 @@ protected:
|
||||
settings.opentherm.nativeHeatingControl,
|
||||
heatingCh2Enabled,
|
||||
settings.opentherm.summerWinterMode,
|
||||
settings.opentherm.dhwBlocking
|
||||
settings.opentherm.dhwBlocking,
|
||||
statusLb
|
||||
);
|
||||
|
||||
if (!CustomOpenTherm::isValidResponse(response)) {
|
||||
|
||||
@@ -63,6 +63,7 @@ struct Settings {
|
||||
bool modulationSyncWithHeating = false;
|
||||
bool getMinMaxTemp = true;
|
||||
bool nativeHeatingControl = false;
|
||||
bool immergasFix = false;
|
||||
} opentherm;
|
||||
|
||||
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"]["getMinMaxTemp"] = src.opentherm.getMinMaxTemp;
|
||||
dst["opentherm"]["nativeHeatingControl"] = src.opentherm.nativeHeatingControl;
|
||||
dst["opentherm"]["immergasFix"] = src.opentherm.immergasFix;
|
||||
|
||||
dst["mqtt"]["enable"] = src.mqtt.enable;
|
||||
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
|
||||
if (src["mqtt"]["enable"].is<bool>()) {
|
||||
|
||||
Reference in New Issue
Block a user