13 Commits
1.3.1 ... 1.3.2

Author SHA1 Message Date
Yurii
5c0dfc544e update to 1.3.2 2023-10-21 03:02:38 +03:00
Yurii
5fba94312b added build functions 2023-10-21 03:01:48 +03:00
Yurii
62bea87f8a upd env 2023-10-21 01:48:44 +03:00
Yurii
f52aa8e889 removed unused code 2023-10-20 21:07:12 +03:00
Yurii
df8354866f fix entity climate.heating 2023-10-20 21:06:44 +03:00
Yurii
6242db7a29 removed unused code 2023-10-19 02:20:37 +03:00
Yurii
dc00fdcdb6 Fix Error ''max' must be > 'min'' when processing MQTT 2023-10-19 02:18:39 +03:00
Yurii
2615e9106e upd readme 2023-10-19 00:45:06 +03:00
Yurii
0f60a07a71 upd readme 2023-10-19 00:43:17 +03:00
Yurii
f8750373d4 format code 2023-10-19 00:40:07 +03:00
Yurii
d5a92c47c7 Fixed get current dhw temp 2023-10-19 00:34:11 +03:00
Yurii
bc91168bbf added interval for forced set temperatures 2023-10-17 14:50:43 +03:00
Yurii
96c1a187cd upd readme, get modulation fix 2023-10-17 14:14:24 +03:00
15 changed files with 125 additions and 209 deletions

1
.gitignore vendored
View File

