mirror of
https://github.com/Laxilef/OTGateway.git
synced 2025-12-12 19:24:27 +05:00
Compare commits
21 Commits
master
...
new-equith
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
131ad2fdfd | ||
|
|
28099f2d07 | ||
|
|
ec50d5ecbb | ||
|
|
32e0a06c19 | ||
|
|
ff89c6d478 | ||
|
|
d867c355ed | ||
|
|
e751c3aba0 | ||
|
|
30b55f1946 | ||
|
|
5544f43162 | ||
|
|
06c2ddcf96 | ||
|
|
0bb05006f4 | ||
|
|
5046bc0e8f | ||
|
|
0d3adad446 | ||
|
|
587678f184 | ||
|
|
72235286c0 | ||
|
|
ee868b22ce | ||
|
|
8046a7e13f | ||
|
|
0ec1fc5f24 | ||
|
|
061136b13e | ||
|
|
3e61dabeab | ||
|
|
e5f4281d4c |
@@ -98,7 +98,7 @@ board_build.partitions = esp32_partitions.csv
|
|||||||
lib_deps =
|
lib_deps =
|
||||||
${env.lib_deps}
|
${env.lib_deps}
|
||||||
laxilef/ESP32Scheduler@^1.0.1
|
laxilef/ESP32Scheduler@^1.0.1
|
||||||
nimble_lib = h2zero/NimBLE-Arduino@2.3.7
|
nimble_lib = h2zero/NimBLE-Arduino@2.3.3
|
||||||
lib_ignore =
|
lib_ignore =
|
||||||
extra_scripts =
|
extra_scripts =
|
||||||
post:tools/esp32.py
|
post:tools/esp32.py
|
||||||
@@ -234,7 +234,7 @@ build_flags =
|
|||||||
${esp32_defaults.build_flags}
|
${esp32_defaults.build_flags}
|
||||||
-D ARDUINO_USB_MODE=0
|
-D ARDUINO_USB_MODE=0
|
||||||
-D ARDUINO_USB_CDC_ON_BOOT=1
|
-D ARDUINO_USB_CDC_ON_BOOT=1
|
||||||
-D MYNEWT_VAL_BLE_EXT_ADV=1
|
-D CONFIG_BT_NIMBLE_EXT_ADV=1
|
||||||
-D USE_BLE=1
|
-D USE_BLE=1
|
||||||
-D DEFAULT_OT_IN_GPIO=35
|
-D DEFAULT_OT_IN_GPIO=35
|
||||||
-D DEFAULT_OT_OUT_GPIO=36
|
-D DEFAULT_OT_OUT_GPIO=36
|
||||||
@@ -260,7 +260,7 @@ build_unflags =
|
|||||||
build_type = ${esp32_defaults.build_type}
|
build_type = ${esp32_defaults.build_type}
|
||||||
build_flags =
|
build_flags =
|
||||||
${esp32_defaults.build_flags}
|
${esp32_defaults.build_flags}
|
||||||
-D MYNEWT_VAL_BLE_EXT_ADV=1
|
-D CONFIG_BT_NIMBLE_EXT_ADV=1
|
||||||
-D USE_BLE=1
|
-D USE_BLE=1
|
||||||
-D DEFAULT_OT_IN_GPIO=8
|
-D DEFAULT_OT_IN_GPIO=8
|
||||||
-D DEFAULT_OT_OUT_GPIO=10
|
-D DEFAULT_OT_OUT_GPIO=10
|
||||||
@@ -366,7 +366,7 @@ build_unflags =
|
|||||||
build_type = ${esp32_defaults.build_type}
|
build_type = ${esp32_defaults.build_type}
|
||||||
build_flags =
|
build_flags =
|
||||||
${esp32_defaults.build_flags}
|
${esp32_defaults.build_flags}
|
||||||
-D MYNEWT_VAL_BLE_EXT_ADV=1
|
-D CONFIG_BT_NIMBLE_EXT_ADV=1
|
||||||
-D USE_BLE=1
|
-D USE_BLE=1
|
||||||
-D DEFAULT_OT_IN_GPIO=3
|
-D DEFAULT_OT_IN_GPIO=3
|
||||||
-D DEFAULT_OT_OUT_GPIO=1
|
-D DEFAULT_OT_OUT_GPIO=1
|
||||||
|
|||||||
@@ -443,28 +443,6 @@ public:
|
|||||||
return this->publish(this->makeConfigTopic(FPSTR(HA_ENTITY_SWITCH), F("heating_turbo")).c_str(), doc);
|
return this->publish(this->makeConfigTopic(FPSTR(HA_ENTITY_SWITCH), F("heating_turbo")).c_str(), doc);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool publishSwitchHeatingHysteresis(bool enabledByDefault = true) {
|
|
||||||
JsonDocument doc;
|
|
||||||
doc[FPSTR(HA_AVAILABILITY)][FPSTR(HA_TOPIC)] = this->statusTopic.c_str();
|
|
||||||
doc[FPSTR(HA_ENABLED_BY_DEFAULT)] = enabledByDefault;
|
|
||||||
doc[FPSTR(HA_UNIQUE_ID)] = this->getUniqueIdWithPrefix(F("heating_hysteresis"));
|
|
||||||
doc[FPSTR(HA_DEFAULT_ENTITY_ID)] = this->getEntityIdWithPrefix(FPSTR(HA_ENTITY_SWITCH), F("heating_hysteresis"));
|
|
||||||
doc[FPSTR(HA_ENTITY_CATEGORY)] = FPSTR(HA_ENTITY_CATEGORY_CONFIG);
|
|
||||||
doc[FPSTR(HA_NAME)] = F("Use heating hysteresis");
|
|
||||||
doc[FPSTR(HA_ICON)] = F("mdi:altimeter");
|
|
||||||
doc[FPSTR(HA_STATE_TOPIC)] = this->settingsTopic.c_str();
|
|
||||||
doc[FPSTR(HA_STATE_ON)] = true;
|
|
||||||
doc[FPSTR(HA_STATE_OFF)] = false;
|
|
||||||
doc[FPSTR(HA_VALUE_TEMPLATE)] = F("{{ value_json.heating.hysteresis.enabled }}");
|
|
||||||
doc[FPSTR(HA_COMMAND_TOPIC)] = this->setSettingsTopic.c_str();
|
|
||||||
doc[FPSTR(HA_PAYLOAD_ON)] = F("{\"heating\": {\"hysteresis\" : {\"enabled\" : true}}}");
|
|
||||||
doc[FPSTR(HA_PAYLOAD_OFF)] = F("{\"heating\": {\"hysteresis\" : {\"enabled\" : false}}}");
|
|
||||||
doc[FPSTR(HA_EXPIRE_AFTER)] = this->expireAfter;
|
|
||||||
doc.shrinkToFit();
|
|
||||||
|
|
||||||
return this->publish(this->makeConfigTopic(FPSTR(HA_ENTITY_SWITCH), F("heating_hysteresis")).c_str(), doc);
|
|
||||||
}
|
|
||||||
|
|
||||||
bool publishInputHeatingHysteresis(UnitSystem unit = UnitSystem::METRIC, bool enabledByDefault = true) {
|
bool publishInputHeatingHysteresis(UnitSystem unit = UnitSystem::METRIC, bool enabledByDefault = true) {
|
||||||
JsonDocument doc;
|
JsonDocument doc;
|
||||||
doc[FPSTR(HA_AVAILABILITY)][FPSTR(HA_TOPIC)] = this->statusTopic.c_str();
|
doc[FPSTR(HA_AVAILABILITY)][FPSTR(HA_TOPIC)] = this->statusTopic.c_str();
|
||||||
@@ -484,9 +462,9 @@ public:
|
|||||||
doc[FPSTR(HA_NAME)] = F("Heating hysteresis");
|
doc[FPSTR(HA_NAME)] = F("Heating hysteresis");
|
||||||
doc[FPSTR(HA_ICON)] = F("mdi:altimeter");
|
doc[FPSTR(HA_ICON)] = F("mdi:altimeter");
|
||||||
doc[FPSTR(HA_STATE_TOPIC)] = this->settingsTopic.c_str();
|
doc[FPSTR(HA_STATE_TOPIC)] = this->settingsTopic.c_str();
|
||||||
doc[FPSTR(HA_VALUE_TEMPLATE)] = F("{{ value_json.heating.hysteresis.value|float(0)|round(2) }}");
|
doc[FPSTR(HA_VALUE_TEMPLATE)] = F("{{ value_json.heating.hysteresis|float(0)|round(2) }}");
|
||||||
doc[FPSTR(HA_COMMAND_TOPIC)] = this->setSettingsTopic.c_str();
|
doc[FPSTR(HA_COMMAND_TOPIC)] = this->setSettingsTopic.c_str();
|
||||||
doc[FPSTR(HA_COMMAND_TEMPLATE)] = F("{\"heating\": {\"hysteresis\" : {\"value\" : {{ value }}}}}");
|
doc[FPSTR(HA_COMMAND_TEMPLATE)] = F("{\"heating\": {\"hysteresis\" : {{ value }}}}");
|
||||||
doc[FPSTR(HA_MIN)] = 0;
|
doc[FPSTR(HA_MIN)] = 0;
|
||||||
doc[FPSTR(HA_MAX)] = 15;
|
doc[FPSTR(HA_MAX)] = 15;
|
||||||
doc[FPSTR(HA_STEP)] = 0.01f;
|
doc[FPSTR(HA_STEP)] = 0.01f;
|
||||||
|
|||||||
@@ -319,7 +319,7 @@ protected:
|
|||||||
emergencyFlags |= 0b00000010;
|
emergencyFlags |= 0b00000010;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (settings.opentherm.options.nativeOTC) {
|
if (settings.opentherm.options.nativeHeatingControl) {
|
||||||
emergencyFlags |= 0b00000100;
|
emergencyFlags |= 0b00000100;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -486,7 +486,6 @@ protected:
|
|||||||
void publishHaEntities() {
|
void publishHaEntities() {
|
||||||
// heating
|
// heating
|
||||||
this->haHelper->publishSwitchHeatingTurbo(false);
|
this->haHelper->publishSwitchHeatingTurbo(false);
|
||||||
this->haHelper->publishSwitchHeatingHysteresis();
|
|
||||||
this->haHelper->publishInputHeatingHysteresis(settings.system.unitSystem);
|
this->haHelper->publishInputHeatingHysteresis(settings.system.unitSystem);
|
||||||
this->haHelper->publishInputHeatingTurboFactor(false);
|
this->haHelper->publishInputHeatingTurboFactor(false);
|
||||||
this->haHelper->publishInputHeatingMinTemp(settings.system.unitSystem);
|
this->haHelper->publishInputHeatingMinTemp(settings.system.unitSystem);
|
||||||
|
|||||||
@@ -171,7 +171,7 @@ protected:
|
|||||||
vars.master.heating.enabled = this->isReady()
|
vars.master.heating.enabled = this->isReady()
|
||||||
&& settings.heating.enabled
|
&& settings.heating.enabled
|
||||||
&& vars.cascadeControl.input
|
&& vars.cascadeControl.input
|
||||||
&& (!vars.master.heating.blocking || settings.heating.hysteresis.action != HysteresisAction::DISABLE_HEATING)
|
&& !vars.master.heating.blocking
|
||||||
&& !vars.master.heating.overheat;
|
&& !vars.master.heating.overheat;
|
||||||
|
|
||||||
// DHW settings
|
// DHW settings
|
||||||
@@ -218,7 +218,7 @@ protected:
|
|||||||
vars.master.heating.enabled,
|
vars.master.heating.enabled,
|
||||||
vars.master.dhw.enabled,
|
vars.master.dhw.enabled,
|
||||||
settings.opentherm.options.coolingSupport,
|
settings.opentherm.options.coolingSupport,
|
||||||
settings.opentherm.options.nativeOTC,
|
settings.opentherm.options.nativeHeatingControl,
|
||||||
vars.master.ch2.enabled,
|
vars.master.ch2.enabled,
|
||||||
summerWinterMode,
|
summerWinterMode,
|
||||||
dhwBlocking,
|
dhwBlocking,
|
||||||
@@ -911,7 +911,7 @@ protected:
|
|||||||
|
|
||||||
// Update CH2 temp
|
// Update CH2 temp
|
||||||
if (Sensors::getAmountByType(Sensors::Type::OT_CH2_TEMP, true)) {
|
if (Sensors::getAmountByType(Sensors::Type::OT_CH2_TEMP, true)) {
|
||||||
if (vars.master.ch2.enabled && !settings.opentherm.options.nativeOTC) {
|
if (vars.master.ch2.enabled && !settings.opentherm.options.nativeHeatingControl) {
|
||||||
if (this->updateCh2Temp()) {
|
if (this->updateCh2Temp()) {
|
||||||
float convertedCh2Temp = convertTemp(
|
float convertedCh2Temp = convertTemp(
|
||||||
vars.slave.ch2.currentTemp,
|
vars.slave.ch2.currentTemp,
|
||||||
@@ -1209,8 +1209,8 @@ protected:
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Send indoor temp if AlwaysSendIndoorTemp option is enabled.
|
// Native heating control
|
||||||
if (settings.opentherm.options.nativeOTC || settings.opentherm.options.alwaysSendIndoorTemp) {
|
if (settings.opentherm.options.nativeHeatingControl) {
|
||||||
// Converted current indoor temp
|
// Converted current indoor temp
|
||||||
float convertedTemp = convertTemp(vars.master.heating.indoorTemp, settings.system.unitSystem, settings.opentherm.unitSystem);
|
float convertedTemp = convertTemp(vars.master.heating.indoorTemp, settings.system.unitSystem, settings.opentherm.unitSystem);
|
||||||
|
|
||||||
@@ -1237,12 +1237,10 @@ protected:
|
|||||||
Log.swarningln(FPSTR(L_OT_HEATING), F("Failed set current CH2 indoor temp"));
|
Log.swarningln(FPSTR(L_OT_HEATING), F("Failed set current CH2 indoor temp"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
// NativeOTC
|
|
||||||
if (settings.opentherm.options.nativeOTC) {
|
|
||||||
// Converted target indoor temp
|
// Converted target indoor temp
|
||||||
float convertedTemp = convertTemp(vars.master.heating.targetTemp, settings.system.unitSystem, settings.opentherm.unitSystem);
|
convertedTemp = convertTemp(vars.master.heating.targetTemp, settings.system.unitSystem, settings.opentherm.unitSystem);
|
||||||
|
|
||||||
// Set target indoor temp
|
// Set target indoor temp
|
||||||
if (this->needSetHeatingTemp(convertedTemp)) {
|
if (this->needSetHeatingTemp(convertedTemp)) {
|
||||||
@@ -1276,7 +1274,7 @@ protected:
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Normal heating control
|
// Normal heating control
|
||||||
if (!settings.opentherm.options.nativeOTC && vars.master.heating.enabled) {
|
if (!settings.opentherm.options.nativeHeatingControl && vars.master.heating.enabled) {
|
||||||
// Converted target heating temp
|
// Converted target heating temp
|
||||||
float convertedTemp = convertTemp(vars.master.heating.setpointTemp, settings.system.unitSystem, settings.opentherm.unitSystem);
|
float convertedTemp = convertTemp(vars.master.heating.setpointTemp, settings.system.unitSystem, settings.opentherm.unitSystem);
|
||||||
|
|
||||||
@@ -1313,7 +1311,7 @@ protected:
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Set CH2 temp
|
// Set CH2 temp
|
||||||
if (!settings.opentherm.options.nativeOTC && vars.master.ch2.enabled) {
|
if (!settings.opentherm.options.nativeHeatingControl && vars.master.ch2.enabled) {
|
||||||
if (settings.opentherm.options.heatingToCh2 || settings.opentherm.options.dhwToCh2) {
|
if (settings.opentherm.options.heatingToCh2 || settings.opentherm.options.dhwToCh2) {
|
||||||
// Converted target CH2 temp
|
// Converted target CH2 temp
|
||||||
float convertedTemp = convertTemp(
|
float convertedTemp = convertTemp(
|
||||||
|
|||||||
@@ -37,7 +37,7 @@ protected:
|
|||||||
this->indoorSensorsConnected = Sensors::existsConnectedSensorsByPurpose(Sensors::Purpose::INDOOR_TEMP);
|
this->indoorSensorsConnected = Sensors::existsConnectedSensorsByPurpose(Sensors::Purpose::INDOOR_TEMP);
|
||||||
//this->outdoorSensorsConnected = Sensors::existsConnectedSensorsByPurpose(Sensors::Purpose::OUTDOOR_TEMP);
|
//this->outdoorSensorsConnected = Sensors::existsConnectedSensorsByPurpose(Sensors::Purpose::OUTDOOR_TEMP);
|
||||||
|
|
||||||
if (settings.equitherm.enabled || settings.pid.enabled || settings.opentherm.options.nativeOTC) {
|
if (settings.equitherm.enabled || settings.pid.enabled || settings.opentherm.options.nativeHeatingControl) {
|
||||||
vars.master.heating.indoorTempControl = true;
|
vars.master.heating.indoorTempControl = true;
|
||||||
vars.master.heating.minTemp = THERMOSTAT_INDOOR_MIN_TEMP;
|
vars.master.heating.minTemp = THERMOSTAT_INDOOR_MIN_TEMP;
|
||||||
vars.master.heating.maxTemp = THERMOSTAT_INDOOR_MAX_TEMP;
|
vars.master.heating.maxTemp = THERMOSTAT_INDOOR_MAX_TEMP;
|
||||||
@@ -57,23 +57,12 @@ protected:
|
|||||||
this->turbo();
|
this->turbo();
|
||||||
this->hysteresis();
|
this->hysteresis();
|
||||||
|
|
||||||
if (vars.master.heating.blocking && settings.heating.hysteresis.action == HysteresisAction::SET_ZERO_TARGET) {
|
|
||||||
vars.master.heating.targetTemp = 0.0f;
|
|
||||||
vars.master.heating.setpointTemp = 0.0f;
|
|
||||||
|
|
||||||
// tick if PID enabled
|
|
||||||
if (settings.pid.enabled) {
|
|
||||||
this->getHeatingSetpointTemp();
|
|
||||||
}
|
|
||||||
|
|
||||||
} else {
|
|
||||||
vars.master.heating.targetTemp = settings.heating.target;
|
vars.master.heating.targetTemp = settings.heating.target;
|
||||||
vars.master.heating.setpointTemp = roundf(constrain(
|
vars.master.heating.setpointTemp = roundf(constrain(
|
||||||
this->getHeatingSetpointTemp(),
|
this->getHeatingSetpointTemp(),
|
||||||
this->getHeatingMinSetpointTemp(),
|
this->getHeatingMinSetpointTemp(),
|
||||||
this->getHeatingMaxSetpointTemp()
|
this->getHeatingMaxSetpointTemp()
|
||||||
), 0);
|
), 0);
|
||||||
}
|
|
||||||
|
|
||||||
Sensors::setValueByType(
|
Sensors::setValueByType(
|
||||||
Sensors::Type::HEATING_SETPOINT_TEMP, vars.master.heating.setpointTemp,
|
Sensors::Type::HEATING_SETPOINT_TEMP, vars.master.heating.setpointTemp,
|
||||||
@@ -101,15 +90,15 @@ protected:
|
|||||||
|
|
||||||
void hysteresis() {
|
void hysteresis() {
|
||||||
bool useHyst = false;
|
bool useHyst = false;
|
||||||
if (settings.heating.hysteresis.enabled && this->indoorSensorsConnected) {
|
if (settings.heating.hysteresis > 0.01f && this->indoorSensorsConnected) {
|
||||||
useHyst = settings.equitherm.enabled || settings.pid.enabled || settings.opentherm.options.nativeOTC;
|
useHyst = settings.equitherm.enabled || settings.pid.enabled || settings.opentherm.options.nativeHeatingControl;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (useHyst) {
|
if (useHyst) {
|
||||||
if (!vars.master.heating.blocking && vars.master.heating.indoorTemp - settings.heating.target + 0.0001f >= settings.heating.hysteresis.value) {
|
if (!vars.master.heating.blocking && vars.master.heating.indoorTemp - settings.heating.target + 0.0001f >= settings.heating.hysteresis) {
|
||||||
vars.master.heating.blocking = true;
|
vars.master.heating.blocking = true;
|
||||||
|
|
||||||
} else if (vars.master.heating.blocking && vars.master.heating.indoorTemp - settings.heating.target - 0.0001f <= -(settings.heating.hysteresis.value)) {
|
} else if (vars.master.heating.blocking && vars.master.heating.indoorTemp - settings.heating.target - 0.0001f <= -(settings.heating.hysteresis)) {
|
||||||
vars.master.heating.blocking = false;
|
vars.master.heating.blocking = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -119,13 +108,13 @@ protected:
|
|||||||
}
|
}
|
||||||
|
|
||||||
inline float getHeatingMinSetpointTemp() {
|
inline float getHeatingMinSetpointTemp() {
|
||||||
return settings.opentherm.options.nativeOTC
|
return settings.opentherm.options.nativeHeatingControl
|
||||||
? vars.master.heating.minTemp
|
? vars.master.heating.minTemp
|
||||||
: settings.heating.minTemp;
|
: settings.heating.minTemp;
|
||||||
}
|
}
|
||||||
|
|
||||||
inline float getHeatingMaxSetpointTemp() {
|
inline float getHeatingMaxSetpointTemp() {
|
||||||
return settings.opentherm.options.nativeOTC
|
return settings.opentherm.options.nativeHeatingControl
|
||||||
? vars.master.heating.maxTemp
|
? vars.master.heating.maxTemp
|
||||||
: settings.heating.maxTemp;
|
: settings.heating.maxTemp;
|
||||||
}
|
}
|
||||||
@@ -146,7 +135,7 @@ protected:
|
|||||||
if (vars.emergency.state) {
|
if (vars.emergency.state) {
|
||||||
return settings.emergency.target;
|
return settings.emergency.target;
|
||||||
|
|
||||||
} else if (settings.opentherm.options.nativeOTC) {
|
} else if (settings.opentherm.options.nativeHeatingControl) {
|
||||||
return settings.heating.target;
|
return settings.heating.target;
|
||||||
|
|
||||||
} else if (!settings.equitherm.enabled && !settings.pid.enabled) {
|
} else if (!settings.equitherm.enabled && !settings.pid.enabled) {
|
||||||
|
|||||||
@@ -149,7 +149,7 @@ public:
|
|||||||
|
|
||||||
static int16_t getIdByName(const char* name) {
|
static int16_t getIdByName(const char* name) {
|
||||||
if (settings == nullptr) {
|
if (settings == nullptr) {
|
||||||
return -1;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
for (uint8_t id = 0; id <= getMaxSensorId(); id++) {
|
for (uint8_t id = 0; id <= getMaxSensorId(); id++) {
|
||||||
@@ -163,7 +163,7 @@ public:
|
|||||||
|
|
||||||
static int16_t getIdByObjectId(const char* objectId) {
|
static int16_t getIdByObjectId(const char* objectId) {
|
||||||
if (settings == nullptr) {
|
if (settings == nullptr) {
|
||||||
return -1;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
String refObjectId;
|
String refObjectId;
|
||||||
@@ -329,12 +329,12 @@ public:
|
|||||||
|
|
||||||
static float getMeanValueByPurpose(Purpose purpose, const ValueType valueType, bool onlyConnected = true) {
|
static float getMeanValueByPurpose(Purpose purpose, const ValueType valueType, bool onlyConnected = true) {
|
||||||
if (settings == nullptr || results == nullptr) {
|
if (settings == nullptr || results == nullptr) {
|
||||||
return 0.0f;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
uint8_t valueId = (uint8_t) valueType;
|
uint8_t valueId = (uint8_t) valueType;
|
||||||
if (!isValidValueId(valueId)) {
|
if (!isValidValueId(valueId)) {
|
||||||
return 0.0f;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
float value = 0.0f;
|
float value = 0.0f;
|
||||||
@@ -363,7 +363,7 @@ public:
|
|||||||
|
|
||||||
static bool existsConnectedSensorsByPurpose(Purpose purpose) {
|
static bool existsConnectedSensorsByPurpose(Purpose purpose) {
|
||||||
if (settings == nullptr || results == nullptr) {
|
if (settings == nullptr || results == nullptr) {
|
||||||
return false;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
for (uint8_t id = 0; id <= getMaxSensorId(); id++) {
|
for (uint8_t id = 0; id <= getMaxSensorId(); id++) {
|
||||||
|
|||||||
@@ -78,8 +78,7 @@ struct Settings {
|
|||||||
bool autoFaultReset = false;
|
bool autoFaultReset = false;
|
||||||
bool autoDiagReset = false;
|
bool autoDiagReset = false;
|
||||||
bool setDateAndTime = false;
|
bool setDateAndTime = false;
|
||||||
bool alwaysSendIndoorTemp = true;
|
bool nativeHeatingControl = false;
|
||||||
bool nativeOTC = false;
|
|
||||||
bool immergasFix = false;
|
bool immergasFix = false;
|
||||||
} options;
|
} options;
|
||||||
} opentherm;
|
} opentherm;
|
||||||
@@ -104,17 +103,12 @@ struct Settings {
|
|||||||
bool enabled = true;
|
bool enabled = true;
|
||||||
bool turbo = false;
|
bool turbo = false;
|
||||||
float target = DEFAULT_HEATING_TARGET_TEMP;
|
float target = DEFAULT_HEATING_TARGET_TEMP;
|
||||||
|
float hysteresis = 0.5f;
|
||||||
float turboFactor = 7.5f;
|
float turboFactor = 7.5f;
|
||||||
uint8_t minTemp = DEFAULT_HEATING_MIN_TEMP;
|
uint8_t minTemp = DEFAULT_HEATING_MIN_TEMP;
|
||||||
uint8_t maxTemp = DEFAULT_HEATING_MAX_TEMP;
|
uint8_t maxTemp = DEFAULT_HEATING_MAX_TEMP;
|
||||||
uint8_t maxModulation = 100;
|
uint8_t maxModulation = 100;
|
||||||
|
|
||||||
struct {
|
|
||||||
bool enabled = true;
|
|
||||||
float value = 0.5f;
|
|
||||||
HysteresisAction action = HysteresisAction::DISABLE_HEATING;
|
|
||||||
} hysteresis;
|
|
||||||
|
|
||||||
struct {
|
struct {
|
||||||
uint8_t highTemp = 95;
|
uint8_t highTemp = 95;
|
||||||
uint8_t lowTemp = 90;
|
uint8_t lowTemp = 90;
|
||||||
|
|||||||
@@ -163,9 +163,4 @@ enum class UnitSystem : uint8_t {
|
|||||||
IMPERIAL = 1
|
IMPERIAL = 1
|
||||||
};
|
};
|
||||||
|
|
||||||
enum class HysteresisAction : uint8_t {
|
|
||||||
DISABLE_HEATING = 0,
|
|
||||||
SET_ZERO_TARGET = 1
|
|
||||||
};
|
|
||||||
|
|
||||||
char buffer[255];
|
char buffer[255];
|
||||||
@@ -34,7 +34,6 @@ const char L_CASCADE_OUTPUT[] PROGMEM = "CASCADE.OUTPUT";
|
|||||||
const char L_EXTPUMP[] PROGMEM = "EXTPUMP";
|
const char L_EXTPUMP[] PROGMEM = "EXTPUMP";
|
||||||
|
|
||||||
|
|
||||||
const char S_ACTION[] PROGMEM = "action";
|
|
||||||
const char S_ACTIONS[] PROGMEM = "actions";
|
const char S_ACTIONS[] PROGMEM = "actions";
|
||||||
const char S_ACTIVE[] PROGMEM = "active";
|
const char S_ACTIVE[] PROGMEM = "active";
|
||||||
const char S_ADDRESS[] PROGMEM = "address";
|
const char S_ADDRESS[] PROGMEM = "address";
|
||||||
@@ -110,7 +109,6 @@ const char S_HYSTERESIS[] PROGMEM = "hysteresis";
|
|||||||
const char S_ID[] PROGMEM = "id";
|
const char S_ID[] PROGMEM = "id";
|
||||||
const char S_IGNORE_DIAG_STATE[] PROGMEM = "ignoreDiagState";
|
const char S_IGNORE_DIAG_STATE[] PROGMEM = "ignoreDiagState";
|
||||||
const char S_IMMERGAS_FIX[] PROGMEM = "immergasFix";
|
const char S_IMMERGAS_FIX[] PROGMEM = "immergasFix";
|
||||||
const char S_ALWAYS_SEND_INDOOR_TEMP[] PROGMEM = "alwaysSendIndoorTemp";
|
|
||||||
const char S_INDOOR_TEMP[] PROGMEM = "indoorTemp";
|
const char S_INDOOR_TEMP[] PROGMEM = "indoorTemp";
|
||||||
const char S_INDOOR_TEMP_CONTROL[] PROGMEM = "indoorTempControl";
|
const char S_INDOOR_TEMP_CONTROL[] PROGMEM = "indoorTempControl";
|
||||||
const char S_IN_GPIO[] PROGMEM = "inGpio";
|
const char S_IN_GPIO[] PROGMEM = "inGpio";
|
||||||
@@ -142,7 +140,7 @@ const char S_MODEL[] PROGMEM = "model";
|
|||||||
const char S_MODULATION[] PROGMEM = "modulation";
|
const char S_MODULATION[] PROGMEM = "modulation";
|
||||||
const char S_MQTT[] PROGMEM = "mqtt";
|
const char S_MQTT[] PROGMEM = "mqtt";
|
||||||
const char S_NAME[] PROGMEM = "name";
|
const char S_NAME[] PROGMEM = "name";
|
||||||
const char S_NATIVE_OTC[] PROGMEM = "nativeOTC";
|
const char S_NATIVE_HEATING_CONTROL[] PROGMEM = "nativeHeatingControl";
|
||||||
const char S_NETWORK[] PROGMEM = "network";
|
const char S_NETWORK[] PROGMEM = "network";
|
||||||
const char S_NTP[] PROGMEM = "ntp";
|
const char S_NTP[] PROGMEM = "ntp";
|
||||||
const char S_OFFSET[] PROGMEM = "offset";
|
const char S_OFFSET[] PROGMEM = "offset";
|
||||||
|
|||||||
68
src/utils.h
68
src/utils.h
@@ -468,11 +468,9 @@ void settingsToJson(const Settings& src, JsonVariant dst, bool safe = false) {
|
|||||||
otOptions[FPSTR(S_AUTO_FAULT_RESET)] = src.opentherm.options.autoFaultReset;
|
otOptions[FPSTR(S_AUTO_FAULT_RESET)] = src.opentherm.options.autoFaultReset;
|
||||||
otOptions[FPSTR(S_AUTO_DIAG_RESET)] = src.opentherm.options.autoDiagReset;
|
otOptions[FPSTR(S_AUTO_DIAG_RESET)] = src.opentherm.options.autoDiagReset;
|
||||||
otOptions[FPSTR(S_SET_DATE_AND_TIME)] = src.opentherm.options.setDateAndTime;
|
otOptions[FPSTR(S_SET_DATE_AND_TIME)] = src.opentherm.options.setDateAndTime;
|
||||||
otOptions[FPSTR(S_ALWAYS_SEND_INDOOR_TEMP)] = src.opentherm.options.alwaysSendIndoorTemp;
|
otOptions[FPSTR(S_NATIVE_HEATING_CONTROL)] = src.opentherm.options.nativeHeatingControl;
|
||||||
otOptions[FPSTR(S_NATIVE_OTC)] = src.opentherm.options.nativeOTC;
|
|
||||||
otOptions[FPSTR(S_IMMERGAS_FIX)] = src.opentherm.options.immergasFix;
|
otOptions[FPSTR(S_IMMERGAS_FIX)] = src.opentherm.options.immergasFix;
|
||||||
|
|
||||||
|
|
||||||
auto mqtt = dst[FPSTR(S_MQTT)].to<JsonObject>();
|
auto mqtt = dst[FPSTR(S_MQTT)].to<JsonObject>();
|
||||||
mqtt[FPSTR(S_ENABLED)] = src.mqtt.enabled;
|
mqtt[FPSTR(S_ENABLED)] = src.mqtt.enabled;
|
||||||
mqtt[FPSTR(S_SERVER)] = src.mqtt.server;
|
mqtt[FPSTR(S_SERVER)] = src.mqtt.server;
|
||||||
@@ -492,9 +490,7 @@ void settingsToJson(const Settings& src, JsonVariant dst, bool safe = false) {
|
|||||||
heating[FPSTR(S_ENABLED)] = src.heating.enabled;
|
heating[FPSTR(S_ENABLED)] = src.heating.enabled;
|
||||||
heating[FPSTR(S_TURBO)] = src.heating.turbo;
|
heating[FPSTR(S_TURBO)] = src.heating.turbo;
|
||||||
heating[FPSTR(S_TARGET)] = roundf(src.heating.target, 2);
|
heating[FPSTR(S_TARGET)] = roundf(src.heating.target, 2);
|
||||||
heating[FPSTR(S_HYSTERESIS)][FPSTR(S_ENABLED)] = src.heating.hysteresis.enabled;
|
heating[FPSTR(S_HYSTERESIS)] = roundf(src.heating.hysteresis, 3);
|
||||||
heating[FPSTR(S_HYSTERESIS)][FPSTR(S_VALUE)] = roundf(src.heating.hysteresis.value, 3);
|
|
||||||
heating[FPSTR(S_HYSTERESIS)][FPSTR(S_ACTION)] = static_cast<uint8_t>(src.heating.hysteresis.action);
|
|
||||||
heating[FPSTR(S_TURBO_FACTOR)] = roundf(src.heating.turboFactor, 3);
|
heating[FPSTR(S_TURBO_FACTOR)] = roundf(src.heating.turboFactor, 3);
|
||||||
heating[FPSTR(S_MIN_TEMP)] = src.heating.minTemp;
|
heating[FPSTR(S_MIN_TEMP)] = src.heating.minTemp;
|
||||||
heating[FPSTR(S_MAX_TEMP)] = src.heating.maxTemp;
|
heating[FPSTR(S_MAX_TEMP)] = src.heating.maxTemp;
|
||||||
@@ -1005,20 +1001,11 @@ bool jsonToSettings(const JsonVariantConst src, Settings& dst, bool safe = false
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (src[FPSTR(S_OPENTHERM)][FPSTR(S_OPTIONS)][FPSTR(S_ALWAYS_SEND_INDOOR_TEMP)].is<bool>()) {
|
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_ALWAYS_SEND_INDOOR_TEMP)].as<bool>();
|
bool value = src[FPSTR(S_OPENTHERM)][FPSTR(S_OPTIONS)][FPSTR(S_NATIVE_HEATING_CONTROL)].as<bool>();
|
||||||
|
|
||||||
if (value != dst.opentherm.options.alwaysSendIndoorTemp) {
|
if (value != dst.opentherm.options.nativeHeatingControl) {
|
||||||
dst.opentherm.options.alwaysSendIndoorTemp = value;
|
dst.opentherm.options.nativeHeatingControl = value;
|
||||||
changed = true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (src[FPSTR(S_OPENTHERM)][FPSTR(S_OPTIONS)][FPSTR(S_NATIVE_OTC)].is<bool>()) {
|
|
||||||
bool value = src[FPSTR(S_OPENTHERM)][FPSTR(S_OPTIONS)][FPSTR(S_NATIVE_OTC)].as<bool>();
|
|
||||||
|
|
||||||
if (value != dst.opentherm.options.nativeOTC) {
|
|
||||||
dst.opentherm.options.nativeOTC = value;
|
|
||||||
|
|
||||||
if (value) {
|
if (value) {
|
||||||
dst.equitherm.enabled = false;
|
dst.equitherm.enabled = false;
|
||||||
@@ -1038,6 +1025,7 @@ bool jsonToSettings(const JsonVariantConst src, Settings& dst, bool safe = false
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// mqtt
|
// mqtt
|
||||||
if (src[FPSTR(S_MQTT)][FPSTR(S_ENABLED)].is<bool>()) {
|
if (src[FPSTR(S_MQTT)][FPSTR(S_ENABLED)].is<bool>()) {
|
||||||
bool value = src[FPSTR(S_MQTT)][FPSTR(S_ENABLED)].as<bool>();
|
bool value = src[FPSTR(S_MQTT)][FPSTR(S_ENABLED)].as<bool>();
|
||||||
@@ -1128,7 +1116,7 @@ bool jsonToSettings(const JsonVariantConst src, Settings& dst, bool safe = false
|
|||||||
if (src[FPSTR(S_EQUITHERM)][FPSTR(S_ENABLED)].is<bool>()) {
|
if (src[FPSTR(S_EQUITHERM)][FPSTR(S_ENABLED)].is<bool>()) {
|
||||||
bool value = src[FPSTR(S_EQUITHERM)][FPSTR(S_ENABLED)].as<bool>();
|
bool value = src[FPSTR(S_EQUITHERM)][FPSTR(S_ENABLED)].as<bool>();
|
||||||
|
|
||||||
if (!dst.opentherm.options.nativeOTC) {
|
if (!dst.opentherm.options.nativeHeatingControl) {
|
||||||
if (value != dst.equitherm.enabled) {
|
if (value != dst.equitherm.enabled) {
|
||||||
dst.equitherm.enabled = value;
|
dst.equitherm.enabled = value;
|
||||||
changed = true;
|
changed = true;
|
||||||
@@ -1181,7 +1169,7 @@ bool jsonToSettings(const JsonVariantConst src, Settings& dst, bool safe = false
|
|||||||
if (src[FPSTR(S_PID)][FPSTR(S_ENABLED)].is<bool>()) {
|
if (src[FPSTR(S_PID)][FPSTR(S_ENABLED)].is<bool>()) {
|
||||||
bool value = src[FPSTR(S_PID)][FPSTR(S_ENABLED)].as<bool>();
|
bool value = src[FPSTR(S_PID)][FPSTR(S_ENABLED)].as<bool>();
|
||||||
|
|
||||||
if (!dst.opentherm.options.nativeOTC) {
|
if (!dst.opentherm.options.nativeHeatingControl) {
|
||||||
if (value != dst.pid.enabled) {
|
if (value != dst.pid.enabled) {
|
||||||
dst.pid.enabled = value;
|
dst.pid.enabled = value;
|
||||||
changed = true;
|
changed = true;
|
||||||
@@ -1326,41 +1314,15 @@ bool jsonToSettings(const JsonVariantConst src, Settings& dst, bool safe = false
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (src[FPSTR(S_HEATING)][FPSTR(S_HYSTERESIS)][FPSTR(S_ENABLED)].is<bool>()) {
|
if (!src[FPSTR(S_HEATING)][FPSTR(S_HYSTERESIS)].isNull()) {
|
||||||
bool value = src[FPSTR(S_HEATING)][FPSTR(S_HYSTERESIS)][FPSTR(S_ENABLED)].as<bool>();
|
float value = src[FPSTR(S_HEATING)][FPSTR(S_HYSTERESIS)].as<float>();
|
||||||
|
|
||||||
if (value != dst.heating.hysteresis.enabled) {
|
if (value >= 0.0f && value <= 15.0f && fabsf(value - dst.heating.hysteresis) > 0.0001f) {
|
||||||
dst.heating.hysteresis.enabled = value;
|
dst.heating.hysteresis = roundf(value, 2);
|
||||||
changed = true;
|
changed = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!src[FPSTR(S_HEATING)][FPSTR(S_HYSTERESIS)][FPSTR(S_VALUE)].isNull()) {
|
|
||||||
float value = src[FPSTR(S_HEATING)][FPSTR(S_HYSTERESIS)][FPSTR(S_VALUE)].as<float>();
|
|
||||||
|
|
||||||
if (value >= 0.0f && value <= 15.0f && fabsf(value - dst.heating.hysteresis.value) > 0.0001f) {
|
|
||||||
dst.heating.hysteresis.value = roundf(value, 2);
|
|
||||||
changed = true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!src[FPSTR(S_HEATING)][FPSTR(S_HYSTERESIS)][FPSTR(S_ACTION)].isNull()) {
|
|
||||||
uint8_t value = src[FPSTR(S_HEATING)][FPSTR(S_HYSTERESIS)][FPSTR(S_ACTION)].as<uint8_t>();
|
|
||||||
|
|
||||||
switch (value) {
|
|
||||||
case static_cast<uint8_t>(HysteresisAction::DISABLE_HEATING):
|
|
||||||
case static_cast<uint8_t>(HysteresisAction::SET_ZERO_TARGET):
|
|
||||||
if (static_cast<uint8_t>(dst.heating.hysteresis.action) != value) {
|
|
||||||
dst.heating.hysteresis.action = static_cast<HysteresisAction>(value);
|
|
||||||
changed = true;
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
|
|
||||||
default:
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!src[FPSTR(S_HEATING)][FPSTR(S_TURBO_FACTOR)].isNull()) {
|
if (!src[FPSTR(S_HEATING)][FPSTR(S_TURBO_FACTOR)].isNull()) {
|
||||||
float value = src[FPSTR(S_HEATING)][FPSTR(S_TURBO_FACTOR)].as<float>();
|
float value = src[FPSTR(S_HEATING)][FPSTR(S_TURBO_FACTOR)].as<float>();
|
||||||
|
|
||||||
@@ -1714,7 +1676,7 @@ bool jsonToSettings(const JsonVariantConst src, Settings& dst, bool safe = false
|
|||||||
// force check emergency target
|
// force check emergency target
|
||||||
{
|
{
|
||||||
float value = !src[FPSTR(S_EMERGENCY)][FPSTR(S_TARGET)].isNull() ? src[FPSTR(S_EMERGENCY)][FPSTR(S_TARGET)].as<float>() : dst.emergency.target;
|
float value = !src[FPSTR(S_EMERGENCY)][FPSTR(S_TARGET)].isNull() ? src[FPSTR(S_EMERGENCY)][FPSTR(S_TARGET)].as<float>() : dst.emergency.target;
|
||||||
bool noRegulators = !dst.opentherm.options.nativeOTC;
|
bool noRegulators = !dst.opentherm.options.nativeHeatingControl;
|
||||||
bool valid = isValidTemp(
|
bool valid = isValidTemp(
|
||||||
value,
|
value,
|
||||||
dst.system.unitSystem,
|
dst.system.unitSystem,
|
||||||
@@ -1739,7 +1701,7 @@ bool jsonToSettings(const JsonVariantConst src, Settings& dst, bool safe = false
|
|||||||
|
|
||||||
// force check heating target
|
// force check heating target
|
||||||
{
|
{
|
||||||
bool indoorTempControl = dst.equitherm.enabled || dst.pid.enabled || dst.opentherm.options.nativeOTC;
|
bool indoorTempControl = dst.equitherm.enabled || dst.pid.enabled || dst.opentherm.options.nativeHeatingControl;
|
||||||
float minTemp = indoorTempControl ? THERMOSTAT_INDOOR_MIN_TEMP : dst.heating.minTemp;
|
float minTemp = indoorTempControl ? THERMOSTAT_INDOOR_MIN_TEMP : dst.heating.minTemp;
|
||||||
float maxTemp = indoorTempControl ? THERMOSTAT_INDOOR_MAX_TEMP : dst.heating.maxTemp;
|
float maxTemp = indoorTempControl ? THERMOSTAT_INDOOR_MAX_TEMP : dst.heating.maxTemp;
|
||||||
|
|
||||||
|
|||||||
@@ -356,16 +356,7 @@
|
|||||||
},
|
},
|
||||||
|
|
||||||
"heating": {
|
"heating": {
|
||||||
"hyst": {
|
"hyst": "滞后值<small>(单位:度)</small>",
|
||||||
"title": "滞回",
|
|
||||||
"desc": "滞回有助于维持设定的室内温度(在使用«Equitherm»和/或«PID»时)。强制禁用加热当<code>current indoor > target + value</code>,启用加热当<code>current indoor < (target - value)</code>。",
|
|
||||||
"value": "值 <small>(以度为单位)</small>",
|
|
||||||
"action": {
|
|
||||||
"title": "行动",
|
|
||||||
"disableHeating": "禁用加热",
|
|
||||||
"set0target": "设置空目标"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"turboFactor": "Turbo 模式系数"
|
"turboFactor": "Turbo 模式系数"
|
||||||
},
|
},
|
||||||
|
|
||||||
@@ -380,26 +371,11 @@
|
|||||||
},
|
},
|
||||||
|
|
||||||
"equitherm": {
|
"equitherm": {
|
||||||
"slope": {
|
"n": "N 系数",
|
||||||
"title": "斜率",
|
"k": "K 系数",
|
||||||
"note": "热损失补偿。主要调谐参数。"
|
"t": {
|
||||||
},
|
"title": "T 系数",
|
||||||
"exponent": {
|
"note": "启用PID时此参数无效"
|
||||||
"title": "指数",
|
|
||||||
"note": "散热器效率。典型值:<code>1.1</code> - 地板采暖,<code>1.2</code> - 铸铁,<code>1.3</code> - 面板散热器,<code>1.4</code> - 对流器。"
|
|
||||||
},
|
|
||||||
"shift": {
|
|
||||||
"title": "偏移",
|
|
||||||
"note": "补偿额外热损失(例如,在管道中)或额外热源。"
|
|
||||||
},
|
|
||||||
"targetDiffFactor": {
|
|
||||||
"title": "T 因子",
|
|
||||||
"note": "如果启用 PID,则不使用。将目标和当前室内温度之间的差值添加到设定点:<code>setpoint = setpoint + ((target - indoor) * T)</code>。"
|
|
||||||
},
|
|
||||||
"chart": {
|
|
||||||
"targetTemp": "目标室内温度",
|
|
||||||
"setpointTemp": "热载体温度",
|
|
||||||
"outdoorTemp": "室外温度"
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
@@ -457,13 +433,12 @@
|
|||||||
"autoFaultReset": "自动报警复位 <small>(不推荐!)</small>",
|
"autoFaultReset": "自动报警复位 <small>(不推荐!)</small>",
|
||||||
"autoDiagReset": "自动诊断复位 <small>(不推荐!)</small>",
|
"autoDiagReset": "自动诊断复位 <small>(不推荐!)</small>",
|
||||||
"setDateAndTime": "同步设置锅炉日期与时间",
|
"setDateAndTime": "同步设置锅炉日期与时间",
|
||||||
"immergasFix": "针对Immergas锅炉的兼容性修复",
|
"immergasFix": "针对Immergas锅炉的兼容性修复"
|
||||||
"alwaysSendIndoorTemp": "向锅炉发送当前室内温度"
|
|
||||||
},
|
},
|
||||||
|
|
||||||
"nativeOTC": {
|
"nativeHeating": {
|
||||||
"title": "原生热载体温度计算模式",
|
"title": "原生锅炉供暖控制",
|
||||||
"note": "仅在锅炉处于 OTC 模式时<u>才</u>工作:需要并接受目标室内温度,并基于内置曲线模式自行调节热载体温度。与 PID 和 Equitherm 不兼容。"
|
"note": "<u>注意:</u> 仅适用于锅炉需接收目标室温并自主调节载热介质温度的场景,与固件中的PID及Equithermq气候补偿功能不兼容。"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|||||||
@@ -356,16 +356,7 @@
|
|||||||
},
|
},
|
||||||
|
|
||||||
"heating": {
|
"heating": {
|
||||||
"hyst": {
|
"hyst": "Hysteresis <small>(in degrees)</small>",
|
||||||
"title": "Hysteresis",
|
|
||||||
"desc": "Hysteresis is useful for maintaining a set indoor temp (when using «Equitherm» and/or «PID»). Forces disable heating when <code>current indoor > target + value</code> and enable heating when <code>current indoor < (target - value)</code>.",
|
|
||||||
"value": "Value <small>(in degrees)</small>",
|
|
||||||
"action": {
|
|
||||||
"title": "Action",
|
|
||||||
"disableHeating": "Disable heating",
|
|
||||||
"set0target": "Set null target"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"turboFactor": "Turbo mode coeff."
|
"turboFactor": "Turbo mode coeff."
|
||||||
},
|
},
|
||||||
|
|
||||||
@@ -457,13 +448,12 @@
|
|||||||
"autoFaultReset": "Auto fault reset <small>(not recommended!)</small>",
|
"autoFaultReset": "Auto fault reset <small>(not recommended!)</small>",
|
||||||
"autoDiagReset": "Auto diag reset <small>(not recommended!)</small>",
|
"autoDiagReset": "Auto diag reset <small>(not recommended!)</small>",
|
||||||
"setDateAndTime": "Set date & time on boiler",
|
"setDateAndTime": "Set date & time on boiler",
|
||||||
"immergasFix": "Fix for Immergas boilers",
|
"immergasFix": "Fix for Immergas boilers"
|
||||||
"alwaysSendIndoorTemp": "Send current indoor temp to boiler"
|
|
||||||
},
|
},
|
||||||
|
|
||||||
"nativeOTC": {
|
"nativeHeating": {
|
||||||
"title": "Native OTC mode",
|
"title": "Native heating control (boiler)",
|
||||||
"note": "Works <u>ONLY</u> if the boiler is in OTC mode: requires and accepts the target indoor temperature and self-regulates the heat carrier temperature based on the built-in curves mode. Incompatible with PID and Equitherm."
|
"note": "Works <u>ONLY</u> if the boiler requires the desired room temperature and regulates the temperature of the coolant itself. Not compatible with PID and Equitherm regulators in firmware."
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|||||||
@@ -356,16 +356,7 @@
|
|||||||
},
|
},
|
||||||
|
|
||||||
"heating": {
|
"heating": {
|
||||||
"hyst": {
|
"hyst": "Isteresi <small>(in gradi)</small>",
|
||||||
"title": "Isteresi",
|
|
||||||
"desc": "L'isteresi è utile per mantenere una temperatura interna impostata (quando si utilizza «Equitherm» e/o «PID»). Forza la disabilitazione del riscaldamento quando <code>current indoor > target + value</code> e abilita il riscaldamento quando <code>current indoor < (target - value)</code>.",
|
|
||||||
"value": "Valore <small>(in gradi)</small>",
|
|
||||||
"action": {
|
|
||||||
"title": "Azione",
|
|
||||||
"disableHeating": "Disabilita riscaldamento",
|
|
||||||
"set0target": "Imposta target nullo"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"turboFactor": "Turbo mode coeff."
|
"turboFactor": "Turbo mode coeff."
|
||||||
},
|
},
|
||||||
|
|
||||||
@@ -382,23 +373,23 @@
|
|||||||
"equitherm": {
|
"equitherm": {
|
||||||
"slope": {
|
"slope": {
|
||||||
"title": "Pendenza",
|
"title": "Pendenza",
|
||||||
"note": "Compensazione della perdita di calore. Parametro di regolazione principale."
|
"note": "Compensazione delle perdite di calore. Principale parametro di regolazione."
|
||||||
},
|
},
|
||||||
"exponent": {
|
"exponent": {
|
||||||
"title": "Esponente",
|
"title": "Esponente",
|
||||||
"note": "Efficienza del radiatore. Valori tipici: <code>1.1</code> - Riscaldamento a pavimento, <code>1.2</code> - Ghisa, <code>1.3</code> - Radiatori a pannello, <code>1.4</code> - Convettori."
|
"note": "Efficienza del radiatore. Valori tipici: <code>1.1</code> - Riscaldamento a pavimento, <code>1.2</code> - Radiatori in ghisa, <code>1.3</code> - Radiatori a pannelli, <code>1.4</code> - Convetttori."
|
||||||
},
|
},
|
||||||
"shift": {
|
"shift": {
|
||||||
"title": "Spostamento",
|
"title": "Spostare",
|
||||||
"note": "Compensa perdite di calore aggiuntive (ad es., nelle tubature) o fonti di calore extra."
|
"note": "Compensa le perdite di calore aggiuntive (ad esempio, nelle tubature) o fonti di calore extra."
|
||||||
},
|
},
|
||||||
"targetDiffFactor": {
|
"targetDiffFactor": {
|
||||||
"title": "Fattore T",
|
"title": "Fattore T",
|
||||||
"note": "Non utilizzato se PID è abilitato. Aggiunge al setpoint la differenza tra la temperatura target e quella interna attuale: <code>setpoint = setpoint + ((target - indoor) * T)</code>."
|
"note": "Non usato se PID è attivato. Aggiunge al setpoint la differenza tra la temperatura interna target e quella attuale: <code>setpoint = setpoint + ((target - indoor) * T)</code>."
|
||||||
},
|
},
|
||||||
"chart": {
|
"chart": {
|
||||||
"targetTemp": "Temperatura interna target",
|
"targetTemp": "Temperatura interna target",
|
||||||
"setpointTemp": "Temperatura del vettore termico",
|
"setpointTemp": "Temperatura del portatore di calore",
|
||||||
"outdoorTemp": "Temperatura esterna"
|
"outdoorTemp": "Temperatura esterna"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -457,13 +448,12 @@
|
|||||||
"autoFaultReset": "Ripristino automatico degli errori <small>(sconsigliato!)</small>",
|
"autoFaultReset": "Ripristino automatico degli errori <small>(sconsigliato!)</small>",
|
||||||
"autoDiagReset": "Ripristino diagnostico automatica <small>(sconsigliato!)</small>",
|
"autoDiagReset": "Ripristino diagnostico automatica <small>(sconsigliato!)</small>",
|
||||||
"setDateAndTime": "Imposta data e ora sulla caldaia",
|
"setDateAndTime": "Imposta data e ora sulla caldaia",
|
||||||
"immergasFix": "Fix per caldiaie Immergas",
|
"immergasFix": "Fix per caldiaie Immergas"
|
||||||
"alwaysSendIndoorTemp": "Invia la temp attuale interna alla caldaia"
|
|
||||||
},
|
},
|
||||||
|
|
||||||
"nativeOTC": {
|
"nativeHeating": {
|
||||||
"title": "Modalità nativa di calcolo della temperatura del vettore termico",
|
"title": "Controllo del riscaldamento nativo (caldaia)",
|
||||||
"note": "Funziona <u>SOLO</u> se la caldaia è in modalità OTC: richiede e accetta la temperatura interna target e regola autonomamente la temperatura del vettore termico basata sulla modalità curve integrata. Incompatibile con PID e Equitherm."
|
"note": "Lavora <u>SOLO</u> se la caldaia richiede la temperatura ambiente desiderata e regola autonomamente la temperatura del fluido. Non compatiblile con regolazioni PID e Equitherm del sistema."
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|||||||
@@ -327,16 +327,7 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"heating": {
|
"heating": {
|
||||||
"hyst": {
|
"hyst": "Hysterese <small>(in graden)</small>",
|
||||||
"title": "Hysterese",
|
|
||||||
"desc": "Hysterese is nuttig voor het handhaven van een ingestelde binnentemperatuur (bij gebruik van «Equitherm» en/of «PID»). Forceert uitschakelen van verwarming wanneer <code>current indoor > target + value</code> en inschakelen van verwarming wanneer <code>current indoor < (target - value)</code>.",
|
|
||||||
"value": "Waarde <small>(in graden)</small>",
|
|
||||||
"action": {
|
|
||||||
"title": "Actie",
|
|
||||||
"disableHeating": "Verwarming uitschakelen",
|
|
||||||
"set0target": "Stel null target in"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"turboFactor": "Turbomodus coëff."
|
"turboFactor": "Turbomodus coëff."
|
||||||
},
|
},
|
||||||
"emergency": {
|
"emergency": {
|
||||||
@@ -348,26 +339,11 @@
|
|||||||
"treshold": "Drempeltijd <small>(sec)</small>"
|
"treshold": "Drempeltijd <small>(sec)</small>"
|
||||||
},
|
},
|
||||||
"equitherm": {
|
"equitherm": {
|
||||||
"slope": {
|
"n": "N-factor",
|
||||||
"title": "Helling",
|
"k": "K-factor",
|
||||||
"note": "Compensatie voor warmteverlies. Hoofdafstelparameter."
|
"t": {
|
||||||
},
|
"title": "T-factor",
|
||||||
"exponent": {
|
"note": "Niet gebruikt als PID is ingeschakeld"
|
||||||
"title": "Exponent",
|
|
||||||
"note": "Radiator efficiëntie. Typische waarden: <code>1.1</code> - Vloerverwarming, <code>1.2</code> - Gietijzer, <code>1.3</code> - Paneelradiatoren, <code>1.4</code> - Convectors."
|
|
||||||
},
|
|
||||||
"shift": {
|
|
||||||
"title": "Verschuiving",
|
|
||||||
"note": "Compenseert voor extra warmteverliezen (bijv. in leidingen) of extra warmtebronnen."
|
|
||||||
},
|
|
||||||
"targetDiffFactor": {
|
|
||||||
"title": "T factor",
|
|
||||||
"note": "Niet gebruikt als PID is ingeschakeld. Voegt aan de setpoint de verschil tussen de target en huidige binnentemperatuur toe: <code>setpoint = setpoint + ((target - indoor) * T)</code>."
|
|
||||||
},
|
|
||||||
"chart": {
|
|
||||||
"targetTemp": "Doel binnentemperatuur",
|
|
||||||
"setpointTemp": "Warmtedrager temperatuur",
|
|
||||||
"outdoorTemp": "Buitentemperatuur"
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"pid": {
|
"pid": {
|
||||||
@@ -422,13 +398,11 @@
|
|||||||
"autoFaultReset": "Automatische storingsreset <small>(niet aanbevolen!)</small>",
|
"autoFaultReset": "Automatische storingsreset <small>(niet aanbevolen!)</small>",
|
||||||
"autoDiagReset": "Automatische diagnosereset <small>(niet aanbevolen!)</small>",
|
"autoDiagReset": "Automatische diagnosereset <small>(niet aanbevolen!)</small>",
|
||||||
"setDateAndTime": "Stel datum & tijd in op ketel",
|
"setDateAndTime": "Stel datum & tijd in op ketel",
|
||||||
"immergasFix": "Fix voor Immergas-ketels",
|
"immergasFix": "Fix voor Immergas-ketels"
|
||||||
"alwaysSendIndoorTemp": "Stuur huidige binnentemp naar ketel"
|
|
||||||
},
|
},
|
||||||
|
"nativeHeating": {
|
||||||
"nativeOTC": {
|
"title": "Natuurlijke verwarmingsregeling (ketel)",
|
||||||
"title": "Native warmtedrager temperatuur berekeningsmodus",
|
"note": "Werkt <u>ALLEEN</u> als de ketel de gewenste kamertemperatuur vereist en zelf de temperatuur van de warmtedrager regelt. Niet compatibel met PID- en Equitherm-regelaars in de firmware."
|
||||||
"note": "Werkt <u>ALLEEN</u> als de ketel in OTC-modus is: vereist en accepteert de doel binnentemperatuur en regelt zelf de warmtedrager temperatuur op basis van de ingebouwde curves modus. Incompatibel met PID en Equitherm."
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"mqtt": {
|
"mqtt": {
|
||||||
|
|||||||
@@ -356,16 +356,7 @@
|
|||||||
},
|
},
|
||||||
|
|
||||||
"heating": {
|
"heating": {
|
||||||
"hyst": {
|
"hyst": "Гистерезис <small>(в градусах)</small>",
|
||||||
"title": "Гистерезис",
|
|
||||||
"desc": "Гистерезис полезен для поддержания заданной внутр. темп. (при использовании «ПЗА» и/или «ПИД»). Принудительно откл. отопление, когда <code>current indoor > target + value</code>, и вкл. отопление, когда <code>current indoor < (target - value)</code>.",
|
|
||||||
"value": "Значение <small>(в градусах)</small>",
|
|
||||||
"action": {
|
|
||||||
"title": "Действие",
|
|
||||||
"disableHeating": "Отключить отопление",
|
|
||||||
"set0target": "Установить 0 в качестве целевой темп."
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"turboFactor": "Коэфф. турбо режима"
|
"turboFactor": "Коэфф. турбо режима"
|
||||||
},
|
},
|
||||||
|
|
||||||
@@ -457,13 +448,12 @@
|
|||||||
"autoFaultReset": "Автоматический сброс ошибок <small>(не рекомендуется!)</small>",
|
"autoFaultReset": "Автоматический сброс ошибок <small>(не рекомендуется!)</small>",
|
||||||
"autoDiagReset": "Автоматический сброс диагностики <small>(не рекомендуется!)</small>",
|
"autoDiagReset": "Автоматический сброс диагностики <small>(не рекомендуется!)</small>",
|
||||||
"setDateAndTime": "Устанавливать время и дату на котле",
|
"setDateAndTime": "Устанавливать время и дату на котле",
|
||||||
"immergasFix": "Фикс для котлов Immergas",
|
"immergasFix": "Фикс для котлов Immergas"
|
||||||
"alwaysSendIndoorTemp": "Передавать текущую темп. в помещении котлу"
|
|
||||||
},
|
},
|
||||||
|
|
||||||
"nativeOTC": {
|
"nativeHeating": {
|
||||||
"title": "Нативный режим OTC (расчёт температуры теплоносителя)",
|
"title": "Передать управление отоплением котлу",
|
||||||
"note": "Работает <u>ТОЛЬКО</u> если котел в режиме OTC: требует и принимает целевую температуру в помещении и сам регулирует температуру теплоносителя на основе встроенного режима кривых. Несовместимо с ПИД и ПЗА."
|
"note": "Работает <u>ТОЛЬКО</u> если котел требует и принимает целевую температуру в помещении и сам регулирует температуру теплоносителя на основе встроенного режима кривых. Несовместимо с ПИД и ПЗА."
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|||||||
@@ -193,48 +193,21 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="grid">
|
<div class="grid">
|
||||||
|
<label>
|
||||||
|
<span data-i18n>settings.heating.hyst</span>
|
||||||
|
<input type="number" inputmode="decimal" name="heating[hysteresis]" min="0" max="5" step="0.05" required>
|
||||||
|
</label>
|
||||||
|
|
||||||
<label>
|
<label>
|
||||||
<span data-i18n>settings.heating.turboFactor</span>
|
<span data-i18n>settings.heating.turboFactor</span>
|
||||||
<input type="number" inputmode="decimal" name="heating[turboFactor]" min="1.5" max="10" step="0.1" required>
|
<input type="number" inputmode="decimal" name="heating[turboFactor]" min="1.5" max="10" step="0.1" required>
|
||||||
</label>
|
</label>
|
||||||
|
</div>
|
||||||
|
|
||||||
<label>
|
<label>
|
||||||
<span data-i18n>settings.maxModulation</span>
|
<span data-i18n>settings.maxModulation</span>
|
||||||
<input type="number" inputmode="numeric" name="heating[maxModulation]" min="1" max="100" step="1" required>
|
<input type="number" inputmode="numeric" name="heating[maxModulation]" min="1" max="100" step="1" required>
|
||||||
</label>
|
</label>
|
||||||
</div>
|
|
||||||
|
|
||||||
<hr />
|
|
||||||
|
|
||||||
<details>
|
|
||||||
<summary><b data-i18n>settings.heating.hyst.title</b></summary>
|
|
||||||
|
|
||||||
<div>
|
|
||||||
<fieldset>
|
|
||||||
<label>
|
|
||||||
<input type="checkbox" name="heating[hysteresis][enabled]" value="true">
|
|
||||||
<span data-i18n>settings.enable</span>
|
|
||||||
</label>
|
|
||||||
</fieldset>
|
|
||||||
|
|
||||||
<div class="grid">
|
|
||||||
<label>
|
|
||||||
<span data-i18n>settings.heating.hyst.value</span>
|
|
||||||
<input type="number" inputmode="decimal" name="heating[hysteresis][value]" min="0" max="5" step="0.05" required>
|
|
||||||
</label>
|
|
||||||
|
|
||||||
<label>
|
|
||||||
<span data-i18n>settings.heating.hyst.action.title</span>
|
|
||||||
<select name="heating[hysteresis][action]">
|
|
||||||
<option value="0" data-i18n>settings.heating.hyst.action.disableHeating</option>
|
|
||||||
<option value="1" data-i18n>settings.heating.hyst.action.set0target</option>
|
|
||||||
</select>
|
|
||||||
</label>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<small data-i18n>settings.heating.hyst.desc</small>
|
|
||||||
</details>
|
|
||||||
|
|
||||||
<hr />
|
<hr />
|
||||||
|
|
||||||
@@ -692,17 +665,12 @@
|
|||||||
<span data-i18n>settings.ot.options.immergasFix</span>
|
<span data-i18n>settings.ot.options.immergasFix</span>
|
||||||
</label>
|
</label>
|
||||||
|
|
||||||
<label>
|
|
||||||
<input type="checkbox" name="opentherm[options][alwaysSendIndoorTemp]" value="true">
|
|
||||||
<span data-i18n>settings.ot.options.alwaysSendIndoorTemp</span>
|
|
||||||
</label>
|
|
||||||
|
|
||||||
<hr />
|
<hr />
|
||||||
|
|
||||||
<label>
|
<label>
|
||||||
<input type="checkbox" name="opentherm[options][nativeOTC]" value="true">
|
<input type="checkbox" name="opentherm[options][nativeHeatingControl]" value="true">
|
||||||
<span data-i18n>settings.ot.nativeOTC.title</span><br />
|
<span data-i18n>settings.ot.nativeHeating.title</span><br />
|
||||||
<small data-i18n>settings.ot.nativeOTC.note</small>
|
<small data-i18n>settings.ot.nativeHeating.note</small>
|
||||||
</label>
|
</label>
|
||||||
</fieldset>
|
</fieldset>
|
||||||
</div>
|
</div>
|
||||||
@@ -1122,9 +1090,8 @@
|
|||||||
setCheckboxValue("[name='opentherm[options][autoFaultReset]']", data.opentherm.options.autoFaultReset);
|
setCheckboxValue("[name='opentherm[options][autoFaultReset]']", data.opentherm.options.autoFaultReset);
|
||||||
setCheckboxValue("[name='opentherm[options][autoDiagReset]']", data.opentherm.options.autoDiagReset);
|
setCheckboxValue("[name='opentherm[options][autoDiagReset]']", data.opentherm.options.autoDiagReset);
|
||||||
setCheckboxValue("[name='opentherm[options][setDateAndTime]']", data.opentherm.options.setDateAndTime);
|
setCheckboxValue("[name='opentherm[options][setDateAndTime]']", data.opentherm.options.setDateAndTime);
|
||||||
setCheckboxValue("[name='opentherm[options][nativeOTC]']", data.opentherm.options.nativeOTC);
|
setCheckboxValue("[name='opentherm[options][nativeHeatingControl]']", data.opentherm.options.nativeHeatingControl);
|
||||||
setCheckboxValue("[name='opentherm[options][immergasFix]']", data.opentherm.options.immergasFix);
|
setCheckboxValue("[name='opentherm[options][immergasFix]']", data.opentherm.options.immergasFix);
|
||||||
setCheckboxValue("[name='opentherm[options][alwaysSendIndoorTemp]']", data.opentherm.options.alwaysSendIndoorTemp);
|
|
||||||
setBusy('#ot-settings-busy', '#ot-settings', false);
|
setBusy('#ot-settings-busy', '#ot-settings', false);
|
||||||
|
|
||||||
// MQTT
|
// MQTT
|
||||||
@@ -1171,9 +1138,7 @@
|
|||||||
"min": data.system.unitSystem == 0 ? 1 : 33,
|
"min": data.system.unitSystem == 0 ? 1 : 33,
|
||||||
"max": data.system.unitSystem == 0 ? 100 : 212
|
"max": data.system.unitSystem == 0 ? 100 : 212
|
||||||
});
|
});
|
||||||
setCheckboxValue("[name='heating[hysteresis][enabled]']", data.heating.hysteresis.enabled);
|
setInputValue("[name='heating[hysteresis]']", data.heating.hysteresis);
|
||||||
setInputValue("[name='heating[hysteresis][value]']", data.heating.hysteresis.value);
|
|
||||||
setSelectValue("[name='heating[hysteresis][action]']", data.heating.hysteresis.action);
|
|
||||||
setInputValue("[name='heating[turboFactor]']", data.heating.turboFactor);
|
setInputValue("[name='heating[turboFactor]']", data.heating.turboFactor);
|
||||||
setInputValue("[name='heating[maxModulation]']", data.heating.maxModulation);
|
setInputValue("[name='heating[maxModulation]']", data.heating.maxModulation);
|
||||||
setInputValue("[name='heating[overheatProtection][highTemp]']", data.heating.overheatProtection.highTemp, {
|
setInputValue("[name='heating[overheatProtection][highTemp]']", data.heating.overheatProtection.highTemp, {
|
||||||
@@ -1212,7 +1177,7 @@
|
|||||||
setBusy('#dhw-settings-busy', '#dhw-settings', false);
|
setBusy('#dhw-settings-busy', '#dhw-settings', false);
|
||||||
|
|
||||||
// Emergency mode
|
// Emergency mode
|
||||||
if (data.opentherm.options.nativeOTC) {
|
if (data.opentherm.options.nativeHeatingControl) {
|
||||||
setInputValue("[name='emergency[target]']", data.emergency.target, {
|
setInputValue("[name='emergency[target]']", data.emergency.target, {
|
||||||
"min": data.system.unitSystem == 0 ? 5 : 41,
|
"min": data.system.unitSystem == 0 ? 5 : 41,
|
||||||
"max": data.system.unitSystem == 0 ? 40 : 104
|
"max": data.system.unitSystem == 0 ? 40 : 104
|
||||||
|
|||||||
Reference in New Issue
Block a user