From e3354b2a497126e8643a63fa5b63e28d7279309a Mon Sep 17 00:00:00 2001 From: MichaelDvP Date: Tue, 19 Nov 2024 08:20:01 +0100 Subject: [PATCH] add start counters #2220 --- src/devices/heatpump.cpp | 9 +++++++++ src/devices/heatpump.h | 3 +++ 2 files changed, 12 insertions(+) diff --git a/src/devices/heatpump.cpp b/src/devices/heatpump.cpp index 0026882aa..66ff3d6ac 100644 --- a/src/devices/heatpump.cpp +++ b/src/devices/heatpump.cpp @@ -35,6 +35,7 @@ Heatpump::Heatpump(uint8_t device_type, uint8_t device_id, uint8_t product_id, c register_telegram_type(0x99C, "HPComp", false, MAKE_PF_CB(process_HPComp)); register_telegram_type(0x4AE, "HPEnergy", true, MAKE_PF_CB(process_HpEnergy)); register_telegram_type(0x4AF, "HPMeters", true, MAKE_PF_CB(process_HpMeters)); + register_telegram_type(0x99A, "HPStarts", false, MAKE_PF_CB(process_HpStarts)); // device values register_device_value(DeviceValueTAG::TAG_DEVICE_DATA, &airHumidity_, DeviceValueType::UINT8, FL_(airHumidity), DeviceValueUOM::PERCENT); @@ -177,6 +178,8 @@ Heatpump::Heatpump(uint8_t device_type, uint8_t device_id, uint8_t product_id, c FL_(meterHeat), DeviceValueUOM::KWH); register_device_value(DeviceValueTAG::TAG_DHW1, &meterWw_, DeviceValueType::UINT24, DeviceValueNumOp::DV_NUMOP_DIV100, FL_(meterWw), DeviceValueUOM::KWH); + register_device_value(DeviceValueTAG::TAG_DEVICE_DATA, &heatStartsHp_, DeviceValueType::UINT24, FL_(heatingStarts), DeviceValueUOM::NONE); + register_device_value(DeviceValueTAG::TAG_DHW1, &wwStartsHp_, DeviceValueType::UINT24, FL_(wwStartsHp), DeviceValueUOM::NONE); } /* @@ -271,6 +274,12 @@ void Heatpump::process_HpMeters(std::shared_ptr telegram) { has_update(telegram, meterWw_, 32); } +// Broadcast (0x099A), data: 05 00 00 00 00 00 00 37 00 00 1D 00 00 52 00 00 13 01 00 01 7C +void Heatpump::process_HpStarts(std::shared_ptr telegram) { + has_update(telegram, heatStartsHp_, 14, 3); + has_update(telegram, wwStartsHp_, 11,3 ); +} + /* * Broadcast (0x099A), data: 05 00 00 00 00 00 00 37 00 00 1D 00 00 52 00 00 13 01 00 01 7C * Broadcast (0x099B), data: 80 00 80 00 01 3C 01 38 80 00 80 00 80 00 01 37 00 00 00 00 64 diff --git a/src/devices/heatpump.h b/src/devices/heatpump.h index e53c0a78d..526d51bb4 100644 --- a/src/devices/heatpump.h +++ b/src/devices/heatpump.h @@ -76,6 +76,8 @@ class Heatpump : public EMSdevice { uint32_t meterHeat_; uint32_t meterWw_; + uint32_t heatStartsHp_; + uint32_t wwStartsHp_; void process_HPMonitor1(std::shared_ptr telegram); void process_HPMonitor2(std::shared_ptr telegram); @@ -86,6 +88,7 @@ class Heatpump : public EMSdevice { void process_HPComp(std::shared_ptr telegram); void process_HpEnergy(std::shared_ptr telegram); void process_HpMeters(std::shared_ptr telegram); + void process_HpStarts(std::shared_ptr telegram); bool set_controlStrategy(const char * value, const int8_t id); bool set_lowNoiseMode(const char * value, const int8_t id);