From 7fd735f667a5bc3c191a557b0086abf426674d89 Mon Sep 17 00:00:00 2001 From: MichaelDvP Date: Mon, 10 Mar 2025 11:02:03 +0100 Subject: [PATCH] rename remoteseltemp to cooltemp, fix #2456 --- docs/Modbus-Entity-Registers.md | 2 +- docs/dump_entities.csv | 12 ++++++------ src/core/locale_translations.h | 3 ++- src/core/modbus_entity_parameters.hpp | 2 +- src/devices/thermostat.cpp | 10 +++++----- src/devices/thermostat.h | 8 ++++---- 6 files changed, 19 insertions(+), 18 deletions(-) diff --git a/docs/Modbus-Entity-Registers.md b/docs/Modbus-Entity-Registers.md index 8df89219d..7f9d2108d 100644 --- a/docs/Modbus-Entity-Registers.md +++ b/docs/Modbus-Entity-Registers.md @@ -4849,7 +4849,7 @@ | hc1.controlmode | control mode | enum [optimized\|simple\|n/a\|room\|power] | | true | HC | 25 | 1 | 1 | | hc1.program | program | enum [prog 1\|prog 2] | | true | HC | 26 | 1 | 1 | | hc1.tempautotemp | temporary set temperature automode | int8 (>=-1<=30) | C | true | HC | 27 | 1 | 1/2 | -| hc1.remoteseltemp | temporary set temperature from remote | int8 (>=-1<=30) | C | true | HC | 28 | 1 | 1/2 | +| hc1.cooltemp | cooling temperature | int8 (>=-1<=30) | C | true | HC | 28 | 1 | 1/2 | | hc1.fastheatup | fast heatup | uint8 (>=0<=100) | % | true | HC | 29 | 1 | 1 | | hc1.switchonoptimization | switch-on optimization | boolean | | true | HC | 30 | 1 | 1 | | hc1.reducemode | reduce mode | enum [outdoor\|room\|reduce] | | true | HC | 31 | 1 | 1 | diff --git a/docs/dump_entities.csv b/docs/dump_entities.csv index 2f39ed05e..8fed5d32b 100644 --- a/docs/dump_entities.csv +++ b/docs/dump_entities.csv @@ -3412,7 +3412,7 @@ device name,device type,product id,shortname,fullname,type [options...] \| (min/ "UI800, BC400",thermostat,4,hc1.controlmode,control mode,enum [weather compensated\|outside basepoint\|n/a\|room\|power\|constant], ,true,select.thermostat_hc1_control_mode,select.thermostat_hc1_controlmode,6,1,1,25,1 "UI800, BC400",thermostat,4,hc1.program,program,enum [prog 1\|prog 2], ,true,select.thermostat_hc1_program,select.thermostat_hc1_program,6,1,1,26,1 "UI800, BC400",thermostat,4,hc1.tempautotemp,temporary set temperature automode,int8 (>=-1<=30),C,true,number.thermostat_hc1_temporary_set_temperature_automode,number.thermostat_hc1_tempautotemp,6,1,1/2,27,1 -"UI800, BC400",thermostat,4,hc1.remoteseltemp,temporary set temperature from remote,int8 (>=-1<=30),C,true,number.thermostat_hc1_temporary_set_temperature_from_remote,number.thermostat_hc1_remoteseltemp,6,1,1/2,28,1 +"UI800, BC400",thermostat,4,hc1.cooltemp,cooling temperature,int8 (>=-1<=30),C,true,number.thermostat_hc1_cooling_temperature,number.thermostat_hc1_cooltemp,6,1,1/2,28,1 "UI800, BC400",thermostat,4,hc1.fastheatup,fast heatup,uint8 (>=0<=100),%,true,number.thermostat_hc1_fast_heatup,number.thermostat_hc1_fastheatup,6,1,1,29,1 "UI800, BC400",thermostat,4,hc1.switchonoptimization,switch-on optimization,boolean, ,true,switch.thermostat_hc1_switch-on_optimization,switch.thermostat_hc1_switchonoptimization,6,1,1,30,1 "UI800, BC400",thermostat,4,hc1.reducemode,reduce mode,enum [outdoor\|room\|reduce], ,true,select.thermostat_hc1_reduce_mode,select.thermostat_hc1_reducemode,6,1,1,31,1 @@ -3796,7 +3796,7 @@ device name,device type,product id,shortname,fullname,type [options...] \| (min/ "RC200, CW100, CR120, CR50",thermostat,157,hc1.controlmode,control mode,enum [optimized\|simple\|n/a\|room\|power], ,true,select.thermostat_hc1_control_mode,select.thermostat_hc1_controlmode,6,1,1,25,1 "RC200, CW100, CR120, CR50",thermostat,157,hc1.program,program,enum [prog 1\|prog 2], ,true,select.thermostat_hc1_program,select.thermostat_hc1_program,6,1,1,26,1 "RC200, CW100, CR120, CR50",thermostat,157,hc1.tempautotemp,temporary set temperature automode,int8 (>=-1<=30),C,true,number.thermostat_hc1_temporary_set_temperature_automode,number.thermostat_hc1_tempautotemp,6,1,1/2,27,1 -"RC200, CW100, CR120, CR50",thermostat,157,hc1.remoteseltemp,temporary set temperature from remote,int8 (>=-1<=30),C,true,number.thermostat_hc1_temporary_set_temperature_from_remote,number.thermostat_hc1_remoteseltemp,6,1,1/2,28,1 +"RC200, CW100, CR120, CR50",thermostat,157,hc1.cooltemp,cooling temperature,int8 (>=-1<=30),C,true,number.thermostat_hc1_cooling_temperature,number.thermostat_hc1_cooltemp,6,1,1/2,28,1 "RC200, CW100, CR120, CR50",thermostat,157,hc1.fastheatup,fast heatup,uint8 (>=0<=100),%,true,number.thermostat_hc1_fast_heatup,number.thermostat_hc1_fastheatup,6,1,1,29,1 "RC200, CW100, CR120, CR50",thermostat,157,hc1.switchonoptimization,switch-on optimization,boolean, ,true,switch.thermostat_hc1_switch-on_optimization,switch.thermostat_hc1_switchonoptimization,6,1,1,30,1 "RC200, CW100, CR120, CR50",thermostat,157,hc1.reducemode,reduce mode,enum [outdoor\|room\|reduce], ,true,select.thermostat_hc1_reduce_mode,select.thermostat_hc1_reducemode,6,1,1,31,1 @@ -3884,7 +3884,7 @@ device name,device type,product id,shortname,fullname,type [options...] \| (min/ "RC3*0, Moduline 3000/1010H, CW400, Sense II, HPC410",thermostat,158,hc1.controlmode,control mode,enum [weather compensated\|outside basepoint\|n/a\|room\|power\|constant], ,true,select.thermostat_hc1_control_mode,select.thermostat_hc1_controlmode,6,1,1,25,1 "RC3*0, Moduline 3000/1010H, CW400, Sense II, HPC410",thermostat,158,hc1.program,program,enum [prog 1\|prog 2], ,true,select.thermostat_hc1_program,select.thermostat_hc1_program,6,1,1,26,1 "RC3*0, Moduline 3000/1010H, CW400, Sense II, HPC410",thermostat,158,hc1.tempautotemp,temporary set temperature automode,int8 (>=-1<=30),C,true,number.thermostat_hc1_temporary_set_temperature_automode,number.thermostat_hc1_tempautotemp,6,1,1/2,27,1 -"RC3*0, Moduline 3000/1010H, CW400, Sense II, HPC410",thermostat,158,hc1.remoteseltemp,temporary set temperature from remote,int8 (>=-1<=30),C,true,number.thermostat_hc1_temporary_set_temperature_from_remote,number.thermostat_hc1_remoteseltemp,6,1,1/2,28,1 +"RC3*0, Moduline 3000/1010H, CW400, Sense II, HPC410",thermostat,158,hc1.cooltemp,cooling temperature,int8 (>=-1<=30),C,true,number.thermostat_hc1_cooling_temperature,number.thermostat_hc1_cooltemp,6,1,1/2,28,1 "RC3*0, Moduline 3000/1010H, CW400, Sense II, HPC410",thermostat,158,hc1.fastheatup,fast heatup,uint8 (>=0<=100),%,true,number.thermostat_hc1_fast_heatup,number.thermostat_hc1_fastheatup,6,1,1,29,1 "RC3*0, Moduline 3000/1010H, CW400, Sense II, HPC410",thermostat,158,hc1.switchonoptimization,switch-on optimization,boolean, ,true,switch.thermostat_hc1_switch-on_optimization,switch.thermostat_hc1_switchonoptimization,6,1,1,30,1 "RC3*0, Moduline 3000/1010H, CW400, Sense II, HPC410",thermostat,158,hc1.reducemode,reduce mode,enum [outdoor\|room\|reduce], ,true,select.thermostat_hc1_reduce_mode,select.thermostat_hc1_reducemode,6,1,1,31,1 @@ -3975,7 +3975,7 @@ device name,device type,product id,shortname,fullname,type [options...] \| (min/ "RC100, CR10, Moduline 1000/1010",thermostat,165,hc1.controlmode,control mode,enum [optimized\|simple\|n/a\|room\|power], ,true,select.thermostat_hc1_control_mode,select.thermostat_hc1_controlmode,6,1,1,25,1 "RC100, CR10, Moduline 1000/1010",thermostat,165,hc1.program,program,enum [prog 1\|prog 2], ,true,select.thermostat_hc1_program,select.thermostat_hc1_program,6,1,1,26,1 "RC100, CR10, Moduline 1000/1010",thermostat,165,hc1.tempautotemp,temporary set temperature automode,int8 (>=-1<=30),C,true,number.thermostat_hc1_temporary_set_temperature_automode,number.thermostat_hc1_tempautotemp,6,1,1/2,27,1 -"RC100, CR10, Moduline 1000/1010",thermostat,165,hc1.remoteseltemp,temporary set temperature from remote,int8 (>=-1<=30),C,true,number.thermostat_hc1_temporary_set_temperature_from_remote,number.thermostat_hc1_remoteseltemp,6,1,1/2,28,1 +"RC100, CR10, Moduline 1000/1010",thermostat,165,hc1.cooltemp,cooling temperature,int8 (>=-1<=30),C,true,number.thermostat_hc1_cooling_temperature,number.thermostat_hc1_cooltemp,6,1,1/2,28,1 "RC100, CR10, Moduline 1000/1010",thermostat,165,hc1.fastheatup,fast heatup,uint8 (>=0<=100),%,true,number.thermostat_hc1_fast_heatup,number.thermostat_hc1_fastheatup,6,1,1,29,1 "RC100, CR10, Moduline 1000/1010",thermostat,165,hc1.switchonoptimization,switch-on optimization,boolean, ,true,switch.thermostat_hc1_switch-on_optimization,switch.thermostat_hc1_switchonoptimization,6,1,1,30,1 "RC100, CR10, Moduline 1000/1010",thermostat,165,hc1.reducemode,reduce mode,enum [outdoor\|room\|reduce], ,true,select.thermostat_hc1_reduce_mode,select.thermostat_hc1_reducemode,6,1,1,31,1 @@ -4064,7 +4064,7 @@ device name,device type,product id,shortname,fullname,type [options...] \| (min/ "Rego 2000/3000",thermostat,172,hc1.controlmode,control mode,enum [weather compensated\|outside basepoint\|n/a\|room\|power\|constant], ,true,select.thermostat_hc1_control_mode,select.thermostat_hc1_controlmode,6,1,1,25,1 "Rego 2000/3000",thermostat,172,hc1.program,program,enum [prog 1\|prog 2], ,true,select.thermostat_hc1_program,select.thermostat_hc1_program,6,1,1,26,1 "Rego 2000/3000",thermostat,172,hc1.tempautotemp,temporary set temperature automode,int8 (>=-1<=30),C,true,number.thermostat_hc1_temporary_set_temperature_automode,number.thermostat_hc1_tempautotemp,6,1,1/2,27,1 -"Rego 2000/3000",thermostat,172,hc1.remoteseltemp,temporary set temperature from remote,int8 (>=-1<=30),C,true,number.thermostat_hc1_temporary_set_temperature_from_remote,number.thermostat_hc1_remoteseltemp,6,1,1/2,28,1 +"Rego 2000/3000",thermostat,172,hc1.cooltemp,cooling temperature,int8 (>=-1<=30),C,true,number.thermostat_hc1_cooling_temperature,number.thermostat_hc1_cooltemp,6,1,1/2,28,1 "Rego 2000/3000",thermostat,172,hc1.fastheatup,fast heatup,uint8 (>=0<=100),%,true,number.thermostat_hc1_fast_heatup,number.thermostat_hc1_fastheatup,6,1,1,29,1 "Rego 2000/3000",thermostat,172,hc1.switchonoptimization,switch-on optimization,boolean, ,true,switch.thermostat_hc1_switch-on_optimization,switch.thermostat_hc1_switchonoptimization,6,1,1,30,1 "Rego 2000/3000",thermostat,172,hc1.reducemode,reduce mode,enum [outdoor\|room\|reduce], ,true,select.thermostat_hc1_reduce_mode,select.thermostat_hc1_reducemode,6,1,1,31,1 @@ -4181,7 +4181,7 @@ device name,device type,product id,shortname,fullname,type [options...] \| (min/ "Rego 3000, UI800, Logamatic BC400",thermostat,253,hc1.controlmode,control mode,enum [weather compensated\|outside basepoint\|n/a\|room\|power\|constant], ,true,select.thermostat_hc1_control_mode,select.thermostat_hc1_controlmode,6,1,1,25,1 "Rego 3000, UI800, Logamatic BC400",thermostat,253,hc1.program,program,enum [prog 1\|prog 2], ,true,select.thermostat_hc1_program,select.thermostat_hc1_program,6,1,1,26,1 "Rego 3000, UI800, Logamatic BC400",thermostat,253,hc1.tempautotemp,temporary set temperature automode,int8 (>=-1<=30),C,true,number.thermostat_hc1_temporary_set_temperature_automode,number.thermostat_hc1_tempautotemp,6,1,1/2,27,1 -"Rego 3000, UI800, Logamatic BC400",thermostat,253,hc1.remoteseltemp,temporary set temperature from remote,int8 (>=-1<=30),C,true,number.thermostat_hc1_temporary_set_temperature_from_remote,number.thermostat_hc1_remoteseltemp,6,1,1/2,28,1 +"Rego 3000, UI800, Logamatic BC400",thermostat,253,hc1.cooltemp,cooling temperature,int8 (>=-1<=30),C,true,number.thermostat_hc1_cooling_temperature,number.thermostat_hc1_cooltemp,6,1,1/2,28,1 "Rego 3000, UI800, Logamatic BC400",thermostat,253,hc1.fastheatup,fast heatup,uint8 (>=0<=100),%,true,number.thermostat_hc1_fast_heatup,number.thermostat_hc1_fastheatup,6,1,1,29,1 "Rego 3000, UI800, Logamatic BC400",thermostat,253,hc1.switchonoptimization,switch-on optimization,boolean, ,true,switch.thermostat_hc1_switch-on_optimization,switch.thermostat_hc1_switchonoptimization,6,1,1,30,1 "Rego 3000, UI800, Logamatic BC400",thermostat,253,hc1.reducemode,reduce mode,enum [outdoor\|room\|reduce], ,true,select.thermostat_hc1_reduce_mode,select.thermostat_hc1_reducemode,6,1,1,31,1 diff --git a/src/core/locale_translations.h b/src/core/locale_translations.h index 5f795415d..fee95d4c2 100644 --- a/src/core/locale_translations.h +++ b/src/core/locale_translations.h @@ -711,7 +711,8 @@ MAKE_TRANSLATION(nighttemp2, "nighttemp", "night temperature T1", "Nachttemperat MAKE_TRANSLATION(ecotemp, "ecotemp", "eco temperature", "eco Temperatur", "Temperatuur eco", "Eko-temperatur", "temperatura w trybie eko", "øko temperatur", "température éco", "eko sıcaklık", "Temperatura eco", "eko teplota", "eko teplota") MAKE_TRANSLATION(manualtemp, "manualtemp", "manual temperature", "manuelle Temperatur", "Temperatuur handmatig", "Temperatur Manuell", "temperatura ustawiona ręcznie", "manuell temperatur", "température manuelle", "manuel sıcaklık", "temperatura manuale", "manuálna teplota", "manuální teplota") MAKE_TRANSLATION(tempautotemp, "tempautotemp", "temporary set temperature automode", "temporäre Solltemperatur Automatikmodus", "Streeftemperatuur automodus tijdelijk", "Temporär Aktivering av Auto-läge", "zadana temperatura w pomieszczeniu w trybie \"auto\" (tymczasowa)", "temporær valgt temp i automodus", "température temporaire mode automatique", "geçici ayarlı sıcaklık otomatik mod", "impostare temporaneamente temperatura automatica", "automatický režim dočasnej nastavenej teploty", "dočasné nastavení teploty v automatickém režimu") -MAKE_TRANSLATION(remoteseltemp, "remoteseltemp", "temporary set temperature from remote", "temporäre Solltemperatur Remote", "Temperatuur van afstandsbedieding", "Temperatur från fjärruppkoppling", "zadana zdalnie temperatura a pomieszczeniu (tymczasowa)", "temporær valgt temp fra fjernbetjening", "température temporaire depuis télécommande", "geçici ayarlı sıcaklık uzaktan", "Temperatura temporanea da remoto", "dočasne nastavená teplota z diaľkového ovládania", "dočasné nastavení teploty z dálkového ovladače") +MAKE_TRANSLATION(cooltemp, "cooltemp", "cooling temperature", "Kühltemperatur", "Temperatuur koelbedrijf", "Temperatur Kyla", "temperatura ciepła", "chłodzenie temperatur", "température kjøling", "soğuyor sıcaklık", "temperatura calore", "chladenie teplota", "chlazení teplota") +// MAKE_TRANSLATION(remoteseltemp, "remoteseltemp", "temporary set temperature from remote", "temporäre Solltemperatur Remote", "Temperatuur van afstandsbedieding", "Temperatur från fjärruppkoppling", "zadana zdalnie temperatura a pomieszczeniu (tymczasowa)", "temporær valgt temp fra fjernbetjening", "température temporaire depuis télécommande", "geçici ayarlı sıcaklık uzaktan", "Temperatura temporanea da remoto", "dočasne nastavená teplota z diaľkového ovládania", "dočasné nastavení teploty z dálkového ovladače") MAKE_TRANSLATION(comforttemp, "comforttemp", "comfort temperature", "Komforttemperatur", "Comforttemperatuur", "Komforttemperatur", "temperatura w trybie komfort", "komforttemperatur", "température confort", "konfor sıcaklığı", "temperatura comfort", "komfortná teplota", "komfortní teplota") MAKE_TRANSLATION(summertemp, "summertemp", "summer temperature", "Sommertemperatur", "Zomertemperatuur", "Sommartemperatur", "temperatura przełączania lato/zima", "Sommertemperatur", "température été", "yaz sıcaklığı", "temperatura estiva", "letná teplota", "letní teplota") MAKE_TRANSLATION(designtemp, "designtemp", "design temperature", "Auslegungstemperatur", "Ontwerptemperatuur", "Design-temperatur", "temperatura projektowa", "designtemperatur", "température conception", "özel sıcaklık", "temperatura predefinita", "návrhová teplota", "dimenzovaná teplota") diff --git a/src/core/modbus_entity_parameters.hpp b/src/core/modbus_entity_parameters.hpp index 26d16a6e7..4d074aa27 100644 --- a/src/core/modbus_entity_parameters.hpp +++ b/src/core/modbus_entity_parameters.hpp @@ -318,7 +318,7 @@ const std::initializer_list Modbus::modbus_register_ma REGISTER_MAPPING(dt::THERMOSTAT, TAG_TYPE_HC, FL_(controlmode), 25, 1), // controlmode REGISTER_MAPPING(dt::THERMOSTAT, TAG_TYPE_HC, FL_(program), 26, 1), // program REGISTER_MAPPING(dt::THERMOSTAT, TAG_TYPE_HC, FL_(tempautotemp), 27, 1), // tempautotemp - REGISTER_MAPPING(dt::THERMOSTAT, TAG_TYPE_HC, FL_(remoteseltemp), 28, 1), // remoteseltemp + REGISTER_MAPPING(dt::THERMOSTAT, TAG_TYPE_HC, FL_(cooltemp), 28, 1), // cooltemp REGISTER_MAPPING(dt::THERMOSTAT, TAG_TYPE_HC, FL_(fastheatup), 29, 1), // fastheatup REGISTER_MAPPING(dt::THERMOSTAT, TAG_TYPE_HC, FL_(switchonoptimization), 30, 1), // switchonoptimization REGISTER_MAPPING(dt::THERMOSTAT, TAG_TYPE_HC, FL_(reducemode), 31, 1), // reducemode diff --git a/src/devices/thermostat.cpp b/src/devices/thermostat.cpp index 350b750ea..6137a1360 100644 --- a/src/devices/thermostat.cpp +++ b/src/devices/thermostat.cpp @@ -1166,7 +1166,7 @@ void Thermostat::process_RC300Set(std::shared_ptr telegram) { has_enumupdate(telegram, hc->reducemode, 5, 1); // 1-outdoor temp threshold, 2-room temp threshold, 3-reduced mode has_update(telegram, hc->reducetemp, 9); has_update(telegram, hc->noreducetemp, 12); - has_update(telegram, hc->remoteseltemp, 17); // see https://github.com/emsesp/EMS-ESP32/issues/590 + has_update(telegram, hc->cooltemp, 17); // see https://github.com/emsesp/EMS-ESP32/issues/590 and 2456 has_enumupdate(telegram, hc->switchProgMode, 19, 1); // 1-level, 2-absolute has_update(telegram, hc->redThreshold, 20); has_update(telegram, hc->boost, 23); @@ -3827,7 +3827,7 @@ bool Thermostat::set_temperature(const float temperature, const uint8_t mode, co factor = 1; // to write 0xFF } break; - case HeatingCircuit::Mode::REMOTESELTEMP: + case HeatingCircuit::Mode::COOLTEMP: offset = 0x11; break; case HeatingCircuit::Mode::COMFORT: @@ -4686,12 +4686,12 @@ void Thermostat::register_device_values_hc(std::shared_ptrremoteseltemp, + &hc->cooltemp, DeviceValueType::INT8, DeviceValueNumOp::DV_NUMOP_DIV2, - FL_(remoteseltemp), + FL_(cooltemp), DeviceValueUOM::DEGREES, - MAKE_CF_CB(set_remoteseltemp), + MAKE_CF_CB(set_cooltemp), -1, 30); register_device_value(tag, &hc->fastHeatup, DeviceValueType::UINT8, FL_(fastheatup), DeviceValueUOM::PERCENT, MAKE_CF_CB(set_fastheatup)); diff --git a/src/devices/thermostat.h b/src/devices/thermostat.h index cba27470a..843872f52 100644 --- a/src/devices/thermostat.h +++ b/src/devices/thermostat.h @@ -39,7 +39,7 @@ class Thermostat : public EMSdevice { int16_t remotetemp; // for readback uint8_t remotehum; // for readback uint8_t tempautotemp; - int8_t remoteseltemp; + int8_t cooltemp; uint8_t mode; uint8_t mode_new; uint8_t modetype; @@ -159,7 +159,7 @@ class Thermostat : public EMSdevice { ON, DAYLOW, DAYMID, - REMOTESELTEMP, + COOLTEMP, COOLSTART, UNKNOWN @@ -571,8 +571,8 @@ class Thermostat : public EMSdevice { inline bool set_roominfluence(const char * value, const int8_t id) { return set_temperature_value(value, id, HeatingCircuit::Mode::ROOMINFLUENCE, true); } - inline bool set_remoteseltemp(const char * value, const int8_t id) { - return set_temperature_value(value, id, HeatingCircuit::Mode::REMOTESELTEMP); + inline bool set_cooltemp(const char * value, const int8_t id) { + return set_temperature_value(value, id, HeatingCircuit::Mode::COOLTEMP); } inline bool set_coolstart(const char * value, const int8_t id) { return set_temperature_value(value, id, HeatingCircuit::Mode::COOLSTART);