From c4f6f01f7e2b662bf5c2396d63bbdc7f44bdefeb Mon Sep 17 00:00:00 2001 From: MichaelDvP Date: Wed, 5 Mar 2025 14:20:40 +0100 Subject: [PATCH] fix #2446, pc0Flow for all boilers, fix #2411 --- src/devices/boiler.cpp | 32 +++++++++++++++++++++----------- src/devices/boiler.h | 2 +- 2 files changed, 22 insertions(+), 12 deletions(-) diff --git a/src/devices/boiler.cpp b/src/devices/boiler.cpp index 0ae937379..0929c3f52 100644 --- a/src/devices/boiler.cpp +++ b/src/devices/boiler.cpp @@ -335,6 +335,11 @@ Boiler::Boiler(uint8_t device_type, int8_t device_id, uint8_t product_id, const MAKE_CF_CB(set_emergency_temp), 15, 70); + register_device_value(DeviceValueTAG::TAG_DEVICE_DATA, &pc0Flow_, DeviceValueType::INT16, FL_(pc0Flow), DeviceValueUOM::LH); + register_device_value(DeviceValueTAG::TAG_DEVICE_DATA, &pc1Flow_, DeviceValueType::INT16, FL_(pc1Flow), DeviceValueUOM::LH); + register_device_value(DeviceValueTAG::TAG_DEVICE_DATA, &pc1On_, DeviceValueType::BOOL, FL_(pc1On), DeviceValueUOM::NONE); + register_device_value(DeviceValueTAG::TAG_DEVICE_DATA, &pc1Rate_, DeviceValueType::UINT8, FL_(pc1Rate), DeviceValueUOM::PERCENT); + /* * Hybrid heatpump with telegram 0xBB is readable and writeable in boiler and thermostat * thermostat always overwrites settings in boiler @@ -541,7 +546,7 @@ Boiler::Boiler(uint8_t device_type, int8_t device_id, uint8_t product_id, const register_device_value(DeviceValueTAG::TAG_DHW1, &nrgSuppWw_, DeviceValueType::UINT24, FL_(nrgSuppWw), DeviceValueUOM::KWH); register_device_value(DeviceValueTAG::TAG_DEVICE_DATA, &nrgSuppCooling_, DeviceValueType::UINT24, FL_(nrgSuppCooling), DeviceValueUOM::KWH); register_device_value(DeviceValueTAG::TAG_DEVICE_DATA, &nrgSuppPool_, DeviceValueType::UINT24, FL_(nrgSuppPool), DeviceValueUOM::KWH); - register_device_value(DeviceValueTAG::TAG_DEVICE_DATA, &hpPower_, DeviceValueType::UINT8, DeviceValueNumOp::DV_NUMOP_DIV10, FL_(hpPower), DeviceValueUOM::KW); + register_device_value(DeviceValueTAG::TAG_DEVICE_DATA, &hpPower_, DeviceValueType::UINT16, DeviceValueNumOp::DV_NUMOP_DIV10, FL_(hpPower), DeviceValueUOM::KW); register_device_value(DeviceValueTAG::TAG_DEVICE_DATA, &hpMaxPower_, DeviceValueType::UINT8, @@ -684,7 +689,12 @@ Boiler::Boiler(uint8_t device_type, int8_t device_id, uint8_t product_id, const FL_(auxHeaterOff), DeviceValueUOM::NONE, MAKE_CF_CB(set_additionalHeater)); - register_device_value(DeviceValueTAG::TAG_DEVICE_DATA, &auxHeaterStatus_, DeviceValueType::BOOL, FL_(auxHeaterStatus), DeviceValueUOM::NONE); + register_device_value(DeviceValueTAG::TAG_DEVICE_DATA, + &auxHeaterStatus_, + DeviceValueType::ENUM, + FL_(enum_hpactivity), + FL_(auxHeaterStatus), + DeviceValueUOM::NONE); register_device_value(DeviceValueTAG::TAG_DEVICE_DATA, &auxHeaterLevel_, DeviceValueType::UINT8, FL_(auxHeaterLevel), DeviceValueUOM::PERCENT); register_device_value(DeviceValueTAG::TAG_DEVICE_DATA, &auxHeaterDelay_, @@ -856,10 +866,6 @@ Boiler::Boiler(uint8_t device_type, int8_t device_id, uint8_t product_id, const FL_(hpPowerLimit), DeviceValueUOM::W, MAKE_CF_CB(set_hpPowerLimit)); - register_device_value(DeviceValueTAG::TAG_DEVICE_DATA, &pc0Flow_, DeviceValueType::INT16, FL_(pc0Flow), DeviceValueUOM::LH); - register_device_value(DeviceValueTAG::TAG_DEVICE_DATA, &pc1Flow_, DeviceValueType::INT16, FL_(pc1Flow), DeviceValueUOM::LH); - register_device_value(DeviceValueTAG::TAG_DEVICE_DATA, &pc1On_, DeviceValueType::BOOL, FL_(pc1On), DeviceValueUOM::NONE); - register_device_value(DeviceValueTAG::TAG_DEVICE_DATA, &pc1Rate_, DeviceValueType::UINT8, FL_(pc1Rate), DeviceValueUOM::PERCENT); // heatpump DHW settings register_device_value(DeviceValueTAG::TAG_DHW1, @@ -1660,13 +1666,17 @@ void Boiler::process_HpPower(std::shared_ptr telegram) { // has_bitupdate(telegram, heating_, 0, 0); // heating on? https://github.com/emsesp/EMS-ESP32/discussions/1898 has_bitupdate(telegram, hpSwitchValve_, 0, 4); + has_bitupdate(telegram, elHeatStep1_, 3, 0); + has_bitupdate(telegram, elHeatStep2_, 3, 1); + has_bitupdate(telegram, elHeatStep3_, 3, 2); has_bitupdate(telegram, hpCompOn_, 3, 4); has_bitupdate(telegram, hpEA0_, 3, 6); has_update(telegram, hpCircSpd_, 4); has_update(telegram, hpBrinePumpSpd_, 5); has_update(telegram, auxHeaterLevel_, 6); has_update(telegram, hpActivity_, 7); - has_update(telegram, hpPower_, 11); + has_update(telegram, auxHeaterStatus_, 8); + has_update(telegram, hpPower_, 10); has_update(telegram, hpCompSpd_, 17); has_bitupdate(telegram, hpInput[0].state, 1, 4); @@ -1967,7 +1977,7 @@ void Boiler::process_HpSilentMode(std::shared_ptr telegram) { // Boiler(0x08) -B-> All(0x00), ?(0x0488), data: 8E 00 00 00 00 00 01 03 void Boiler::process_HpValve(std::shared_ptr telegram) { - has_bitupdate(telegram, auxHeaterStatus_, 0, 2); + // has_bitupdate(telegram, auxHeaterStatus_, 0, 2); has_update(telegram, auxHeatMixValve_, 7); has_update(telegram, pc1Rate_, 13); // percent } @@ -2028,9 +2038,9 @@ void Boiler::process_HpSettings3(std::shared_ptr telegram) { has_update(telegram, primePump_, 4); has_update(telegram, primePumpMod_, 5); // has_update(telegram, hp3wayValve_, 6); // read in 48D - has_update(telegram, elHeatStep1_, 7); - has_update(telegram, elHeatStep2_, 8); - has_update(telegram, elHeatStep3_, 9); + // has_update(telegram, elHeatStep1_, 7); + // has_update(telegram, elHeatStep2_, 8); + // has_update(telegram, elHeatStep3_, 9); } // boiler(0x08) -W-> Me(0x0B), ?(0x04AE), data: 00 00 BD C4 00 00 5B 6A 00 00 00 24 00 00 62 59 00 00 00 00 00 00 00 00 diff --git a/src/devices/boiler.h b/src/devices/boiler.h index 88b23f582..e8783aa0d 100644 --- a/src/devices/boiler.h +++ b/src/devices/boiler.h @@ -194,7 +194,7 @@ class Boiler : public EMSdevice { uint16_t maintenanceTime_; // heatpump - uint8_t hpPower_; + uint16_t hpPower_; uint8_t hpCompOn_; uint8_t hpBrinePumpSpd_; uint8_t hpCompSpd_;