diff --git a/src/devices/boiler.cpp b/src/devices/boiler.cpp index 8882d9bab..eca1119c6 100644 --- a/src/devices/boiler.cpp +++ b/src/devices/boiler.cpp @@ -185,12 +185,16 @@ Boiler::Boiler(uint8_t device_type, int8_t device_id, uint8_t product_id, const register_device_value(TAG_BOILER_DATA, &nrgSuppCooling_, DeviceValueType::ULONG, nullptr, FL_(nrgSuppCooling), DeviceValueUOM::KWH); register_device_value(TAG_BOILER_DATA, &nrgSuppPool_, DeviceValueType::ULONG, nullptr, FL_(nrgSuppPool), DeviceValueUOM::KWH); register_device_value(TAG_BOILER_DATA, &hpPower_, DeviceValueType::UINT, FL_(div10), FL_(hpPower), DeviceValueUOM::KW); - register_device_value(TAG_BOILER_DATA, &hpCompRunning_, DeviceValueType::BOOL, nullptr, FL_(hpCompRunning), DeviceValueUOM::BOOLEAN); + register_device_value(TAG_BOILER_DATA, &hpCompOn_, DeviceValueType::BOOL, nullptr, FL_(hpCompOn), DeviceValueUOM::BOOLEAN); + register_device_value(TAG_BOILER_DATA, &hpActivity_, DeviceValueType::ENUM, FL_(enum_hpactivity), FL_(hpActivity), DeviceValueUOM::LIST); + register_device_value(TAG_BOILER_DATA, &hpHeatingOn_, DeviceValueType::BOOL, nullptr, FL_(hpHeatingOn), DeviceValueUOM::BOOLEAN); + register_device_value(TAG_BOILER_DATA, &hpCoolingOn_, DeviceValueType::BOOL, nullptr, FL_(hpCoolingOn), DeviceValueUOM::BOOLEAN); + register_device_value(TAG_BOILER_DATA, &hpWwOn_, DeviceValueType::BOOL, nullptr, FL_(hpWwOn), DeviceValueUOM::BOOLEAN); + register_device_value(TAG_BOILER_DATA, &hpPoolOn_, DeviceValueType::BOOL, nullptr, FL_(hpPoolOn), DeviceValueUOM::BOOLEAN); register_device_value(TAG_BOILER_DATA, &hpBrinePumpSpd_, DeviceValueType::UINT, nullptr, FL_(hpBrinePumpSpd), DeviceValueUOM::PERCENT); register_device_value(TAG_BOILER_DATA, &hpSwitchValve_, DeviceValueType::BOOL, nullptr, FL_(hpSwitchValve), DeviceValueUOM::BOOLEAN); register_device_value(TAG_BOILER_DATA, &hpCompSpd_, DeviceValueType::UINT, nullptr, FL_(hpCompSpd), DeviceValueUOM::PERCENT); register_device_value(TAG_BOILER_DATA, &hpCircSpd_, DeviceValueType::UINT, nullptr, FL_(hpCircSpd), DeviceValueUOM::PERCENT); - register_device_value(TAG_BOILER_DATA, &hpActivity_, DeviceValueType::ENUM, FL_(enum_hpactivity), FL_(hpActivity), DeviceValueUOM::LIST); register_device_value(TAG_BOILER_DATA, &hpBrineIn_, DeviceValueType::SHORT, FL_(div10), FL_(hpBrineIn), DeviceValueUOM::DEGREES); register_device_value(TAG_BOILER_DATA, &hpBrineOut_, DeviceValueType::SHORT, FL_(div10), FL_(hpBrineOut), DeviceValueUOM::DEGREES); register_device_value(TAG_BOILER_DATA, &hpSuctionGas_, DeviceValueType::SHORT, FL_(div10), FL_(hpSuctionGas), DeviceValueUOM::DEGREES); @@ -675,13 +679,37 @@ void Boiler::process_UBAEnergySupplied(std::shared_ptr telegram) void Boiler::process_HpPower(std::shared_ptr telegram) { has_update(telegram->read_value(hpPower_, 11)); - has_update(telegram->read_bitvalue(hpCompRunning_, 3, 4)); + has_update(telegram->read_bitvalue(hpCompOn_, 3, 4)); has_update(telegram->read_value(hpBrinePumpSpd_, 5)); has_update(telegram->read_value(hpCompSpd_, 17)); has_update(telegram->read_value(hpCircSpd_, 4)); has_update(telegram->read_bitvalue(hpSwitchValve_, 0, 4)); has_update(telegram->read_value(hpActivity_, 7)); + hpHeatingOn_ = 0; + hpCoolingOn_ = 0; + hpWwOn_ = 0; + hpPoolOn_ = 0; + + switch (hpActivity_) { + case 1: { + hpHeatingOn_ = 0xFF; + break; + } + case 2: { + hpCoolingOn_ = 0xFF; + break; + } + case 3: { + hpWwOn_ = 0xFF;; + break; + } + case 4: { + hpPoolOn_ = 0xFF;; + break; + } + } + } // Heatpump outdoor unit - type 0x48F diff --git a/src/devices/boiler.h b/src/devices/boiler.h index 7b49965d9..bff6be3d6 100644 --- a/src/devices/boiler.h +++ b/src/devices/boiler.h @@ -167,7 +167,7 @@ class Boiler : public EMSdevice { // heatpump uint8_t hpPower_; - uint8_t hpCompRunning_; + uint8_t hpCompOn_; uint8_t hpBrinePumpSpd_; uint8_t hpCompSpd_; uint8_t hpCircSpd_; @@ -177,6 +177,11 @@ class Boiler : public EMSdevice { uint16_t hpHotGas_; uint8_t hpSwitchValve_; uint8_t hpActivity_; + uint8_t hpHeatingOn_; + uint8_t hpCoolingOn_; + uint8_t hpWwOn_; + uint8_t hpPoolOn_; + uint8_t hpHeatingOn; int16_t hpTc0_; int16_t hpTc1_; int16_t hpTc3_; diff --git a/src/devices/mixer.cpp b/src/devices/mixer.cpp index 2376ed511..ca92090ad 100644 --- a/src/devices/mixer.cpp +++ b/src/devices/mixer.cpp @@ -26,15 +26,15 @@ uuid::log::Logger Mixer::logger_{F_(mixer), uuid::log::Facility::CONSOLE}; Mixer::Mixer(uint8_t device_type, uint8_t device_id, uint8_t product_id, const std::string & version, const std::string & name, uint8_t flags, uint8_t brand) : EMSdevice(device_type, device_id, product_id, version, name, flags, brand) { - + LOG_DEBUG(F("Adding new Mixer with device ID 0x%02X"), device_id); if (flags == EMSdevice::EMS_DEVICE_FLAG_MP) { type_ = Type::MP; register_telegram_type(0x5BA, F("HpPoolStatus"), true, MAKE_PF_CB(process_HpPoolStatus)); - register_device_value(TAG_MP, &poolTemp_, DeviceValueType::SHORT, FL_(div10), FL_(poolTemp), DeviceValueUOM::DEGREES); - register_device_value(TAG_MP, &poolShuntStatus_, DeviceValueType::ENUM, FL_(enum_shunt), FL_(poolShuntStatus), DeviceValueUOM::LIST); - register_device_value(TAG_MP, &poolShunt_, DeviceValueType::UINT, nullptr, FL_(poolShunt), DeviceValueUOM::PERCENT); + register_device_value(TAG_NONE, &poolTemp_, DeviceValueType::SHORT, FL_(div10), FL_(poolTemp), DeviceValueUOM::DEGREES); + register_device_value(TAG_NONE, &poolShuntStatus_, DeviceValueType::ENUM, FL_(enum_shunt), FL_(poolShuntStatus), DeviceValueUOM::LIST); + register_device_value(TAG_NONE, &poolShunt_, DeviceValueType::UINT, nullptr, FL_(poolShunt), DeviceValueUOM::PERCENT); } else { diff --git a/src/emsdevice.h b/src/emsdevice.h index e574bd7e7..640d0797c 100644 --- a/src/emsdevice.h +++ b/src/emsdevice.h @@ -116,8 +116,7 @@ enum DeviceValueTAG : uint8_t { TAG_HS13, TAG_HS14, TAG_HS15, - TAG_HS16, - TAG_MP + TAG_HS16 }; diff --git a/src/emsesp.h b/src/emsesp.h index ee673660e..978281ef8 100644 --- a/src/emsesp.h +++ b/src/emsesp.h @@ -62,7 +62,7 @@ #define EMSESP_JSON_SIZE_MEDIUM_DYN 1024 // for large json docs, using DynamicJsonDocument #define EMSESP_JSON_SIZE_LARGE_DYN 2048 // for very large json docs, using DynamicJsonDocument #define EMSESP_JSON_SIZE_XLARGE_DYN 4096 // for very very large json docs, using DynamicJsonDocument -#define EMSESP_JSON_SIZE_XXLARGE_DYN 8192 // for extra very very large json docs, using DynamicJsonDocument +#define EMSESP_JSON_SIZE_XXLARGE_DYN 10240 // for extra very very large json docs, using DynamicJsonDocument // helpers for callback functions #define MAKE_PF_CB(__f) [&](std::shared_ptr t) { __f(t); } // for Process Function callbacks to EMSDevice::process_function_p diff --git a/src/locale_EN.h b/src/locale_EN.h index d2f50e432..ad18f37de 100644 --- a/src/locale_EN.h +++ b/src/locale_EN.h @@ -445,7 +445,11 @@ MAKE_PSTR_LIST(auxElecHeatNrgConsWW, F("auxelecheatnrgconsww"), F("auxiliary ele MAKE_PSTR_LIST(auxElecHeatNrgConsPool, F("auxelecheatnrgconspool"), F("auxiliary electrical heater energy consumption pool")) MAKE_PSTR_LIST(hpPower, F("hppower"), F("Compressor power output")) -MAKE_PSTR_LIST(hpCompRunning, F("hpcomprunning"), F("Compressor active")) +MAKE_PSTR_LIST(hpCompOn, F("hpcompon"), F("HP Compressor")) +MAKE_PSTR_LIST(hpHeatingOn, F("hpheatingon"), F("HP Heating")) +MAKE_PSTR_LIST(hpCoolingOn, F("hpcoolingon"), F("HP Cooling")) +MAKE_PSTR_LIST(hpWwOn, F("hpwwon"), F("HP Warm water")) +MAKE_PSTR_LIST(hpPoolOn, F("hppoolon"), F("HP Pool")) MAKE_PSTR_LIST(hpBrinePumpSpd, F("hpbrinepumpspd"), F("Brine Pump Speed")) MAKE_PSTR_LIST(hpCompSpd, F("hpcompspd"), F("Compressor Speed")) MAKE_PSTR_LIST(hpCircSpd, F("hpcircspd"), F("Circulation pump Speed"))