diff --git a/src/devices/thermostat.cpp b/src/devices/thermostat.cpp index ea57ee4a7..e086adf91 100644 --- a/src/devices/thermostat.cpp +++ b/src/devices/thermostat.cpp @@ -1138,7 +1138,7 @@ void Thermostat::process_RC300Summer(std::shared_ptr telegram) { has_update(telegram, hc->fastHeatup, 10); } -// types 0x471 ff +// types 0x471 ff summer2_typeids // (0x473), data: 00 11 04 01 01 1C 08 04 void Thermostat::process_RC300Summer2(std::shared_ptr telegram) { auto hc = heating_circuit(telegram); @@ -1156,6 +1156,9 @@ void Thermostat::process_RC300Summer2(std::shared_ptr telegram) has_update(telegram, hc->heatondelay, 2); has_update(telegram, hc->heatoffdelay, 3); has_update(telegram, hc->instantstart, 4); + has_update(telegram, hc->coolstart, 5); + has_update(telegram, hc->coolondelay, 6); + has_update(telegram, hc->cooloffdelay, 7); } // types 0x29B ff @@ -2248,6 +2251,35 @@ bool Thermostat::set_cooling(const char * value, const int8_t id) { return true; } +// set cooling delays +bool Thermostat::set_coolondelay(const char * value, const int8_t id) { + auto hc = heating_circuit(id); + if (hc == nullptr) { + return false; + } + + int v; + if (!Helpers::value2number(value, v)) { + return false; + } + write_command(summer2_typeids[hc->hc()], 6, v, summer2_typeids[hc->hc()]); + return true; +} + +bool Thermostat::set_cooloffdelay(const char * value, const int8_t id) { + auto hc = heating_circuit(id); + if (hc == nullptr) { + return false; + } + + int v; + if (!Helpers::value2number(value, v)) { + return false; + } + write_command(summer2_typeids[hc->hc()], 7, v, summer2_typeids[hc->hc()]); + return true; +} + // sets the thermostat ww circulation working mode, where mode is a string bool Thermostat::set_wwcircmode(const char * value, const int8_t id) { uint8_t dhw = id2dhw(id); @@ -3564,6 +3596,12 @@ bool Thermostat::set_temperature(const float temperature, const uint8_t mode, co validate_typeid = set_typeid; factor = 1; break; + case HeatingCircuit::Mode::COOLSTART: + offset = 5; + set_typeid = summer2_typeids[hc->hc()]; + validate_typeid = set_typeid; + factor = 1; + break; case HeatingCircuit::Mode::MANUAL: if (model == EMSdevice::EMS_DEVICE_FLAG_CR120) { offset = 22; // manual offset CR120 @@ -4470,6 +4508,9 @@ void Thermostat::register_device_values_hc(std::shared_ptrinstantstart, DeviceValueType::UINT8, FL_(instantstart), DeviceValueUOM::K, MAKE_CF_CB(set_instantstart), 1, 10); register_device_value(tag, &hc->boost, DeviceValueType::BOOL, FL_(boost), DeviceValueUOM::NONE, MAKE_CF_CB(set_boost)); register_device_value(tag, &hc->boosttime, DeviceValueType::UINT8, FL_(boosttime), DeviceValueUOM::HOURS, MAKE_CF_CB(set_boosttime)); + register_device_value(tag, &hc->coolstart, DeviceValueType::UINT8, FL_(coolstart), DeviceValueUOM::DEGREES, MAKE_CF_CB(set_coolstart), 20, 35); + register_device_value(tag, &hc->coolondelay, DeviceValueType::UINT8, FL_(coolondelay), DeviceValueUOM::HOURS, MAKE_CF_CB(set_coolondelay), 1, 48); + register_device_value(tag, &hc->cooloffdelay, DeviceValueType::UINT8, FL_(cooloffdelay), DeviceValueUOM::HOURS, MAKE_CF_CB(set_cooloffdelay), 1, 48); break; case EMSdevice::EMS_DEVICE_FLAG_CRF: diff --git a/src/devices/thermostat.h b/src/devices/thermostat.h index c1da03c52..afb7097f2 100644 --- a/src/devices/thermostat.h +++ b/src/devices/thermostat.h @@ -98,6 +98,9 @@ class Thermostat : public EMSdevice { uint8_t hpmode; uint8_t cooling; uint8_t coolingon; + uint8_t coolstart; // starttemperature 20-35°C + uint8_t coolondelay; // 1-48 hours + uint8_t cooloffdelay; // 1-48 hours // RC300 uint8_t heatoffdelay; // 1-48h uint8_t heatondelay; // 1-48h @@ -152,6 +155,7 @@ class Thermostat : public EMSdevice { DAYLOW, DAYMID, REMOTESELTEMP, + COOLSTART, UNKNOWN }; @@ -562,6 +566,9 @@ class Thermostat : public EMSdevice { inline bool set_remoteseltemp(const char * value, const int8_t id) { return set_temperature_value(value, id, HeatingCircuit::Mode::REMOTESELTEMP); } + inline bool set_coolstart(const char * value, const int8_t id) { + return set_temperature_value(value, id, HeatingCircuit::Mode::COOLSTART); + } // set functions - these don't use the id/hc, the parameters are ignored bool set_wwmode(const char * value, const int8_t id); @@ -646,6 +653,8 @@ class Thermostat : public EMSdevice { bool set_hpminflowtemp(const char * value, const int8_t id); bool set_hpmode(const char * value, const int8_t id); bool set_cooling(const char * value, const int8_t id); + bool set_coolondelay(const char * value, const int8_t id); + bool set_cooloffdelay(const char * value, const int8_t id); }; } // namespace emsesp diff --git a/src/locale_translations.h b/src/locale_translations.h index 8401a5c63..024c5b0cf 100644 --- a/src/locale_translations.h +++ b/src/locale_translations.h @@ -733,6 +733,9 @@ MAKE_TRANSLATION(dewoffset, "dewoffset", "dew point offset", "Taupunkt Differenz MAKE_TRANSLATION(roomtempdiff, "roomtempdiff", "room temp difference", "Raumtemperatur Differenz", "Verschiltemperatuur kamertemp", "", "różnica temp. pomieszczenia", "", "", "oda sıcaklığı farkı", "differenza temperatura ambiente", "rozdiel izbovej teploty") // TODO translate MAKE_TRANSLATION(hpminflowtemp, "hpminflowtemp", "HP min. flow temp.", "WP minimale Vorlauftemperatur", "Minimale aanvoertemperatuur WP", "", "pompa ciepła, min. temperatura przepływu", "", "", "yüksek güç minimum akış sıcaklığı", "temperatura minima di mandata", "VT min. teplota prietoku.") // TODO translate MAKE_TRANSLATION(hpcooling, "cooling", "cooling", "Kühlen", "Koelen", "Kyler", "chłodzenie", "kjøling", "refroidissement", "soğuma", "raffreddamento", "chladenie") +MAKE_TRANSLATION(coolstart, "coolstart", "cooling starttemp", "Kühlbetrieb ab") // TODO translate +MAKE_TRANSLATION(coolondelay, "coolondelay", "cooling on delay", "Einschaltverzögerung Kühlen") // TODO translate +MAKE_TRANSLATION(cooloffdelay, "cooloffdelay", "cooling off delay", "Ausschaltverzögerung Kühlen") // TODO translate // heatpump and RC100H MAKE_TRANSLATION(airHumidity, "airhumidity", "relative air humidity", "relative Luftfeuchte", "Relatieve luchtvochtigheid", "Relativ Luftfuktighet", "wilgotność względna w pomieszczeniu", "luftfuktighet", "humidité relative air", "havadaki bağıl nem", "umidità relativa aria", "relatívna vlhkosť vzduchu")