4 Commits

Author SHA1 Message Date
P43YM
b17ecd5ae8 Merge 54095892e1 into 4457e16a8f 2025-02-27 17:07:30 +03:00
P43YM
54095892e1 Wrong call for tatget temp, should be just target 2025-02-27 17:06:59 +03:00
P43YM
5dd76c9168 Typo in Hahelper 2025-02-27 12:52:51 +03:00
Yurii
4457e16a8f refactor: increased opentherm disconnect timeout 2025-02-27 12:48:27 +03:00
3 changed files with 152 additions and 147 deletions

View File

@@ -886,7 +886,7 @@ public:
return this->publish(this->makeConfigTopic(FPSTR(HA_ENTITY_NUMBER), F("equitherm_k_factor")).c_str(), doc); return this->publish(this->makeConfigTopic(FPSTR(HA_ENTITY_NUMBER), F("equitherm_k_factor")).c_str(), doc);
} }
bool publishInputEquithermFactorK(bool enabledByDefault = true) { bool publishInputEquithermFactorE(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();
doc[FPSTR(HA_ENABLED_BY_DEFAULT)] = enabledByDefault; doc[FPSTR(HA_ENABLED_BY_DEFAULT)] = enabledByDefault;
@@ -906,7 +906,7 @@ public:
doc[FPSTR(HA_EXPIRE_AFTER)] = this->expireAfter; doc[FPSTR(HA_EXPIRE_AFTER)] = this->expireAfter;
doc.shrinkToFit(); doc.shrinkToFit();
return this->publish(this->makeConfigTopic(FPSTR(HA_ENTITY_NUMBER), F("equitherm_k_factor")).c_str(), doc); return this->publish(this->makeConfigTopic(FPSTR(HA_ENTITY_NUMBER), F("equitherm_e_factor")).c_str(), doc);
} }
bool publishInputEquithermFactorT(bool enabledByDefault = true) { bool publishInputEquithermFactorT(bool enabledByDefault = true) {

View File

@@ -214,7 +214,12 @@ protected:
); );
} }
if (!vars.slave.connected && millis() - this->lastSuccessResponse < 1325) { // 5 request retries
// 1000ms maximum response waiting time
// 100ms delay between requests
// +15%
// 5 * (1000 + 100) * 1.15 = 6325 ms
if (!vars.slave.connected && millis() - this->lastSuccessResponse < 6325) {
Log.sinfoln( Log.sinfoln(
FPSTR(L_OT), FPSTR(L_OT),
F("Connected, downtime: %lu s."), F("Connected, downtime: %lu s."),
@@ -224,7 +229,7 @@ protected:
this->connectedTime = millis(); this->connectedTime = millis();
vars.slave.connected = true; vars.slave.connected = true;
} else if (vars.slave.connected && millis() - this->lastSuccessResponse > 1325) { } else if (vars.slave.connected && millis() - this->lastSuccessResponse > 6325) {
Log.swarningln( Log.swarningln(
FPSTR(L_OT), FPSTR(L_OT),
F("Disconnected, uptime: %lu s."), F("Disconnected, uptime: %lu s."),

View File

@@ -992,7 +992,7 @@ async function initChart() {
const result = await response.json(); const result = await response.json();
//График переменные //График переменные
const targetTemp = result?.heating?.target_temp ?? 24; const targetTemp = result?.heating?.target ?? 24;
const maxOut = result?.heating?.maxTemp ?? 90; const maxOut = result?.heating?.maxTemp ?? 90;
const Kn = result?.equitherm?.n_factor ?? 1; const Kn = result?.equitherm?.n_factor ?? 1;
const Ke = result?.equitherm?.e_factor ?? 1.3; const Ke = result?.equitherm?.e_factor ?? 1.3;
@@ -1091,7 +1091,7 @@ function updateChart(formData) {
}) })
.then(response => response.json()) .then(response => response.json())
.then(result => { .then(result => {
const targetTemp = result?.heating?.target_temp ?? 24; const targetTemp = result?.heating?.target ?? 24;
const maxOut = result?.heating?.maxTemp ?? 90; const maxOut = result?.heating?.maxTemp ?? 90;
const Kn = parseFloat(formData.get('equitherm[n_factor]')) || 1; const Kn = parseFloat(formData.get('equitherm[n_factor]')) || 1;
const Ke = parseFloat(formData.get('equitherm[e_factor]')) || 1.3; const Ke = parseFloat(formData.get('equitherm[e_factor]')) || 1.3;