From f6238cd6ab21c5cdf928d5367c57483701d246f5 Mon Sep 17 00:00:00 2001 From: MichaelDvP Date: Thu, 12 Jan 2023 17:17:04 +0100 Subject: [PATCH] rename auxmaxtemp->auxmaxlimit, add auxlimitstart --- src/devices/boiler.cpp | 22 ++++++++++++++++------ src/devices/boiler.h | 11 +++++++++-- src/locale_translations.h | 3 ++- 3 files changed, 27 insertions(+), 9 deletions(-) diff --git a/src/devices/boiler.cpp b/src/devices/boiler.cpp index e3d05d7c8..ccc25e9c8 100644 --- a/src/devices/boiler.cpp +++ b/src/devices/boiler.cpp @@ -477,12 +477,21 @@ Boiler::Boiler(uint8_t device_type, int8_t device_id, uint8_t product_id, const 10, 1000); register_device_value(DeviceValueTAG::TAG_DEVICE_DATA, - &auxMaxTemp_, + &auxMaxLimit_, DeviceValueType::UINT, DeviceValueNumOp::DV_NUMOP_DIV10, - FL_(auxMaxTemp), + FL_(auxMaxLimit), DeviceValueUOM::K, - MAKE_CF_CB(set_auxMaxTemp), + MAKE_CF_CB(set_auxMaxLimit), + 0, + 10); + register_device_value(DeviceValueTAG::TAG_DEVICE_DATA, + &auxLimitStart_, + DeviceValueType::UINT, + DeviceValueNumOp::DV_NUMOP_DIV10, + FL_(auxLimitStart), + DeviceValueUOM::K, + MAKE_CF_CB(set_auxLimitStart), 0, 10); register_device_value(DeviceValueTAG::TAG_DEVICE_DATA, @@ -1488,7 +1497,8 @@ void Boiler::process_HpAdditionalHeater(std::shared_ptr telegram has_update(telegram, auxHeaterOff_, 2); has_update(telegram, auxHeatMode_, 4); // eco/comfort has_update(telegram, tempParMode_, 5); - has_update(telegram, auxMaxTemp_, 14); // is * 10 + has_update(telegram, auxMaxLimit_, 14); // is * 10 + has_update(telegram, auxLimitStart_, 15); // is * 10 has_update(telegram, auxHeaterDelay_, 16); // is / 10 } @@ -2374,10 +2384,10 @@ bool Boiler::set_auxHeatMode(const char * value, const int8_t id) { return false; } -bool Boiler::set_auxMaxTemp(const char * value, const int8_t id) { +bool Boiler::set_auxLimit(const char * value, const int8_t id) { float v; if (Helpers::value2float(value, v)) { - write_command(0x491, 14, (uint8_t)(v * 10), 0x491); + write_command(0x491, id, (uint8_t)(v * 10), 0x491); return true; } return false; diff --git a/src/devices/boiler.h b/src/devices/boiler.h index 30d0b6bb7..cc8faaada 100644 --- a/src/devices/boiler.h +++ b/src/devices/boiler.h @@ -215,7 +215,8 @@ class Boiler : public EMSdevice { uint8_t pvCooling_; uint8_t manDefrost_; uint8_t auxHeatMode_; - uint8_t auxMaxTemp_; + uint8_t auxMaxLimit_; + uint8_t auxLimitStart_; uint8_t auxHeaterOnly_; uint8_t auxHeaterOff_; uint8_t auxHeaterStatus_; @@ -379,11 +380,17 @@ class Boiler : public EMSdevice { bool set_additionalHeaterDelay(const char * value, const int8_t id); bool set_tempParMode(const char * value, const int8_t id); bool set_auxHeatMode(const char * value, const int8_t id); - bool set_auxMaxTemp(const char * value, const int8_t id); bool set_manDefrost(const char * value, const int8_t id); bool set_pvCooling(const char * value, const int8_t id); bool set_hpCircPumpWw(const char * value, const int8_t id); + bool set_auxLimit(const char * value, const int8_t id); + inline bool set_auxMaxLimit(const char * value, const int8_t id) { + return set_auxLimit(value, 14); + } + inline bool set_auxLimitStart(const char * value, const int8_t id) { + return set_auxLimit(value, 15); + } bool set_hpHyst(const char * value, const int8_t id); inline bool set_hpHystHeat(const char * value, const int8_t id) { return set_hpHyst(value, 37); diff --git a/src/locale_translations.h b/src/locale_translations.h index 55e837690..0dd52e379 100644 --- a/src/locale_translations.h +++ b/src/locale_translations.h @@ -403,7 +403,8 @@ MAKE_PSTR_LIST(wwEcoOffTemp, "wwecooff", "eco switch off", "ECO Ausschalttemp", MAKE_PSTR_LIST(wwEcoPlusOffTemp, "wwecoplusoff", "eco+ switch off", "ECO+ Ausschalttemp", "Eco+ Uitschakeltemp.", "Eko+ avstängningstemp.", "temperatura wyłączania w trybie eko+", "", "Eco+ Temp. d'arrêt") // TODO translate MAKE_PSTR_LIST(auxHeatMode, "auxheatrmode", "aux heater mode", "Modus Zusatzheizer", "", "", "", "", "") // TODO translate -MAKE_PSTR_LIST(auxMaxTemp, "auxmaxtemp", "aux heater max temperature", "Zusatzheizer Maximaltemp.", "", "", "", "", "") // TODO translate +MAKE_PSTR_LIST(auxMaxLimit, "auxmaxlimit", "aux heater max limit", "Zusatzheizer max. Grenze", "", "", "", "", "") // TODO translate +MAKE_PSTR_LIST(auxLimitStart, "auxlimitstart", "aux heater limit start", "Zusatzheizer Grenze Start", "", "", "", "", "") // TODO translate MAKE_PSTR_LIST(manDefrost, "mandefrost", "manual defrost", "Manuelle Enteisung", "", "", "", "", "") // TODO translate MAKE_PSTR_LIST(pvCooling, "pvcooling", "Cooling only with PV", "Kühlen nur mit PV", "", "", "", "", "") // TODO translate MAKE_PSTR_LIST(hpCircPumpWw, "hpcircpumpww", "circulation pump available during dhw", "", "", "", "", "", "") // TODO translate