mirror of
https://github.com/Laxilef/OTGateway.git
synced 2025-12-25 09:33:35 +05:00
Compare commits
7 Commits
1.5.5
...
47696a0721
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
47696a0721 | ||
|
|
5c4ad8cd07 | ||
|
|
f6cfdf3263 | ||
|
|
58b0c18448 | ||
|
|
b985275309 | ||
|
|
1eee184887 | ||
|
|
ba03c9cda3 |
@@ -71,5 +71,10 @@ All available information and instructions can be found in the wiki:
|
||||
* [Connection](https://github.com/Laxilef/OTGateway/wiki/OT-adapters#connection)
|
||||
* [Leds on board](https://github.com/Laxilef/OTGateway/wiki/OT-adapters#leds-on-board)
|
||||
|
||||
___
|
||||
This project is tested with BrowserStack.
|
||||
## Gratitude
|
||||
* To the developers of the libraries used: [OpenTherm Library](https://github.com/ihormelnyk/opentherm_library), [ESP8266Scheduler](https://github.com/nrwiersma/ESP8266Scheduler), [ArduinoJson](https://github.com/bblanchon/ArduinoJson), [NimBLE-Arduino](https://github.com/h2zero/NimBLE-Arduino), [ArduinoMqttClient](https://github.com/arduino-libraries/ArduinoMqttClient), [ESPTelnet](https://github.com/LennartHennigs/ESPTelnet), [FileData](https://github.com/GyverLibs/FileData), [GyverPID](https://github.com/GyverLibs/GyverPID), [GyverBlinker](https://github.com/GyverLibs/GyverBlinker), [FileData](https://github.com/GyverLibs/FileData), [OneWireNg](https://github.com/pstolarz/OneWireNg) & [OneWire](https://github.com/PaulStoffregen/OneWire)
|
||||
* To the [PlatformIO](https://platformio.org/) Team
|
||||
* To the team and contributors of the [pioarduino](https://github.com/pioarduino/platform-espressif32) project
|
||||
* To the [BrowserStack](https://www.browserstack.com/) team. This project is tested with BrowserStack.
|
||||
* To the [PVS-Studio](https://pvs-studio.com/pvs-studio/?utm_source=website&utm_medium=github&utm_campaign=open_source) - static analyzer for C, C++, C#, and Java code.
|
||||
* And of course to the contributors for their contribution to the development of the project!
|
||||
@@ -106,6 +106,11 @@ public:
|
||||
return isValidResponse(response) && isValidResponseId(response, OpenThermMessageID::RemoteRequest);
|
||||
}
|
||||
|
||||
static bool isCh2Active(unsigned long response)
|
||||
{
|
||||
return response & 0x20;
|
||||
}
|
||||
|
||||
static bool isValidResponseId(unsigned long response, OpenThermMessageID id) {
|
||||
byte responseId = (response >> 16) & 0xFF;
|
||||
|
||||
|
||||
@@ -152,6 +152,7 @@ protected:
|
||||
}
|
||||
this->yield();
|
||||
|
||||
this->heating();
|
||||
this->emergency();
|
||||
this->ledStatus();
|
||||
this->cascadeControl();
|
||||
@@ -228,6 +229,52 @@ protected:
|
||||
}
|
||||
}
|
||||
|
||||
void heating() {
|
||||
// anti freeze protection
|
||||
if (!settings.heating.enabled) {
|
||||
float minTemp = 255.0f;
|
||||
uint8_t availableSensors = 0;
|
||||
|
||||
if (Sensors::existsConnectedSensorsByPurpose(Sensors::Purpose::INDOOR_TEMP)) {
|
||||
auto value = Sensors::getMeanValueByPurpose(Sensors::Purpose::INDOOR_TEMP, Sensors::ValueType::PRIMARY);
|
||||
if (value < minTemp) {
|
||||
minTemp = value;
|
||||
}
|
||||
|
||||
availableSensors++;
|
||||
}
|
||||
|
||||
if (Sensors::existsConnectedSensorsByPurpose(Sensors::Purpose::HEATING_TEMP)) {
|
||||
auto value = Sensors::getMeanValueByPurpose(Sensors::Purpose::HEATING_TEMP, Sensors::ValueType::PRIMARY);
|
||||
if (value < minTemp) {
|
||||
minTemp = value;
|
||||
}
|
||||
|
||||
availableSensors++;
|
||||
}
|
||||
|
||||
if (Sensors::existsConnectedSensorsByPurpose(Sensors::Purpose::HEATING_RETURN_TEMP)) {
|
||||
auto value = Sensors::getMeanValueByPurpose(Sensors::Purpose::HEATING_RETURN_TEMP, Sensors::ValueType::PRIMARY);
|
||||
if (value < minTemp) {
|
||||
minTemp = value;
|
||||
}
|
||||
|
||||
availableSensors++;
|
||||
}
|
||||
|
||||
if (availableSensors && minTemp <= settings.heating.antiFreezeTemp) {
|
||||
settings.heating.enabled = true;
|
||||
fsSettings.update();
|
||||
|
||||
Log.sinfoln(
|
||||
FPSTR(L_MAIN),
|
||||
F("Heating turned on by anti freeze protection, current min temp: %.2f, threshold: %hhu"),
|
||||
minTemp, settings.heating.antiFreezeTemp
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void emergency() {
|
||||
// flags
|
||||
uint8_t emergencyFlags = 0b00000000;
|
||||
|
||||
@@ -169,12 +169,15 @@ protected:
|
||||
|
||||
// Heating settings
|
||||
vars.master.heating.enabled = this->isReady()
|
||||
&& (settings.heating.enabled || vars.emergency.state)
|
||||
&& settings.heating.enabled
|
||||
&& vars.cascadeControl.input
|
||||
&& !vars.master.heating.blocking;
|
||||
&& !vars.master.heating.blocking
|
||||
&& !vars.master.heating.overheat;
|
||||
|
||||
// DHW settings
|
||||
vars.master.dhw.enabled = settings.opentherm.options.dhwSupport && settings.dhw.enabled;
|
||||
vars.master.dhw.enabled = settings.opentherm.options.dhwSupport
|
||||
&& settings.dhw.enabled
|
||||
&& !vars.master.dhw.overheat;
|
||||
vars.master.dhw.targetTemp = settings.dhw.target;
|
||||
|
||||
// CH2 settings
|
||||
@@ -205,6 +208,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 +221,7 @@ protected:
|
||||
settings.opentherm.options.nativeHeatingControl,
|
||||
vars.master.ch2.enabled,
|
||||
summerWinterMode,
|
||||
settings.opentherm.options.dhwBlocking,
|
||||
dhwBlocking,
|
||||
statusLb
|
||||
);
|
||||
|
||||
@@ -228,6 +237,7 @@ protected:
|
||||
vars.slave.dhw.active = settings.opentherm.options.dhwSupport ? CustomOpenTherm::isHotWaterActive(response) : false;
|
||||
vars.slave.flame = CustomOpenTherm::isFlameOn(response);
|
||||
vars.slave.cooling = CustomOpenTherm::isCoolingActive(response);
|
||||
vars.slave.ch2.active = CustomOpenTherm::isCh2Active(response);
|
||||
vars.slave.fault.active = CustomOpenTherm::isFault(response);
|
||||
|
||||
if (!settings.opentherm.options.ignoreDiagState) {
|
||||
@@ -238,9 +248,9 @@ protected:
|
||||
}
|
||||
|
||||
Log.snoticeln(
|
||||
FPSTR(L_OT), F("Received boiler status. Heating: %hhu; DHW: %hhu; flame: %hhu; cooling: %hhu; fault: %hhu; diag: %hhu"),
|
||||
FPSTR(L_OT), F("Received boiler status. Heating: %hhu; DHW: %hhu; flame: %hhu; cooling: %hhu; channel 2: %hhu; fault: %hhu; diag: %hhu"),
|
||||
vars.slave.heating.active, vars.slave.dhw.active,
|
||||
vars.slave.flame, vars.slave.cooling, vars.slave.fault.active, vars.slave.diag.active
|
||||
vars.slave.flame, vars.slave.cooling, vars.slave.ch2.active, vars.slave.fault.active, vars.slave.diag.active
|
||||
);
|
||||
}
|
||||
|
||||
@@ -1307,6 +1317,84 @@ protected:
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// Heating overheat control
|
||||
if (settings.heating.overheatHighTemp > 0 && settings.heating.overheatLowTemp > 0) {
|
||||
float highTemp = convertTemp(
|
||||
max({
|
||||
vars.slave.heating.currentTemp,
|
||||
vars.slave.heating.returnTemp,
|
||||
vars.slave.heatExchangerTemp
|
||||
}),
|
||||
settings.opentherm.unitSystem,
|
||||
settings.system.unitSystem
|
||||
);
|
||||
|
||||
if (vars.master.heating.overheat) {
|
||||
if ((float) settings.heating.overheatLowTemp - highTemp + 0.0001f >= 0.0f) {
|
||||
vars.master.heating.overheat = false;
|
||||
|
||||
Log.sinfoln(
|
||||
FPSTR(L_OT_HEATING), F("Overheating not detected. Current high temp: %.2f, threshold (low): %hhu"),
|
||||
highTemp, settings.heating.overheatLowTemp
|
||||
);
|
||||
}
|
||||
|
||||
} else if (vars.slave.heating.active) {
|
||||
if (highTemp - (float) settings.heating.overheatHighTemp + 0.0001f >= 0.0f) {
|
||||
vars.master.heating.overheat = true;
|
||||
|
||||
Log.swarningln(
|
||||
FPSTR(L_OT_HEATING), F("Overheating detected! Current high temp: %.2f, threshold (high): %hhu"),
|
||||
highTemp, settings.heating.overheatHighTemp
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
} else if (vars.master.heating.overheat) {
|
||||
vars.master.heating.overheat = false;
|
||||
}
|
||||
|
||||
// DHW overheat control
|
||||
if (settings.dhw.overheatHighTemp > 0 && settings.dhw.overheatLowTemp > 0) {
|
||||
float highTemp = convertTemp(
|
||||
max({
|
||||
vars.slave.heating.currentTemp,
|
||||
vars.slave.heating.returnTemp,
|
||||
vars.slave.heatExchangerTemp,
|
||||
vars.slave.dhw.currentTemp,
|
||||
vars.slave.dhw.currentTemp2,
|
||||
vars.slave.dhw.returnTemp
|
||||
}),
|
||||
settings.opentherm.unitSystem,
|
||||
settings.system.unitSystem
|
||||
);
|
||||
|
||||
if (vars.master.dhw.overheat) {
|
||||
if ((float) settings.dhw.overheatLowTemp - highTemp + 0.0001f >= 0.0f) {
|
||||
vars.master.dhw.overheat = false;
|
||||
|
||||
Log.sinfoln(
|
||||
FPSTR(L_OT_DHW), F("Overheating not detected. Current high temp: %.2f, threshold (low): %hhu"),
|
||||
highTemp, settings.dhw.overheatLowTemp
|
||||
);
|
||||
}
|
||||
|
||||
} else if (vars.slave.dhw.active) {
|
||||
if (highTemp - (float) settings.dhw.overheatHighTemp + 0.0001f >= 0.0f) {
|
||||
vars.master.dhw.overheat = true;
|
||||
|
||||
Log.swarningln(
|
||||
FPSTR(L_OT_DHW), F("Overheating detected! Current high temp: %.2f, threshold (high): %hhu"),
|
||||
highTemp, settings.dhw.overheatHighTemp
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
} else if (vars.master.dhw.overheat) {
|
||||
vars.master.dhw.overheat = false;
|
||||
}
|
||||
}
|
||||
|
||||
void initialize() {
|
||||
|
||||
@@ -138,7 +138,7 @@ public:
|
||||
}
|
||||
|
||||
uint8_t amount = 0;
|
||||
for (uint8_t id = 0; id < getMaxSensorId(); id++) {
|
||||
for (uint8_t id = 0; id <= getMaxSensorId(); id++) {
|
||||
if (settings[id].type == type && (!onlyEnabled || settings[id].enabled)) {
|
||||
amount++;
|
||||
}
|
||||
@@ -152,7 +152,7 @@ public:
|
||||
return 0;
|
||||
}
|
||||
|
||||
for (uint8_t id = 0; id < getMaxSensorId(); id++) {
|
||||
for (uint8_t id = 0; id <= getMaxSensorId(); id++) {
|
||||
if (strcmp(settings[id].name, name) == 0) {
|
||||
return id;
|
||||
}
|
||||
@@ -167,7 +167,7 @@ public:
|
||||
}
|
||||
|
||||
String refObjectId;
|
||||
for (uint8_t id = 0; id < getMaxSensorId(); id++) {
|
||||
for (uint8_t id = 0; id <= getMaxSensorId(); id++) {
|
||||
Sensors::makeObjectId(refObjectId, settings[id].name);
|
||||
if (refObjectId.equals(objectId)) {
|
||||
return id;
|
||||
@@ -247,7 +247,7 @@ public:
|
||||
uint8_t updated = 0;
|
||||
|
||||
// read sensors data for current instance
|
||||
for (uint8_t sensorId = 0; sensorId < getMaxSensorId(); sensorId++) {
|
||||
for (uint8_t sensorId = 0; sensorId <= getMaxSensorId(); sensorId++) {
|
||||
auto& sSensor = settings[sensorId];
|
||||
|
||||
// only target & valid sensors
|
||||
@@ -311,7 +311,7 @@ public:
|
||||
uint8_t updated = 0;
|
||||
|
||||
// read sensors data for current instance
|
||||
for (uint8_t sensorId = 0; sensorId < getMaxSensorId(); sensorId++) {
|
||||
for (uint8_t sensorId = 0; sensorId <= getMaxSensorId(); sensorId++) {
|
||||
auto& sSensor = settings[sensorId];
|
||||
|
||||
// only target & valid sensors
|
||||
@@ -340,7 +340,7 @@ public:
|
||||
float value = 0.0f;
|
||||
uint8_t amount = 0;
|
||||
|
||||
for (uint8_t id = 0; id < getMaxSensorId(); id++) {
|
||||
for (uint8_t id = 0; id <= getMaxSensorId(); id++) {
|
||||
auto& sSensor = settings[id];
|
||||
auto& rSensor = results[id];
|
||||
|
||||
@@ -366,7 +366,7 @@ public:
|
||||
return 0;
|
||||
}
|
||||
|
||||
for (uint8_t id = 0; id < getMaxSensorId(); id++) {
|
||||
for (uint8_t id = 0; id <= getMaxSensorId(); id++) {
|
||||
if (settings[id].purpose == purpose && results[id].connected) {
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
@@ -107,6 +108,9 @@ struct Settings {
|
||||
byte minTemp = DEFAULT_HEATING_MIN_TEMP;
|
||||
byte maxTemp = DEFAULT_HEATING_MAX_TEMP;
|
||||
uint8_t maxModulation = 100;
|
||||
uint8_t overheatHighTemp = 95;
|
||||
uint8_t overheatLowTemp = 90;
|
||||
uint8_t antiFreezeTemp = 10;
|
||||
} heating;
|
||||
|
||||
struct {
|
||||
@@ -115,6 +119,8 @@ struct Settings {
|
||||
byte minTemp = DEFAULT_DHW_MIN_TEMP;
|
||||
byte maxTemp = DEFAULT_DHW_MAX_TEMP;
|
||||
uint8_t maxModulation = 100;
|
||||
uint8_t overheatHighTemp = 95;
|
||||
uint8_t overheatLowTemp = 90;
|
||||
} dhw;
|
||||
|
||||
struct {
|
||||
@@ -279,6 +285,7 @@ struct Variables {
|
||||
bool blocking = false;
|
||||
bool enabled = false;
|
||||
bool indoorTempControl = false;
|
||||
bool overheat = false;
|
||||
float setpointTemp = 0.0f;
|
||||
float targetTemp = 0.0f;
|
||||
float currentTemp = 0.0f;
|
||||
@@ -291,6 +298,7 @@ struct Variables {
|
||||
|
||||
struct {
|
||||
bool enabled = false;
|
||||
bool overheat = false;
|
||||
float targetTemp = 0.0f;
|
||||
float currentTemp = 0.0f;
|
||||
float returnTemp = 0.0f;
|
||||
@@ -390,6 +398,7 @@ struct Variables {
|
||||
} dhw;
|
||||
|
||||
struct {
|
||||
bool active = false;
|
||||
bool enabled = false;
|
||||
float targetTemp = 0.0f;
|
||||
float currentTemp = 0.0f;
|
||||
|
||||
@@ -44,6 +44,7 @@ const char S_APP_VERSION[] PROGMEM = "appVersion";
|
||||
const char S_AUTH[] PROGMEM = "auth";
|
||||
const char S_AUTO_DIAG_RESET[] PROGMEM = "autoDiagReset";
|
||||
const char S_AUTO_FAULT_RESET[] PROGMEM = "autoFaultReset";
|
||||
const char S_ANTI_FREEZE_TEMP[] PROGMEM = "antiFreezeTemp";
|
||||
const char S_BACKTRACE[] PROGMEM = "backtrace";
|
||||
const char S_BATTERY[] PROGMEM = "battery";
|
||||
const char S_BAUDRATE[] PROGMEM = "baudrate";
|
||||
@@ -68,6 +69,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";
|
||||
@@ -149,6 +151,9 @@ const char S_OPTIONS[] PROGMEM = "options";
|
||||
const char S_OUTDOOR_TEMP[] PROGMEM = "outdoorTemp";
|
||||
const char S_OUT_GPIO[] PROGMEM = "outGpio";
|
||||
const char S_OUTPUT[] PROGMEM = "output";
|
||||
const char S_OVERHEAT[] PROGMEM = "overheat";
|
||||
const char S_OVERHEAT_HIGH_TEMP[] PROGMEM = "overheatHighTemp";
|
||||
const char S_OVERHEAT_LOW_TEMP[] PROGMEM = "overheatLowTemp";
|
||||
const char S_PASSWORD[] PROGMEM = "password";
|
||||
const char S_PID[] PROGMEM = "pid";
|
||||
const char S_PORT[] PROGMEM = "port";
|
||||
|
||||
72
src/utils.h
72
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;
|
||||
@@ -494,6 +495,9 @@ void settingsToJson(const Settings& src, JsonVariant dst, bool safe = false) {
|
||||
heating[FPSTR(S_MIN_TEMP)] = src.heating.minTemp;
|
||||
heating[FPSTR(S_MAX_TEMP)] = src.heating.maxTemp;
|
||||
heating[FPSTR(S_MAX_MODULATION)] = src.heating.maxModulation;
|
||||
heating[FPSTR(S_OVERHEAT_HIGH_TEMP)] = src.heating.overheatHighTemp;
|
||||
heating[FPSTR(S_OVERHEAT_LOW_TEMP)] = src.heating.overheatLowTemp;
|
||||
heating[FPSTR(S_ANTI_FREEZE_TEMP)] = src.heating.antiFreezeTemp;
|
||||
|
||||
auto dhw = dst[FPSTR(S_DHW)].to<JsonObject>();
|
||||
dhw[FPSTR(S_ENABLED)] = src.dhw.enabled;
|
||||
@@ -501,6 +505,8 @@ void settingsToJson(const Settings& src, JsonVariant dst, bool safe = false) {
|
||||
dhw[FPSTR(S_MIN_TEMP)] = src.dhw.minTemp;
|
||||
dhw[FPSTR(S_MAX_TEMP)] = src.dhw.maxTemp;
|
||||
dhw[FPSTR(S_MAX_MODULATION)] = src.dhw.maxModulation;
|
||||
dhw[FPSTR(S_OVERHEAT_HIGH_TEMP)] = src.dhw.overheatHighTemp;
|
||||
dhw[FPSTR(S_OVERHEAT_LOW_TEMP)] = src.dhw.overheatLowTemp;
|
||||
|
||||
auto equitherm = dst[FPSTR(S_EQUITHERM)].to<JsonObject>();
|
||||
equitherm[FPSTR(S_ENABLED)] = src.equitherm.enabled;
|
||||
@@ -923,6 +929,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>();
|
||||
|
||||
@@ -1332,6 +1347,38 @@ bool jsonToSettings(const JsonVariantConst src, Settings& dst, bool safe = false
|
||||
}
|
||||
}
|
||||
|
||||
if (!src[FPSTR(S_HEATING)][FPSTR(S_OVERHEAT_HIGH_TEMP)].isNull()) {
|
||||
unsigned char value = src[FPSTR(S_HEATING)][FPSTR(S_OVERHEAT_HIGH_TEMP)].as<unsigned char>();
|
||||
|
||||
if (isValidTemp(value, dst.system.unitSystem, 0.0f, 100.0f) && value != dst.heating.overheatHighTemp) {
|
||||
dst.heating.overheatHighTemp = value;
|
||||
changed = true;
|
||||
}
|
||||
}
|
||||
|
||||
if (!src[FPSTR(S_HEATING)][FPSTR(S_OVERHEAT_LOW_TEMP)].isNull()) {
|
||||
unsigned char value = src[FPSTR(S_HEATING)][FPSTR(S_OVERHEAT_LOW_TEMP)].as<unsigned char>();
|
||||
|
||||
if (isValidTemp(value, dst.system.unitSystem, 0.0f, 99.0f) && value != dst.heating.overheatLowTemp) {
|
||||
dst.heating.overheatLowTemp = value;
|
||||
changed = true;
|
||||
}
|
||||
}
|
||||
|
||||
if (dst.heating.overheatHighTemp < dst.heating.overheatLowTemp) {
|
||||
dst.heating.overheatHighTemp = dst.heating.overheatLowTemp;
|
||||
changed = true;
|
||||
}
|
||||
|
||||
if (!src[FPSTR(S_HEATING)][FPSTR(S_ANTI_FREEZE_TEMP)].isNull()) {
|
||||
unsigned short value = src[FPSTR(S_HEATING)][FPSTR(S_ANTI_FREEZE_TEMP)].as<unsigned short>();
|
||||
|
||||
if (isValidTemp(value, dst.system.unitSystem, 1, 30) && value != dst.heating.antiFreezeTemp) {
|
||||
dst.heating.antiFreezeTemp = value;
|
||||
changed = true;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// dhw
|
||||
if (src[FPSTR(S_DHW)][FPSTR(S_ENABLED)].is<bool>()) {
|
||||
@@ -1375,6 +1422,29 @@ bool jsonToSettings(const JsonVariantConst src, Settings& dst, bool safe = false
|
||||
}
|
||||
}
|
||||
|
||||
if (!src[FPSTR(S_DHW)][FPSTR(S_OVERHEAT_HIGH_TEMP)].isNull()) {
|
||||
unsigned char value = src[FPSTR(S_DHW)][FPSTR(S_OVERHEAT_HIGH_TEMP)].as<unsigned char>();
|
||||
|
||||
if (isValidTemp(value, dst.system.unitSystem, 0.0f, 100.0f) && value != dst.dhw.overheatHighTemp) {
|
||||
dst.dhw.overheatHighTemp = value;
|
||||
changed = true;
|
||||
}
|
||||
}
|
||||
|
||||
if (!src[FPSTR(S_DHW)][FPSTR(S_OVERHEAT_LOW_TEMP)].isNull()) {
|
||||
unsigned char value = src[FPSTR(S_DHW)][FPSTR(S_OVERHEAT_LOW_TEMP)].as<unsigned char>();
|
||||
|
||||
if (isValidTemp(value, dst.system.unitSystem, 0.0f, 99.0f) && value != dst.dhw.overheatLowTemp) {
|
||||
dst.dhw.overheatLowTemp = value;
|
||||
changed = true;
|
||||
}
|
||||
}
|
||||
|
||||
if (dst.dhw.overheatHighTemp < dst.dhw.overheatLowTemp) {
|
||||
dst.dhw.overheatHighTemp = dst.dhw.overheatLowTemp;
|
||||
changed = true;
|
||||
}
|
||||
|
||||
|
||||
if (!safe) {
|
||||
// external pump
|
||||
@@ -2006,6 +2076,7 @@ void varsToJson(const Variables& src, JsonVariant dst) {
|
||||
mHeating[FPSTR(S_ENABLED)] = src.master.heating.enabled;
|
||||
mHeating[FPSTR(S_BLOCKING)] = src.master.heating.blocking;
|
||||
mHeating[FPSTR(S_INDOOR_TEMP_CONTROL)] = src.master.heating.indoorTempControl;
|
||||
mHeating[FPSTR(S_OVERHEAT)] = src.master.heating.overheat;
|
||||
mHeating[FPSTR(S_SETPOINT_TEMP)] = roundf(src.master.heating.setpointTemp, 2);
|
||||
mHeating[FPSTR(S_TARGET_TEMP)] = roundf(src.master.heating.targetTemp, 2);
|
||||
mHeating[FPSTR(S_CURRENT_TEMP)] = roundf(src.master.heating.currentTemp, 2);
|
||||
@@ -2017,6 +2088,7 @@ void varsToJson(const Variables& src, JsonVariant dst) {
|
||||
|
||||
auto mDhw = master[FPSTR(S_DHW)].to<JsonObject>();
|
||||
mDhw[FPSTR(S_ENABLED)] = src.master.dhw.enabled;
|
||||
mDhw[FPSTR(S_OVERHEAT)] = src.master.dhw.overheat;
|
||||
mDhw[FPSTR(S_TARGET_TEMP)] = roundf(src.master.dhw.targetTemp, 2);
|
||||
mDhw[FPSTR(S_CURRENT_TEMP)] = roundf(src.master.dhw.currentTemp, 2);
|
||||
mDhw[FPSTR(S_RETURN_TEMP)] = roundf(src.master.dhw.returnTemp, 2);
|
||||
|
||||
@@ -117,6 +117,7 @@
|
||||
|
||||
"mHeatEnabled": "Heating enabled",
|
||||
"mHeatBlocking": "Heating blocked",
|
||||
"mHeatOverheat": "Heating overheat",
|
||||
"sHeatActive": "Heating active",
|
||||
"mHeatSetpointTemp": "Heating setpoint temp",
|
||||
"mHeatTargetTemp": "Heating target temp",
|
||||
@@ -126,6 +127,7 @@
|
||||
"mHeatOutdoorTemp": "Heating, outdoor temp",
|
||||
|
||||
"mDhwEnabled": "DHW enabled",
|
||||
"mDhwOverheat": "DHW overheat",
|
||||
"sDhwActive": "DHW active",
|
||||
"mDhwTargetTemp": "DHW target temp",
|
||||
"mDhwCurrTemp": "DHW current temp",
|
||||
@@ -302,6 +304,18 @@
|
||||
"max": "Maximum temperature"
|
||||
},
|
||||
"maxModulation": "Max modulation level",
|
||||
"overheat": {
|
||||
"title": "Overheating protection",
|
||||
"desc": "<b>Note:</b> This feature can be useful if the built-in boiler overheating protection does not work or does not work correctly and the heat carrier boils. To disable, set 0 as <b>high</b> and <b>low</b> temperature.",
|
||||
"highTemp": {
|
||||
"title": "High temperature threshold",
|
||||
"note": "Threshold at which the burner will be forcibly switched off"
|
||||
},
|
||||
"lowTemp": {
|
||||
"title": "Low temperature threshold",
|
||||
"note": "Threshold at which the burner can be turned on again"
|
||||
}
|
||||
},
|
||||
|
||||
"portal": {
|
||||
"login": "Login",
|
||||
@@ -336,7 +350,11 @@
|
||||
|
||||
"heating": {
|
||||
"hyst": "Hysteresis <small>(in degrees)</small>",
|
||||
"turboFactor": "Turbo mode coeff."
|
||||
"turboFactor": "Turbo mode coeff.",
|
||||
"antiFreezeTemp": {
|
||||
"title": "Freeze protection temperature",
|
||||
"note": "If the heat carrier or indoor temperature drops below this value, the heating will be forced to turn on"
|
||||
}
|
||||
},
|
||||
|
||||
"emergency": {
|
||||
@@ -404,6 +422,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",
|
||||
|
||||
@@ -117,6 +117,7 @@
|
||||
|
||||
"mHeatEnabled": "Riscaldamento attivato",
|
||||
"mHeatBlocking": "Riscaldamento bloccato",
|
||||
"mHeatOverheat": "Riscaldamento surriscaldamento",
|
||||
"sHeatActive": "Riscaldamento attivo",
|
||||
"mHeatSetpointTemp": "Temp riscaldamento impostato",
|
||||
"mHeatTargetTemp": "Target Temp caldaia",
|
||||
@@ -126,6 +127,7 @@
|
||||
"mHeatOutdoorTemp": "Riscaldamento, temp esterna",
|
||||
|
||||
"mDhwEnabled": "ACS attivata",
|
||||
"mDhwOverheat": "ACS surriscaldamento",
|
||||
"sDhwActive": "ACS attiva",
|
||||
"mDhwTargetTemp": "ACS temp impostata",
|
||||
"mDhwCurrTemp": "ACS temp attuale",
|
||||
@@ -302,6 +304,18 @@
|
||||
"max": "Temperatura massima"
|
||||
},
|
||||
"maxModulation": "Max livello modulazione",
|
||||
"overheat": {
|
||||
"title": "Protezione contro il surriscaldamento",
|
||||
"desc": "<b>Nota:</b> questa funzione può essere utile se la protezione contro il surriscaldamento integrata nella caldaia non funziona o non funziona correttamente e il fluido termovettore bolle. Per disattivarla, impostare 0 come temperatura <b>alta</b> e <b>bassa</b>.",
|
||||
"highTemp": {
|
||||
"title": "Soglia di temperatura alta",
|
||||
"note": "Soglia alla quale il bruciatore verrà spento forzatamente"
|
||||
},
|
||||
"lowTemp": {
|
||||
"title": "Soglia di temperatura bassa",
|
||||
"note": "Soglia alla quale il bruciatore può essere riacceso"
|
||||
}
|
||||
},
|
||||
|
||||
"portal": {
|
||||
"login": "Login",
|
||||
@@ -336,7 +350,11 @@
|
||||
|
||||
"heating": {
|
||||
"hyst": "Isteresi <small>(in gradi)</small>",
|
||||
"turboFactor": "Turbo mode coeff."
|
||||
"turboFactor": "Turbo mode coeff.",
|
||||
"antiFreezeTemp": {
|
||||
"title": "Temperatura di protezione antigelo",
|
||||
"note": "Se la temperatura del fluido termovettore o interna scende al di sotto di questo valore, il riscaldamento verrà forzato ad accendersi"
|
||||
}
|
||||
},
|
||||
|
||||
"emergency": {
|
||||
@@ -404,6 +422,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",
|
||||
|
||||
@@ -117,6 +117,7 @@
|
||||
|
||||
"mHeatEnabled": "Отопление",
|
||||
"mHeatBlocking": "Блокировка отопления",
|
||||
"mHeatOverheat": "Отопление, перегрев",
|
||||
"sHeatActive": "Активность отопления",
|
||||
"mHeatSetpointTemp": "Отопление, уставка",
|
||||
"mHeatTargetTemp": "Отопление, целевая температура",
|
||||
@@ -126,6 +127,7 @@
|
||||
"mHeatOutdoorTemp": "Отопление, наружная темп.",
|
||||
|
||||
"mDhwEnabled": "ГВС",
|
||||
"mDhwOverheat": "ГВС, перегрев",
|
||||
"sDhwActive": "Активность ГВС",
|
||||
"mDhwTargetTemp": "ГВС, целевая температура",
|
||||
"mDhwCurrTemp": "ГВС, текущая температура",
|
||||
@@ -302,6 +304,18 @@
|
||||
"max": "Макс. температура"
|
||||
},
|
||||
"maxModulation": "Макс. уровень модуляции",
|
||||
"overheat": {
|
||||
"title": "Защита от перегрева",
|
||||
"desc": "<b>Примечание:</b> Эта функция может быть полезна, если встроенная защита от перегрева котла не срабатывает или срабатывает некорректно и теплоноситель закипает. Для отключения установите 0 в качестве <b>верхнего</b> и <b>нижнего</b> порога температуры.",
|
||||
"highTemp": {
|
||||
"title": "Верхний порог температуры",
|
||||
"note": "Порог, при котором горелка будет принудительно отключена"
|
||||
},
|
||||
"lowTemp": {
|
||||
"title": "Нижний порог температуры",
|
||||
"note": "Порог, при котором горелка может быть включена снова"
|
||||
}
|
||||
},
|
||||
|
||||
"portal": {
|
||||
"login": "Логин",
|
||||
@@ -336,7 +350,11 @@
|
||||
|
||||
"heating": {
|
||||
"hyst": "Гистерезис <small>(в градусах)</small>",
|
||||
"turboFactor": "Коэфф. турбо режима"
|
||||
"turboFactor": "Коэфф. турбо режима",
|
||||
"antiFreezeTemp": {
|
||||
"title": "Температура защиты от замерзания",
|
||||
"note": "Отопление будет принудительно включено, если температура теплоносителя или внутренняя температура опустится ниже этого значения"
|
||||
}
|
||||
},
|
||||
|
||||
"emergency": {
|
||||
@@ -404,6 +422,7 @@
|
||||
"heatingToCh2": "Дублировать параметры отопления в канал 2",
|
||||
"dhwToCh2": "Дублировать параметры ГВС в канал 2",
|
||||
"dhwBlocking": "DHW blocking",
|
||||
"dhwStateAsDhwBlocking": "DHW blocking в качестве состояния ГВС",
|
||||
"maxTempSyncWithTargetTemp": "Синхронизировать макс. темп. отопления с целевой темп.",
|
||||
"getMinMaxTemp": "Получать мин. и макс. температуру от котла",
|
||||
"ignoreDiagState": "Игнорировать состояние диагностики",
|
||||
|
||||
@@ -184,6 +184,10 @@
|
||||
<th scope="row" data-i18n>dashboard.states.mHeatBlocking</th>
|
||||
<td><i class="mHeatBlocking"></i></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row" data-i18n>dashboard.states.mHeatOverheat</th>
|
||||
<td><i class="mHeatOverheat"></i></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row" data-i18n>dashboard.states.sHeatActive</th>
|
||||
<td><i class="sHeatActive"></i></td>
|
||||
@@ -218,6 +222,10 @@
|
||||
<th scope="row" data-i18n>dashboard.states.mDhwEnabled</th>
|
||||
<td><i class="mDhwEnabled"></i></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row" data-i18n>dashboard.states.mDhwOverheat</th>
|
||||
<td><i class="mDhwOverheat"></i></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row" data-i18n>dashboard.states.sDhwActive</th>
|
||||
<td><i class="sDhwActive"></i></td>
|
||||
@@ -611,6 +619,11 @@
|
||||
result.master.heating.blocking ? "red" : "green"
|
||||
);
|
||||
setState('.mHeatIndoorTempControl', result.master.heating.indoorTempControl);
|
||||
setStatus(
|
||||
'.mHeatOverheat',
|
||||
result.master.heating.overheat ? "success" : "error",
|
||||
result.master.heating.overheat ? "red" : "green"
|
||||
);
|
||||
setValue('.mHeatSetpointTemp', result.master.heating.setpointTemp);
|
||||
setValue('.mHeatTargetTemp', result.master.heating.targetTemp);
|
||||
setValue('.mHeatCurrTemp', result.master.heating.currentTemp);
|
||||
@@ -621,6 +634,11 @@
|
||||
setValue('.mHeatMaxTemp', result.master.heating.maxTemp);
|
||||
|
||||
setState('.mDhwEnabled', result.master.dhw.enabled);
|
||||
setStatus(
|
||||
'.mDhwOverheat',
|
||||
result.master.dhw.overheat ? "success" : "error",
|
||||
result.master.dhw.overheat ? "red" : "green"
|
||||
);
|
||||
setValue('.mDhwTargetTemp', result.master.dhw.targetTemp);
|
||||
setValue('.mDhwCurrTemp', result.master.dhw.currentTemp);
|
||||
setValue('.mDhwRetTemp', result.master.dhw.returnTemp);
|
||||
|
||||
@@ -207,6 +207,34 @@
|
||||
<input type="number" inputmode="numeric" name="heating[maxModulation]" min="1" max="100" step="1" required>
|
||||
</label>
|
||||
|
||||
<label>
|
||||
<span data-i18n>settings.heating.antiFreezeTemp.title</span>
|
||||
<input type="number" inputmode="numeric" name="heating[antiFreezeTemp]" min="0" max="0" step="1" required>
|
||||
<small data-i18n>settings.heating.antiFreezeTemp.note</small>
|
||||
</label>
|
||||
|
||||
<details>
|
||||
<summary><b data-i18n>settings.overheat.title</b></summary>
|
||||
|
||||
<div class="grid">
|
||||
<label>
|
||||
<span data-i18n>settings.overheat.highTemp.title</span>
|
||||
<input type="number" inputmode="numeric" name="heating[overheatHighTemp]" min="0" max="212" step="1" required>
|
||||
<small data-i18n>settings.overheat.highTemp.note</small>
|
||||
</label>
|
||||
|
||||
<label>
|
||||
<span data-i18n>settings.overheat.lowTemp.title</span>
|
||||
<input type="number" inputmode="numeric" name="heating[overheatLowTemp]" min="0" max="211" step="1" required>
|
||||
<small data-i18n>settings.overheat.lowTemp.note</small>
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<small data-i18n>settings.overheat.desc</small>
|
||||
</details>
|
||||
|
||||
<br>
|
||||
|
||||
<button type="submit" data-i18n>button.save</button>
|
||||
</form>
|
||||
</div>
|
||||
@@ -236,6 +264,28 @@
|
||||
<input type="number" inputmode="numeric" name="dhw[maxModulation]" min="1" max="100" step="1" required>
|
||||
</label>
|
||||
|
||||
<details>
|
||||
<summary><b data-i18n>settings.overheat.title</b></summary>
|
||||
|
||||
<div class="grid">
|
||||
<label>
|
||||
<span data-i18n>settings.overheat.highTemp.title</span>
|
||||
<input type="number" inputmode="numeric" name="dhw[overheatHighTemp]" min="0" max="212" step="1" required>
|
||||
<small data-i18n>settings.overheat.highTemp.note</small>
|
||||
</label>
|
||||
|
||||
<label>
|
||||
<span data-i18n>settings.overheat.lowTemp.title</span>
|
||||
<input type="number" inputmode="numeric" name="dhw[overheatLowTemp]" min="0" max="211" step="1" required>
|
||||
<small data-i18n>settings.overheat.lowTemp.note</small>
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<small data-i18n>settings.overheat.desc</small>
|
||||
</details>
|
||||
|
||||
<br>
|
||||
|
||||
<button type="submit" data-i18n>button.save</button>
|
||||
</form>
|
||||
</div>
|
||||
@@ -526,6 +576,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 +873,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);
|
||||
@@ -874,6 +930,12 @@
|
||||
setInputValue("[name='heating[hysteresis]']", data.heating.hysteresis);
|
||||
setInputValue("[name='heating[turboFactor]']", data.heating.turboFactor);
|
||||
setInputValue("[name='heating[maxModulation]']", data.heating.maxModulation);
|
||||
setInputValue("[name='heating[overheatHighTemp]']", data.heating.overheatHighTemp);
|
||||
setInputValue("[name='heating[overheatLowTemp]']", data.heating.overheatLowTemp);
|
||||
setInputValue("[name='heating[antiFreezeTemp]']", data.heating.antiFreezeTemp, {
|
||||
"min": data.system.unitSystem == 0 ? 1 : 34,
|
||||
"max": data.system.unitSystem == 0 ? 30 : 86
|
||||
});
|
||||
setBusy('#heating-settings-busy', '#heating-settings', false);
|
||||
|
||||
// DHW
|
||||
@@ -886,14 +948,15 @@
|
||||
"max": data.system.unitSystem == 0 ? 100 : 212
|
||||
});
|
||||
setInputValue("[name='dhw[maxModulation]']", data.dhw.maxModulation);
|
||||
setInputValue("[name='dhw[overheatHighTemp]']", data.dhw.overheatHighTemp);
|
||||
setInputValue("[name='dhw[overheatLowTemp]']", data.dhw.overheatLowTemp);
|
||||
setBusy('#dhw-settings-busy', '#dhw-settings', false);
|
||||
|
||||
// Emergency mode
|
||||
setInputValue("[name='emergency[tresholdTime]']", data.emergency.tresholdTime);
|
||||
if (data.opentherm.options.nativeHeatingControl) {
|
||||
setInputValue("[name='emergency[target]']", data.emergency.target, {
|
||||
"min": data.system.unitSystem == 0 ? 5 : 41,
|
||||
"max": data.system.unitSystem == 0 ? 40 : 86
|
||||
"max": data.system.unitSystem == 0 ? 40 : 104
|
||||
});
|
||||
|
||||
} else {
|
||||
@@ -902,7 +965,7 @@
|
||||
"max": data.heating.maxTemp,
|
||||
});
|
||||
}
|
||||
|
||||
setInputValue("[name='emergency[tresholdTime]']", data.emergency.tresholdTime);
|
||||
setBusy('#emergency-settings-busy', '#emergency-settings', false);
|
||||
|
||||
// Equitherm
|
||||
|
||||
Reference in New Issue
Block a user