From 1e92ae05c03fd37bbe9dbd8ac8afede20b8e08b2 Mon Sep 17 00:00:00 2001 From: MichaelDvP Date: Sat, 5 Nov 2022 15:58:55 +0100 Subject: [PATCH] add GB135 second burner stage --- src/device_library.h | 2 +- src/devices/boiler.cpp | 10 ++++++++-- src/devices/boiler.h | 8 ++++++++ 3 files changed, 17 insertions(+), 3 deletions(-) diff --git a/src/device_library.h b/src/device_library.h index 356353f78..3a68a6c3a 100644 --- a/src/device_library.h +++ b/src/device_library.h @@ -25,7 +25,7 @@ // Boilers - 0x08 { 64, DeviceType::BOILER, "BK13/BK15/Smartline/GB1x2", DeviceFlags::EMS_DEVICE_FLAG_NONE}, -{ 72, DeviceType::BOILER, "GB125/MC10", DeviceFlags::EMS_DEVICE_FLAG_EMS}, +{ 72, DeviceType::BOILER, "GB125/GB135/MC10", DeviceFlags::EMS_DEVICE_FLAG_EMS}, { 81, DeviceType::BOILER, "Cascade CM10", DeviceFlags::EMS_DEVICE_FLAG_NONE}, { 84, DeviceType::BOILER, "Logamax Plus GB022", DeviceFlags::EMS_DEVICE_FLAG_NONE}, { 95, DeviceType::BOILER, "Condens 2500/Logamax/Logomatic/Cerapur Top/Greenstar/Generic HT3", DeviceFlags::EMS_DEVICE_FLAG_HT3}, diff --git a/src/devices/boiler.cpp b/src/devices/boiler.cpp index 95f21ca84..63edd3326 100644 --- a/src/devices/boiler.cpp +++ b/src/devices/boiler.cpp @@ -274,6 +274,10 @@ Boiler::Boiler(uint8_t device_type, int8_t device_id, uint8_t product_id, const DeviceValueTAG::TAG_DEVICE_DATA, &burnMaxPower_, DeviceValueType::UINT, FL_(burnMaxPower), DeviceValueUOM::PERCENT, MAKE_CF_CB(set_max_power), 0, 254); register_device_value(DeviceValueTAG::TAG_DEVICE_DATA, &boilHystOn_, DeviceValueType::INT, FL_(boilHystOn), DeviceValueUOM::DEGREES_R, MAKE_CF_CB(set_hyst_on)); register_device_value(DeviceValueTAG::TAG_DEVICE_DATA, &boilHystOff_, DeviceValueType::INT, FL_(boilHystOff), DeviceValueUOM::DEGREES_R, MAKE_CF_CB(set_hyst_off)); + register_device_value( + DeviceValueTAG::TAG_DEVICE_DATA, &boil2HystOn_, DeviceValueType::INT, FL_(boil2HystOn), DeviceValueUOM::DEGREES_R, MAKE_CF_CB(set_hyst2_on), -20, 0); + register_device_value( + DeviceValueTAG::TAG_DEVICE_DATA, &boil2HystOff_, DeviceValueType::INT, FL_(boil2HystOff), DeviceValueUOM::DEGREES_R, MAKE_CF_CB(set_hyst2_off), 0, 20); register_device_value(DeviceValueTAG::TAG_DEVICE_DATA, &setFlowTemp_, DeviceValueType::UINT, FL_(setFlowTemp), DeviceValueUOM::DEGREES); register_device_value(DeviceValueTAG::TAG_DEVICE_DATA, &setBurnPow_, DeviceValueType::UINT, FL_(setBurnPow), DeviceValueUOM::PERCENT); register_device_value(DeviceValueTAG::TAG_DEVICE_DATA, &curBurnPow_, DeviceValueType::UINT, FL_(curBurnPow), DeviceValueUOM::PERCENT); @@ -829,6 +833,8 @@ void Boiler::process_UBAParameters(std::shared_ptr telegram) { has_update(telegram, pumpDelay_, 8); has_update(telegram, pumpModMax_, 9); has_update(telegram, pumpModMin_, 10); + has_update(telegram, boil2HystOff_, 12); + has_update(telegram, boil2HystOn_, 13); } /* @@ -1981,7 +1987,7 @@ bool Boiler::set_hyst_on(const char * value, const int8_t id) { if (is_fetch(EMS_TYPE_UBAParametersPlus)) { write_command(EMS_TYPE_UBAParametersPlus, 9, v, EMS_TYPE_UBAParametersPlus); } else { - write_command(EMS_TYPE_UBAParameters, 5, v, EMS_TYPE_UBAParameters); + write_command(EMS_TYPE_UBAParameters, id == 2 ? 13 : 5, v, EMS_TYPE_UBAParameters); } return true; @@ -1997,7 +2003,7 @@ bool Boiler::set_hyst_off(const char * value, const int8_t id) { if (is_fetch(EMS_TYPE_UBAParametersPlus)) { write_command(EMS_TYPE_UBAParametersPlus, 8, v, EMS_TYPE_UBAParametersPlus); } else { - write_command(EMS_TYPE_UBAParameters, 4, v, EMS_TYPE_UBAParameters); + write_command(EMS_TYPE_UBAParameters, id == 2 ? 12 : 4, v, EMS_TYPE_UBAParameters); } return true; diff --git a/src/devices/boiler.h b/src/devices/boiler.h index baf1ad383..3078b68a2 100644 --- a/src/devices/boiler.h +++ b/src/devices/boiler.h @@ -124,6 +124,8 @@ class Boiler : public EMSdevice { uint8_t burnMaxPower_; int8_t boilHystOn_; int8_t boilHystOff_; + int8_t boil2HystOn_; + int8_t boil2HystOff_; uint8_t setFlowTemp_; // boiler setpoint temp uint8_t curBurnPow_; // Burner current power % uint8_t setBurnPow_; // max output power in % @@ -319,6 +321,12 @@ class Boiler : public EMSdevice { bool set_max_pump(const char * value, const int8_t id); bool set_hyst_on(const char * value, const int8_t id); bool set_hyst_off(const char * value, const int8_t id); + bool set_hyst2_on(const char * value, const int8_t id) { + return set_hyst_on(value, 2); + } + bool set_hyst2_off(const char * value, const int8_t id) { + return set_hyst_off(value, 2); + } bool set_burn_period(const char * value, const int8_t id); bool set_pump_delay(const char * value, const int8_t id); bool set_reset(const char * value, const int8_t id);