@@ -1,2 +1,3 @@
.pio
.vscode
build/*

View File

@@ -33,6 +33,10 @@
| BAXI ECO Nova | default | Pressure sensor not supported, modulation level not stable |
| BAXI Ampera | 1028 | Pressure sensor not supported, only heating (DHW not tested) |
| [Remeha Calenta Ace 40C](https://github.com/Laxilef/OTGateway/issues/1#issuecomment-1726081554) | default | - |
| [Baxi Nuvola DUO-TEC HT 16](https://github.com/Laxilef/OTGateway/issues/3#issuecomment-1751061488) | default | - |
| [AEG GBA124](https://github.com/Laxilef/OTGateway/issues/3#issuecomment-1765857609) | default | Pressure sensor not supported |
| [Ferroli DOMIcompact C 24](https://github.com/Laxilef/OTGateway/issues/3#issuecomment-1765310058)<br><sub>Board: MF08FA</sub> | 211 | Pressure sensor not supported |
| [Thermet Ecocondens Silver 35kW)](https://github.com/Laxilef/OTGateway/issues/3#issuecomment-1767026384) | default | Pressure sensor not supported |
## PCB
<img src="/assets/pcb.svg" width="27%" /> <img src="/assets/pcb_3d.png" width="30%" /> <img src="/assets/after_assembly.png" width="40%" />

14
build.py Normal file
View File

@@ -0,0 +1,14 @@
import shutil
import os
Import("env")
def post_build(source, target, env):
src = target[0].get_abspath()
dest = os.path.join(env["PROJECT_DIR"], "build", "firmware_%s_%s.bin" % (env.GetProjectOption("board"), env.GetProjectOption("version")))
#print("dest:"+dest)
#print("source:"+src)
shutil.copy(src, dest)
env.AddPostAction("$BUILD_DIR/firmware.bin", post_build)

View File

@@ -8,9 +8,8 @@
; Please visit documentation for the other options and examples
; https://docs.platformio.org/page/projectconf.html
[env:d1_mini_pro]
[env]
platform = espressif8266
board = d1_mini_pro
framework = arduino
lib_deps =
nrwiersma/ESP8266Scheduler@^1.0
@@ -27,3 +26,14 @@ lib_deps =
build_flags = -D PIO_FRAMEWORK_ARDUINO_LWIP2_HIGHER_BANDWIDTH
upload_speed = 921600
monitor_speed = 115200
extra_scripts = post:build.py
version = 1.3.2
[env:d1_mini]
board = d1_mini
[env:d1_mini_lite]
board = d1_mini_lite
[env:d1_mini_pro]
board = d1_mini_pro

View File

@@ -51,9 +51,6 @@ public:
doc[F("options")][2] = F("External");
client.beginPublish((F("homeassistant/select/") + _prefix + F("/outdoor_sensor_type/config")).c_str(), measureJson(doc), true);
//BufferingPrint bufferedClient(client, 32);
//serializeJson(doc, bufferedClient);
//bufferedClient.flush();
serializeJson(doc, client);
return client.endPublish();
}
@@ -81,9 +78,6 @@ public:
doc[F("options")][1] = F("External");
client.beginPublish((F("homeassistant/select/") + _prefix + F("/indoor_sensor_type/config")).c_str(), measureJson(doc), true);
//BufferingPrint bufferedClient(client, 32);
//serializeJson(doc, bufferedClient);
//bufferedClient.flush();
serializeJson(doc, client);
return client.endPublish();
}
@@ -182,9 +176,6 @@ public:
doc[F("payload_off")] = F("{\"debug\": false}");
client.beginPublish((F("homeassistant/switch/") + _prefix + F("/debug/config")).c_str(), measureJson(doc), true);
//BufferingPrint bufferedClient(client, 32);
//serializeJson(doc, bufferedClient);
//bufferedClient.flush();
serializeJson(doc, client);
return client.endPublish();
}
@@ -215,9 +206,6 @@ public:
doc[F("payload_off")] = F("{\"emergency\": {\"enable\" : false}}");
client.beginPublish((F("homeassistant/switch/") + _prefix + F("/emergency/config")).c_str(), measureJson(doc), true);
//BufferingPrint bufferedClient(client, 32);
//serializeJson(doc, bufferedClient);
//bufferedClient.flush();
serializeJson(doc, client);
return client.endPublish();
}
@@ -250,9 +238,6 @@ public:
doc[F("mode")] = "box";
client.beginPublish((F("homeassistant/number/") + _prefix + F("/emergency_target/config")).c_str(), measureJson(doc), true);
//BufferingPrint bufferedClient(client, 32);
//serializeJson(doc, bufferedClient);
//bufferedClient.flush();
serializeJson(doc, client);
return client.endPublish();
}
@@ -284,9 +269,6 @@ public:
doc[F("payload_off")] = F("{\"emergency\": {\"useEquitherm\" : false}}");
client.beginPublish((F("homeassistant/switch/") + _prefix + F("/emergency_use_equitherm/config")).c_str(), measureJson(doc), true);
//BufferingPrint bufferedClient(client, 32);
//serializeJson(doc, bufferedClient);
//bufferedClient.flush();
serializeJson(doc, client);
return client.endPublish();
}
@@ -318,9 +300,6 @@ public:
doc[F("payload_off")] = F("{\"heating\": {\"enable\" : false}}");
client.beginPublish((F("homeassistant/switch/") + _prefix + F("/heating/config")).c_str(), measureJson(doc), true);
//BufferingPrint bufferedClient(client, 32);
//serializeJson(doc, bufferedClient);
//bufferedClient.flush();
serializeJson(doc, client);
return client.endPublish();
}
@@ -351,9 +330,6 @@ public:
doc[F("payload_off")] = F("{\"heating\": {\"turbo\" : false}}");
client.beginPublish((F("homeassistant/switch/") + _prefix + F("/heating_turbo/config")).c_str(), measureJson(doc), true);
//BufferingPrint bufferedClient(client, 32);
//serializeJson(doc, bufferedClient);
//bufferedClient.flush();
serializeJson(doc, client);
return client.endPublish();
}
@@ -382,14 +358,11 @@ public:
doc[F("command_topic")] = _prefix + F("/settings/set");
doc[F("command_template")] = F("{\"heating\": {\"target\" : {{ value }}}}");
doc[F("min")] = minTemp;
doc[F("max")] = maxTemp <= minTemp ? maxTemp : maxTemp;
doc[F("max")] = maxTemp;
doc[F("step")] = 0.5;
doc[F("mode")] = "box";
client.beginPublish((F("homeassistant/number/") + _prefix + F("/heating_target/config")).c_str(), measureJson(doc), true);
//BufferingPrint bufferedClient(client, 32);
//serializeJson(doc, bufferedClient);
//bufferedClient.flush();
serializeJson(doc, client);
return client.endPublish();
}
@@ -422,9 +395,6 @@ public:
doc[F("mode")] = "box";
client.beginPublish((F("homeassistant/number/") + _prefix + F("/heating_hysteresis/config")).c_str(), measureJson(doc), true);
//BufferingPrint bufferedClient(client, 32);
//serializeJson(doc, bufferedClient);
//bufferedClient.flush();
serializeJson(doc, client);
return client.endPublish();
}
@@ -453,9 +423,6 @@ public:
doc[F("value_template")] = F("{{ value_json.parameters.heatingSetpoint|int(0) }}");
client.beginPublish((F("homeassistant/sensor/") + _prefix + F("/heating_setpoint/config")).c_str(), measureJson(doc), true);
//BufferingPrint bufferedClient(client, 32);
//serializeJson(doc, bufferedClient);
//bufferedClient.flush();
serializeJson(doc, client);
return client.endPublish();
}
@@ -607,9 +574,6 @@ public:
doc[F("payload_off")] = F("{\"dhw\": {\"enable\" : false}}");
client.beginPublish((F("homeassistant/switch/") + _prefix + F("/dhw/config")).c_str(), measureJson(doc), true);
//BufferingPrint bufferedClient(client, 32);
//serializeJson(doc, bufferedClient);
//bufferedClient.flush();
serializeJson(doc, client);
return client.endPublish();
}
@@ -643,9 +607,6 @@ public:
doc[F("mode")] = "box";
client.beginPublish((F("homeassistant/number/") + _prefix + F("/dhw_target/config")).c_str(), measureJson(doc), true);
//BufferingPrint bufferedClient(client, 32);
//serializeJson(doc, bufferedClient);
//bufferedClient.flush();
serializeJson(doc, client);
return client.endPublish();
}
@@ -796,9 +757,6 @@ public:
doc[F("payload_off")] = F("{\"pid\": {\"enable\" : false}}");
client.beginPublish((F("homeassistant/switch/") + _prefix + F("/pid/config")).c_str(), measureJson(doc), true);
//BufferingPrint bufferedClient(client, 32);
//serializeJson(doc, bufferedClient);
//bufferedClient.flush();
serializeJson(doc, client);
return client.endPublish();
}
@@ -828,9 +786,6 @@ public:
doc[F("mode")] = "box";
client.beginPublish((F("homeassistant/number/") + _prefix + F("/pid_p_factor/config")).c_str(), measureJson(doc), true);
//BufferingPrint bufferedClient(client, 32);
//serializeJson(doc, bufferedClient);
//bufferedClient.flush();
serializeJson(doc, client);
return client.endPublish();
}
@@ -860,9 +815,6 @@ public:
doc[F("mode")] = "box";
client.beginPublish((F("homeassistant/number/") + _prefix + F("/pid_i_factor/config")).c_str(), measureJson(doc), true);
//BufferingPrint bufferedClient(client, 32);
//serializeJson(doc, bufferedClient);
//bufferedClient.flush();
serializeJson(doc, client);
return client.endPublish();
}
@@ -892,9 +844,6 @@ public:
doc[F("mode")] = "box";
client.beginPublish((F("homeassistant/number/") + _prefix + F("/pid_d_factor/config")).c_str(), measureJson(doc), true);
//BufferingPrint bufferedClient(client, 32);
//serializeJson(doc, bufferedClient);
//bufferedClient.flush();
serializeJson(doc, client);
return client.endPublish();
}
@@ -989,9 +938,6 @@ public:
doc[F("payload_off")] = F("{\"equitherm\": {\"enable\" : false}}");
client.beginPublish((F("homeassistant/switch/") + _prefix + F("/equitherm/config")).c_str(), measureJson(doc), true);
//BufferingPrint bufferedClient(client, 32);
//serializeJson(doc, bufferedClient);
//bufferedClient.flush();
serializeJson(doc, client);
return client.endPublish();
}
@@ -1021,9 +967,6 @@ public:
doc[F("mode")] = "box";
client.beginPublish((F("homeassistant/number/") + _prefix + F("/equitherm_n_factor/config")).c_str(), measureJson(doc), true);
//BufferingPrint bufferedClient(client, 32);
//serializeJson(doc, bufferedClient);
//bufferedClient.flush();
serializeJson(doc, client);
return client.endPublish();
}
@@ -1053,9 +996,6 @@ public:
doc[F("mode")] = "box";
client.beginPublish((F("homeassistant/number/") + _prefix + F("/equitherm_k_factor/config")).c_str(), measureJson(doc), true);
//BufferingPrint bufferedClient(client, 32);
//serializeJson(doc, bufferedClient);
//bufferedClient.flush();
serializeJson(doc, client);
return client.endPublish();
}
@@ -1087,9 +1027,6 @@ public:
doc[F("mode")] = "box";
client.beginPublish((F("homeassistant/number/") + _prefix + F("/equitherm_t_factor/config")).c_str(), measureJson(doc), true);
//BufferingPrint bufferedClient(client, 32);
//serializeJson(doc, bufferedClient);
//bufferedClient.flush();
serializeJson(doc, client);
return client.endPublish();
}
@@ -1120,9 +1057,6 @@ public:
doc[F("payload_off")] = F("{\"tuning\": {\"enable\" : false}}");
client.beginPublish((F("homeassistant/switch/") + _prefix + F("/tuning/config")).c_str(), measureJson(doc), true);
//BufferingPrint bufferedClient(client, 32);
//serializeJson(doc, bufferedClient);
//bufferedClient.flush();
serializeJson(doc, client);
return client.endPublish();
}
@@ -1152,9 +1086,6 @@ public:
doc[F("options")][1] = F("PID");
client.beginPublish((F("homeassistant/select/") + _prefix + F("/tuning_regulator/config")).c_str(), measureJson(doc), true);
//BufferingPrint bufferedClient(client, 32);
//serializeJson(doc, bufferedClient);
//bufferedClient.flush();
serializeJson(doc, client);
return client.endPublish();
}
@@ -1182,9 +1113,6 @@ public:
doc[F("expire_after")] = 60;
client.beginPublish((F("homeassistant/binary_sensor/") + _prefix + F("/status/config")).c_str(), measureJson(doc), true);
//BufferingPrint bufferedClient(client, 32);
//serializeJson(doc, bufferedClient);
//bufferedClient.flush();
serializeJson(doc, client);
return client.endPublish();
}
@@ -1210,9 +1138,6 @@ public:
doc[F("value_template")] = F("{{ iif(value_json.states.otStatus, 'OFF', 'ON') }}");
client.beginPublish((F("homeassistant/binary_sensor/") + _prefix + F("/ot_status/config")).c_str(), measureJson(doc), true);
//BufferingPrint bufferedClient(client, 32);
//serializeJson(doc, bufferedClient);
//bufferedClient.flush();
serializeJson(doc, client);
return client.endPublish();
}
@@ -1239,9 +1164,6 @@ public:
doc[F("value_template")] = F("{{ iif(value_json.states.heating, 'ON', 'OFF') }}");
client.beginPublish((F("homeassistant/binary_sensor/") + _prefix + F("/heating/config")).c_str(), measureJson(doc), true);
//BufferingPrint bufferedClient(client, 32);
//serializeJson(doc, bufferedClient);
//bufferedClient.flush();
serializeJson(doc, client);
return client.endPublish();
}
@@ -1268,9 +1190,6 @@ public:
doc[F("value_template")] = F("{{ iif(value_json.states.dhw, 'ON', 'OFF') }}");
client.beginPublish((F("homeassistant/binary_sensor/") + _prefix + F("/dhw/config")).c_str(), measureJson(doc), true);
//BufferingPrint bufferedClient(client, 32);
//serializeJson(doc, bufferedClient);
//bufferedClient.flush();
serializeJson(doc, client);
return client.endPublish();
}
@@ -1297,9 +1216,6 @@ public:
doc[F("value_template")] = F("{{ iif(value_json.states.flame, 'ON', 'OFF') }}");
client.beginPublish((F("homeassistant/binary_sensor/") + _prefix + F("/flame/config")).c_str(), measureJson(doc), true);
//BufferingPrint bufferedClient(client, 32);
//serializeJson(doc, bufferedClient);
//bufferedClient.flush();
serializeJson(doc, client);
return client.endPublish();
}
@@ -1327,9 +1243,6 @@ public:
doc[F("value_template")] = F("{{ iif(value_json.states.fault, 'ON', 'OFF') }}");
client.beginPublish((F("homeassistant/binary_sensor/") + _prefix + F("/fault/config")).c_str(), measureJson(doc), true);
//BufferingPrint bufferedClient(client, 32);
//serializeJson(doc, bufferedClient);
//bufferedClient.flush();
serializeJson(doc, client);
return client.endPublish();
}
@@ -1356,9 +1269,6 @@ public:
doc[F("value_template")] = F("{{ iif(value_json.states.diagnostic, 'ON', 'OFF') }}");
client.beginPublish((F("homeassistant/binary_sensor/") + _prefix + F("/diagnostic/config")).c_str(), measureJson(doc), true);
//BufferingPrint bufferedClient(client, 32);
//serializeJson(doc, bufferedClient);
//bufferedClient.flush();
serializeJson(doc, client);
return client.endPublish();
}
@@ -1385,9 +1295,6 @@ public:
doc[F("value_template")] = F("{{ \"E%02d\"|format(value_json.states.faultCode) }}");
client.beginPublish((F("homeassistant/sensor/") + _prefix + F("/fault_code/config")).c_str(), measureJson(doc), true);
//BufferingPrint bufferedClient(client, 32);
//serializeJson(doc, bufferedClient);
//bufferedClient.flush();
serializeJson(doc, client);
return client.endPublish();
}
@@ -1416,9 +1323,6 @@ public:
doc["value_template"] = "{{ value_json.states.rssi|float(0)|round(1) }}";
client.beginPublish((F("homeassistant/sensor/") + _prefix + "/rssi/config").c_str(), measureJson(doc), true);
//BufferingPrint bufferedClient(client, 32);
//serializeJson(doc, bufferedClient);
//bufferedClient.flush();
serializeJson(doc, client);
return client.endPublish();
}
@@ -1448,9 +1352,6 @@ public:
doc[F("value_template")] = F("{{ value_json.sensors.modulation|float(0)|round(0) }}");
client.beginPublish((F("homeassistant/sensor/") + _prefix + F("/modulation/config")).c_str(), measureJson(doc), true);
//BufferingPrint bufferedClient(client, 32);
//serializeJson(doc, bufferedClient);
//bufferedClient.flush();
serializeJson(doc, client);
return client.endPublish();
}
@@ -1479,9 +1380,6 @@ public:
doc[F("value_template")] = F("{{ value_json.sensors.pressure|float(0)|round(2) }}");
client.beginPublish((F("homeassistant/sensor/") + _prefix + F("/pressure/config")).c_str(), measureJson(doc), true);
//BufferingPrint bufferedClient(client, 32);
//serializeJson(doc, bufferedClient);
//bufferedClient.flush();
serializeJson(doc, client);
return client.endPublish();
}
@@ -1515,9 +1413,6 @@ public:
doc[F("mode")] = "box";
client.beginPublish((F("homeassistant/number/") + _prefix + F("/indoor_temp/config")).c_str(), measureJson(doc), true);
//BufferingPrint bufferedClient(client, 32);
//serializeJson(doc, bufferedClient);
//bufferedClient.flush();
serializeJson(doc, client);
return client.endPublish();
}
@@ -1547,9 +1442,6 @@ public:
doc[F("value_template")] = F("{{ value_json.temperatures.indoor|float(0)|round(1) }}");
client.beginPublish((F("homeassistant/sensor/") + _prefix + F("/indoor_temp/config")).c_str(), measureJson(doc), true);
//BufferingPrint bufferedClient(client, 32);
//serializeJson(doc, bufferedClient);
//bufferedClient.flush();
serializeJson(doc, client);
return client.endPublish();
}
@@ -1582,9 +1474,6 @@ public:
doc[F("mode")] = "box";
client.beginPublish((F("homeassistant/number/") + _prefix + F("/outdoor_temp/config")).c_str(), measureJson(doc), true);
//BufferingPrint bufferedClient(client, 32);
//serializeJson(doc, bufferedClient);
//bufferedClient.flush();
serializeJson(doc, client);
return client.endPublish();
}
@@ -1614,9 +1503,6 @@ public:
doc[F("value_template")] = F("{{ value_json.temperatures.outdoor|float(0)|round(1) }}");
client.beginPublish((F("homeassistant/sensor/") + _prefix + F("/outdoor_temp/config")).c_str(), measureJson(doc), true);
//BufferingPrint bufferedClient(client, 32);
//serializeJson(doc, bufferedClient);
//bufferedClient.flush();
serializeJson(doc, client);
return client.endPublish();
}
@@ -1645,9 +1531,6 @@ public:
doc[F("value_template")] = F("{{ value_json.temperatures.heating|float(0)|round(2) }}");
client.beginPublish((F("homeassistant/sensor/") + _prefix + F("/heating_temp/config")).c_str(), measureJson(doc), true);
//BufferingPrint bufferedClient(client, 32);
//serializeJson(doc, bufferedClient);
//bufferedClient.flush();
serializeJson(doc, client);
return client.endPublish();
}
@@ -1676,16 +1559,13 @@ public:
doc[F("value_template")] = F("{{ value_json.temperatures.dhw|float(0)|round(2) }}");
client.beginPublish((F("homeassistant/sensor/") + _prefix + F("/dhw_temp/config")).c_str(), measureJson(doc), true);
//BufferingPrint bufferedClient(client, 32);
//serializeJson(doc, bufferedClient);
//bufferedClient.flush();
serializeJson(doc, client);
return client.endPublish();
}
bool publishClimateHeating(byte minTemp = 20, byte maxTemp = 90, bool enabledByDefault = true) {
StaticJsonDocument<2048> doc;
StaticJsonDocument<2560> doc;
doc[F("availability")][F("topic")] = _prefix + F("/status");
doc[F("device")][F("identifiers")][0] = _prefix;
doc[F("device")][F("sw_version")] = _deviceVersion;
@@ -1734,15 +1614,12 @@ public:
doc[F("temp_step")] = 0.5;
client.beginPublish((F("homeassistant/climate/") + _prefix + F("_heating/config")).c_str(), measureJson(doc), true);
//BufferingPrint bufferedClient(client, 32);
//serializeJson(doc, bufferedClient);
//bufferedClient.flush();
serializeJson(doc, client);
return client.endPublish();
}
bool publishClimateDHW(byte minTemp = 40, byte maxTemp = 60, bool enabledByDefault = true) {
StaticJsonDocument<1536> doc;
StaticJsonDocument<2560> doc;
doc[F("availability")][F("topic")] = _prefix + F("/status");
doc[F("device")][F("identifiers")][0] = _prefix;
doc[F("device")][F("sw_version")] = _deviceVersion;
@@ -1783,9 +1660,6 @@ public:
doc[F("max_temp")] = maxTemp;
client.beginPublish((F("homeassistant/climate/") + _prefix + F("_dhw/config")).c_str(), measureJson(doc), true);
//BufferingPrint bufferedClient(client, 32);
//serializeJson(doc, bufferedClient);
//bufferedClient.flush();
serializeJson(doc, client);
return client.endPublish();
}

View File

@@ -94,26 +94,25 @@ protected:
updatePressure();
if ((settings.opentherm.dhwPresent && settings.dhw.enable) || settings.heating.enable || heatingEnabled) {
updateModulationLevel();
} else {
vars.sensors.modulation = 0;
}
yield();
if ( settings.opentherm.dhwPresent && settings.dhw.enable ) {
if (settings.opentherm.dhwPresent) {
updateDHWTemp();
} else {
vars.temperatures.dhw = 0;
}
//if ( settings.heating.enable || heatingEnabled ) {
updateHeatingTemp();
//} else {
// vars.temperatures.heating = 0;
//}
yield();
//
// Температура ГВС
byte newDHWTemp = settings.dhw.target;
if (settings.opentherm.dhwPresent && settings.dhw.enable && newDHWTemp != currentDHWTemp) {
if (settings.opentherm.dhwPresent && settings.dhw.enable && (needSetDhwTemp() || newDHWTemp != currentDHWTemp)) {
if (newDHWTemp < vars.parameters.dhwMinTemp || newDHWTemp > vars.parameters.dhwMaxTemp) {
newDHWTemp = constrain(newDHWTemp, vars.parameters.dhwMinTemp, vars.parameters.dhwMaxTemp);
}
@@ -123,6 +122,7 @@ protected:
// Записываем заданную температуру ГВС
if (ot->setDHWSetpoint(newDHWTemp)) {
currentDHWTemp = newDHWTemp;
dhwSetTempTime = millis();
} else {
WARN("Failed set DHW temp");
@@ -131,12 +131,13 @@ protected:
//
// Температура отопления
if (heatingEnabled && fabs(vars.parameters.heatingSetpoint - currentHeatingTemp) > 0.0001) {
if (heatingEnabled && (needSetHeatingTemp() || fabs(vars.parameters.heatingSetpoint - currentHeatingTemp) > 0.0001)) {
INFO_F("Setting heating temp = %u \n", vars.parameters.heatingSetpoint);
// Записываем заданную температуру
if (ot->setBoilerTemperature(vars.parameters.heatingSetpoint)) {
currentHeatingTemp = vars.parameters.heatingSetpoint;
heatingSetTempTime = millis();
} else {
WARN("Failed set heating temp");
@@ -200,13 +201,27 @@ protected:
}
protected:
unsigned short readyTime = 60000;
unsigned short dhwSetTempInterval = 60000;
unsigned short heatingSetTempInterval = 60000;
bool pump = true;
unsigned long prevUpdateNonEssentialVars = 0;
unsigned long startupTime = millis();
unsigned long dhwSetTempTime = 0;
unsigned long heatingSetTempTime = 0;
bool isReady() {
return millis() - startupTime > 60000;
return millis() - startupTime > readyTime;
}
bool needSetDhwTemp() {
return millis() - dhwSetTempTime > dhwSetTempInterval;
}
bool needSetHeatingTemp() {
return millis() - heatingSetTempTime > heatingSetTempInterval;
}
void static printRequestDetail(OpenThermMessageID id, OpenThermResponseStatus status, unsigned long request, unsigned long response, byte attempt) {

View File

@@ -107,11 +107,11 @@ struct Variables {
struct {
bool heatingEnabled = false;
byte heatingMinTemp = 0;
byte heatingMaxTemp = 0;
byte heatingMinTemp = 20;
byte heatingMaxTemp = 90;
byte heatingSetpoint = 0.0f;
byte dhwMinTemp = 0;
byte dhwMaxTemp = 0;
byte dhwMinTemp = 30;
byte dhwMaxTemp = 60;
uint8_t slaveMemberIdCode;
uint8_t slaveType;
uint8_t slaveVersion;

View File

@@ -1,4 +1,4 @@
#define OT_GATEWAY_VERSION "1.3.1"
#define OT_GATEWAY_VERSION "1.3.2"
#define AP_SSID "OpenTherm Gateway"
#define AP_PASSWORD "otgateway123456"
#define USE_TELNET
@@ -11,8 +11,6 @@
#define EXT_SENSORS_INTERVAL 5000
#define EXT_SENSORS_FILTER_K 0.15
#define DS_CHECK_CRC true
#define DS_CRC_USE_TABLE true
#define LED_STATUS_PIN 13
#define LED_OT_RX_PIN 15