mirror of
https://github.com/emsesp/EMS-ESP32.git
synced 2025-12-07 16:29:51 +03:00
fixes for showing HCs
This commit is contained in:
@@ -835,8 +835,8 @@ void publishValues(bool force) {
|
|||||||
// handle the thermostat values
|
// handle the thermostat values
|
||||||
if (ems_getThermostatEnabled()) {
|
if (ems_getThermostatEnabled()) {
|
||||||
uint8_t total_active_hc = 0; // number of HCs
|
uint8_t total_active_hc = 0; // number of HCs
|
||||||
for (uint8_t hc_v = 0; hc_v < EMS_THERMOSTAT_MAXHC; hc_v++) {
|
for (uint8_t hc_v = 1; hc_v <= EMS_THERMOSTAT_MAXHC; hc_v++) {
|
||||||
_EMS_Thermostat_HC * thermostat = &EMS_Thermostat.hc[hc_v];
|
_EMS_Thermostat_HC * thermostat = &EMS_Thermostat.hc[hc_v - 1];
|
||||||
|
|
||||||
total_active_hc++; // increase count for #HCs we encounter
|
total_active_hc++; // increase count for #HCs we encounter
|
||||||
|
|
||||||
@@ -846,7 +846,7 @@ void publishValues(bool force) {
|
|||||||
doc.clear();
|
doc.clear();
|
||||||
JsonObject rootThermostat = doc.to<JsonObject>();
|
JsonObject rootThermostat = doc.to<JsonObject>();
|
||||||
|
|
||||||
rootThermostat[THERMOSTAT_HC] = _int_to_char(s, (thermostat->hc) + 1); // heating circuit 1..4
|
rootThermostat[THERMOSTAT_HC] = _int_to_char(s, thermostat->hc); // heating circuit 1..4
|
||||||
|
|
||||||
// different logic depending on thermostat types
|
// different logic depending on thermostat types
|
||||||
if (ems_getThermostatModel() == EMS_MODEL_EASY) {
|
if (ems_getThermostatModel() == EMS_MODEL_EASY) {
|
||||||
@@ -880,7 +880,7 @@ void publishValues(bool force) {
|
|||||||
rootThermostat[THERMOSTAT_CIRCUITCALCTEMP] = thermostat->circuitcalctemp;
|
rootThermostat[THERMOSTAT_CIRCUITCALCTEMP] = thermostat->circuitcalctemp;
|
||||||
}
|
}
|
||||||
|
|
||||||
uint8_t thermoMode = _getThermostatMode(hc_v + 1); // 0xFF=unknown, 0=low, 1=manual, 2=auto, 3=night, 4=day
|
uint8_t thermoMode = _getThermostatMode(hc_v); // 0xFF=unknown, 0=low, 1=manual, 2=auto, 3=night, 4=day
|
||||||
|
|
||||||
// Termostat Mode
|
// Termostat Mode
|
||||||
if (thermoMode == 0) {
|
if (thermoMode == 0) {
|
||||||
@@ -1450,11 +1450,6 @@ void TelnetCommandCallback(uint8_t wc, const char * commandLine) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (strcmp(first_cmd, "startup") == 0) {
|
|
||||||
ems_startupTelegrams();
|
|
||||||
ok = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
// shower settings
|
// shower settings
|
||||||
if ((strcmp(first_cmd, "shower") == 0) && (wc == 2)) {
|
if ((strcmp(first_cmd, "shower") == 0) && (wc == 2)) {
|
||||||
char * second_cmd = _readWord();
|
char * second_cmd = _readWord();
|
||||||
|
|||||||
Reference in New Issue
Block a user