From f1dbd3018dc3bbecadbf9bbf3ca129c07a15d808 Mon Sep 17 00:00:00 2001 From: MichaelDvP Date: Mon, 19 Dec 2022 10:38:18 +0100 Subject: [PATCH] dhw comf/eco switch off temps #803 --- src/devices/boiler.cpp | 36 +++++++++++++++++++++++++++++++++++- src/devices/boiler.h | 11 +++++++++++ src/locale_translations.h | 3 +++ 3 files changed, 49 insertions(+), 1 deletion(-) diff --git a/src/devices/boiler.cpp b/src/devices/boiler.cpp index d6e761a00..d151c58b1 100644 --- a/src/devices/boiler.cpp +++ b/src/devices/boiler.cpp @@ -186,6 +186,7 @@ Boiler::Boiler(uint8_t device_type, int8_t device_id, uint8_t product_id, const register_telegram_type(0x484, "HPSilentMode", true, MAKE_PF_CB(process_HpSilentMode)); register_telegram_type(0x48B, "HPPumps", true, MAKE_PF_CB(process_HpPumps)); register_telegram_type(0x491, "HPAdditionalHeater", true, MAKE_PF_CB(process_HpAdditionalHeater)); + register_telegram_type(0x499, "HPDhwSettings", true, MAKE_PF_CB(process_HpDhwSettings)); } /* @@ -643,6 +644,23 @@ Boiler::Boiler(uint8_t device_type, int8_t device_id, uint8_t product_id, const MAKE_CF_CB(set_tempDiffCool), 3, 10); + // heatpump DHW settings + register_device_value(DeviceValueTAG::TAG_BOILER_DATA_WW, + &wwComfOffTemp_, + DeviceValueType::UINT, + FL_(wwComfOffTemp), + DeviceValueUOM::DEGREES, + MAKE_CF_CB(set_wwComfOffTemp), + 15, + 65); + register_device_value(DeviceValueTAG::TAG_BOILER_DATA_WW, + &wwEcoOffTemp_, + DeviceValueType::UINT, + FL_(wwEcoOffTemp), + DeviceValueUOM::DEGREES, + MAKE_CF_CB(set_wwEcoOffTemp), + 15, + 65); } // dhw - DEVICE_DATA_ww topic @@ -1558,7 +1576,7 @@ void Boiler::process_HpValve(std::shared_ptr telegram) { // Boiler(0x08) -B-> All(0x00), ?(0x048B), data: 00 1E 00 96 00 1E (offset 24) void Boiler::process_HpPumps(std::shared_ptr telegram) { has_update(telegram, tempDiffHeat_, 4); // is * 10 - // has_update(telegram, tempDiffCool_, 3); // is * 10 + has_update(telegram, tempDiffCool_, 3); // is * 10 } // Boiler(0x08) -> All(0x00), ?(0x0491), data: 03 01 00 00 00 02 64 00 00 14 01 2C 00 0A 00 1E 00 1E 00 00 1E 0A 1E 05 05 @@ -1569,6 +1587,13 @@ void Boiler::process_HpAdditionalHeater(std::shared_ptr telegram has_update(telegram, auxHeaterDelay_, 16); // is / 10 } +// DHW 0x499 +// Boiler(0x08) -B-> All(0x00), ?(0x0499), data: 31 33 3F 3B 01 +void Boiler::process_HpDhwSettings(std::shared_ptr telegram) { + has_update(telegram, wwComfOffTemp_, 1); + has_update(telegram, wwEcoOffTemp_, 0); +} + // Settings AM200 // pos 12: off(00)/Keelbypass(01)/(hc1pump(02) only standalone) @@ -2577,4 +2602,13 @@ bool Boiler::set_tempDiff(const char * value, const int8_t id) { return false; } +bool Boiler::set_wwOffTemp(const char * value, const int8_t id) { + int v; + if (Helpers::value2number(value, v)) { + write_command(0x499, id, v, 0x499); + return true; + } + return false; +} + } // namespace emsesp diff --git a/src/devices/boiler.h b/src/devices/boiler.h index 6e68ff7a7..9b5ece1c0 100644 --- a/src/devices/boiler.h +++ b/src/devices/boiler.h @@ -255,6 +255,9 @@ class Boiler : public EMSdevice { uint8_t tempDiffHeat_; uint8_t tempDiffCool_; + uint8_t wwComfOffTemp_; + uint8_t wwEcoOffTemp_; + /* // Hybrid heatpump with telegram 0xBB is readable and writeable in boiler and thermostat // thermostat always overwrites settings in boiler @@ -310,6 +313,7 @@ class Boiler : public EMSdevice { void process_HpAdditionalHeater(std::shared_ptr telegram); void process_HpValve(std::shared_ptr telegram); void process_HpPumps(std::shared_ptr telegram); + void process_HpDhwSettings(std::shared_ptr telegram); // commands - none of these use the additional id parameter bool set_ww_mode(const char * value, const int8_t id); @@ -418,6 +422,13 @@ class Boiler : public EMSdevice { inline bool set_tempDiffCool(const char * value, const int8_t id) { return set_tempDiff(value, 3); } + bool set_wwOffTemp(const char * value, const int8_t id); + inline bool set_wwComfOffTemp(const char * value, const int8_t id) { + return set_wwOffTemp(value, 1); + } + inline bool set_wwEcoOffTemp(const char * value, const int8_t id) { + return set_wwOffTemp(value, 0); + } /* bool set_hybridStrategy(const char * value, const int8_t id); diff --git a/src/locale_translations.h b/src/locale_translations.h index 7901e3082..671c0d470 100644 --- a/src/locale_translations.h +++ b/src/locale_translations.h @@ -382,6 +382,9 @@ MAKE_PSTR_LIST(hpHystPool, "hphystpool", "on/off hyst pool", "Schalthysterese Po MAKE_PSTR_LIST(tempDiffHeat, "tempdiffheat", "temp. diff. TC3/TC0 heat", "Temp.diff. TC3/TC0 Heizen", "Temp.vers. TC3/TC0 verw", "", "", "", "Delta T TC3/TC0 Chauff") MAKE_PSTR_LIST(tempDiffCool, "tempdiffcool", "temp. diff. TC3/TC0 cool", "Temp.diff. TC3/TC0 Kühlen", "Temp.vers. TC3/TC0 koel.", "", "", "", "Delta T TC3/TC0 Refroid.") +MAKE_PSTR_LIST(wwComfOffTemp, "wwcomfoff", "comfort switch off", "Komfort Ausschalttemp", "Comfort Uitschakeltemp.", "", "", "", "Confort Temp. d'arrêt") +MAKE_PSTR_LIST(wwEcoOffTemp, "wwecooff", "eco switch off", "ECO Ausschalttemp", "Eco Uitschakeltemp.", "", "", "", "Eco Temp. d'arrêt") + // hybrid heatpump MAKE_PSTR_LIST(hybridStrategy, "hybridstrategy", "hybrid control strategy", "Hybrid Strategie", "Hybride strategie", "Hybrid kontrollstrategi", "strategia sterowania hybrydowego", "hybrid kontrollstrategi", "stratégie contrôle hybride") MAKE_PSTR_LIST(switchOverTemp, "switchovertemp", "outside switchover temperature", "Außentemperatur für Umschaltung", "Schakeltemperatuur buitentemperatuur", "Utomhus Omställningstemperatur", "zewnętrzna temperatura przełączania", "utendørstemp styring", "basculement par température extérieure")