mirror of
https://github.com/emsesp/EMS-ESP32.git
synced 2025-12-06 07:49:52 +03:00
wwcomfort on ems+
This commit is contained in:
@@ -846,6 +846,7 @@ Boiler::Boiler(uint8_t device_type, int8_t device_id, uint8_t product_id, const
|
|||||||
FL_(wwComfort),
|
FL_(wwComfort),
|
||||||
DeviceValueUOM::NONE,
|
DeviceValueUOM::NONE,
|
||||||
MAKE_CF_CB(set_ww_mode));
|
MAKE_CF_CB(set_ww_mode));
|
||||||
|
wwComfort2_ = EMS_VALUE_UINT_NOTSET; // read separately, but published as wwComfort1_
|
||||||
register_device_value(DeviceValueTAG::TAG_BOILER_DATA_WW,
|
register_device_value(DeviceValueTAG::TAG_BOILER_DATA_WW,
|
||||||
&wwComfort1_,
|
&wwComfort1_,
|
||||||
DeviceValueType::ENUM,
|
DeviceValueType::ENUM,
|
||||||
@@ -1468,9 +1469,12 @@ void Boiler::process_UBAParameterWWPlus(std::shared_ptr<const Telegram> telegram
|
|||||||
has_update(telegram, wwMaxTemp_, 20);
|
has_update(telegram, wwMaxTemp_, 20);
|
||||||
has_update(telegram, wwChargeOptimization_, 25);
|
has_update(telegram, wwChargeOptimization_, 25);
|
||||||
has_update(telegram, wwSelTempEcoplus_, 27);
|
has_update(telegram, wwSelTempEcoplus_, 27);
|
||||||
|
has_update(telegram, wwComfort2_, 26);
|
||||||
|
|
||||||
uint8_t wwComfort1 = EMS_VALUE_UINT_NOTSET;
|
uint8_t wwComfort1 = EMS_VALUE_UINT_NOTSET;
|
||||||
if (telegram->read_value(wwComfort1, 13)) {
|
if (Helpers::hasValue(wwComfort2_)) {
|
||||||
|
has_update(wwComfort1_, wwComfort1);
|
||||||
|
} else if (telegram->read_value(wwComfort1, 13)) {
|
||||||
if (wwComfort1 == 0) {
|
if (wwComfort1 == 0) {
|
||||||
wwComfort1 = 0; // High_Comfort
|
wwComfort1 = 0; // High_Comfort
|
||||||
} else if (wwComfort1 == 0xD8) {
|
} else if (wwComfort1 == 0xD8) {
|
||||||
@@ -2417,10 +2421,15 @@ bool Boiler::set_ww_mode(const char * value, const int8_t id) {
|
|||||||
uint8_t set;
|
uint8_t set;
|
||||||
uint8_t comfort[] = {0x00, 0xD8, 0xEC}; // heat, eco, intelligent
|
uint8_t comfort[] = {0x00, 0xD8, 0xEC}; // heat, eco, intelligent
|
||||||
|
|
||||||
if (is_received(EMS_TYPE_UBAParameterWWPlus)) {
|
if (Helpers::hasValue(wwComfort2_)) {
|
||||||
|
if (Helpers::value2enum(value, set, FL_(enum_comfort1))) {
|
||||||
|
write_command(EMS_TYPE_UBAParameterWWPlus, 26, set, EMS_TYPE_UBAParameterWWPlus);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
} else if (is_received(EMS_TYPE_UBAParameterWWPlus)) {
|
||||||
if (Helpers::value2enum(value, set, FL_(enum_comfort1))) {
|
if (Helpers::value2enum(value, set, FL_(enum_comfort1))) {
|
||||||
write_command(EMS_TYPE_UBAParameterWWPlus, 13, comfort[set], EMS_TYPE_UBAParameterWWPlus);
|
write_command(EMS_TYPE_UBAParameterWWPlus, 13, comfort[set], EMS_TYPE_UBAParameterWWPlus);
|
||||||
write_command(0x05, 70, set == 0 ? 0xAA : 0x55); //
|
write_command(0x05, 70, set == 1 ? 0xAA : 0x55); //
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@@ -60,7 +60,8 @@ class Boiler : public EMSdevice {
|
|||||||
uint8_t wwSelTempEcoplus_; // DHW ECO+ temperature
|
uint8_t wwSelTempEcoplus_; // DHW ECO+ temperature
|
||||||
uint8_t wwType_; // 0-off, 1-flow, 2-flowbuffer, 3-buffer, 4-layered buffer
|
uint8_t wwType_; // 0-off, 1-flow, 2-flowbuffer, 3-buffer, 4-layered buffer
|
||||||
uint8_t wwComfort_; // WW comfort mode
|
uint8_t wwComfort_; // WW comfort mode
|
||||||
uint8_t wwComfort1_; // WW comfort mode RC310
|
uint8_t wwComfort1_; // WW comfort mode RC310, 0xEA offset 13
|
||||||
|
uint8_t wwComfort2_; // WW comfort mode emsplus 0xEA, offset 26
|
||||||
uint8_t wwCircPump_; // DHW circulation pump available
|
uint8_t wwCircPump_; // DHW circulation pump available
|
||||||
uint8_t wwChargeType_; // DHW charge type (pump or 3-way-valve)
|
uint8_t wwChargeType_; // DHW charge type (pump or 3-way-valve)
|
||||||
uint8_t wwChargeOptimization_; // DHW charge optimization
|
uint8_t wwChargeOptimization_; // DHW charge optimization
|
||||||
|
|||||||
@@ -88,7 +88,7 @@ Heatpump::Heatpump(uint8_t device_type, uint8_t device_id, uint8_t product_id, c
|
|||||||
register_device_value(DeviceValueTAG::TAG_DEVICE_DATA,
|
register_device_value(DeviceValueTAG::TAG_DEVICE_DATA,
|
||||||
&hybridDHW_,
|
&hybridDHW_,
|
||||||
DeviceValueType::ENUM,
|
DeviceValueType::ENUM,
|
||||||
FL_(enum_comfort1),
|
FL_(enum_comfort2),
|
||||||
FL_(hybridDHW),
|
FL_(hybridDHW),
|
||||||
DeviceValueUOM::NONE,
|
DeviceValueUOM::NONE,
|
||||||
MAKE_CF_CB(set_hybridDHW));
|
MAKE_CF_CB(set_hybridDHW));
|
||||||
@@ -332,7 +332,7 @@ bool Heatpump::set_lowNoiseStop(const char * value, const int8_t id) {
|
|||||||
}
|
}
|
||||||
bool Heatpump::set_hybridDHW(const char * value, const int8_t id) {
|
bool Heatpump::set_hybridDHW(const char * value, const int8_t id) {
|
||||||
uint8_t v;
|
uint8_t v;
|
||||||
if (!Helpers::value2enum(value, v, FL_(enum_comfort1))) {
|
if (!Helpers::value2enum(value, v, FL_(enum_comfort2))) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
write_command(0x998, 1, v, 0x998);
|
write_command(0x998, 1, v, 0x998);
|
||||||
|
|||||||
@@ -279,8 +279,8 @@ MAKE_ENUM(enum_charge, FL_(chargepump), FL_(3wayvalve))
|
|||||||
MAKE_ENUM(enum_freq, FL_(off), FL_(1x3min), FL_(2x3min), FL_(3x3min), FL_(4x3min), FL_(5x3min), FL_(6x3min), FL_(continuous))
|
MAKE_ENUM(enum_freq, FL_(off), FL_(1x3min), FL_(2x3min), FL_(3x3min), FL_(4x3min), FL_(5x3min), FL_(6x3min), FL_(continuous))
|
||||||
MAKE_ENUM(enum_off_time_date_manual, FL_(off), FL_(time), FL_(date), FL_(manual))
|
MAKE_ENUM(enum_off_time_date_manual, FL_(off), FL_(time), FL_(date), FL_(manual))
|
||||||
MAKE_ENUM(enum_comfort, FL_(hot), FL_(eco), FL_(intelligent))
|
MAKE_ENUM(enum_comfort, FL_(hot), FL_(eco), FL_(intelligent))
|
||||||
// MAKE_ENUM(enum_comfort1, FL_(high_comfort), FL_(eco))
|
MAKE_ENUM(enum_comfort1, FL_(high_comfort), FL_(eco))
|
||||||
MAKE_ENUM(enum_comfort1, FL_(eco), FL_(high_comfort))
|
MAKE_ENUM(enum_comfort2, FL_(eco), FL_(high_comfort))
|
||||||
MAKE_ENUM(enum_flow, FL_(off), FL_(flow), FL_(bufferedflow), FL_(buffer), FL_(layeredbuffer))
|
MAKE_ENUM(enum_flow, FL_(off), FL_(flow), FL_(bufferedflow), FL_(buffer), FL_(layeredbuffer))
|
||||||
MAKE_ENUM(enum_reset, FL_(dash), FL_(maintenance), FL_(error))
|
MAKE_ENUM(enum_reset, FL_(dash), FL_(maintenance), FL_(error))
|
||||||
MAKE_ENUM(enum_maxHeat, FL_(0kW), FL_(2kW), FL_(3kW), FL_(4kW), FL_(6kW), FL_(9kW))
|
MAKE_ENUM(enum_maxHeat, FL_(0kW), FL_(2kW), FL_(3kW), FL_(4kW), FL_(6kW), FL_(9kW))
|
||||||
|
|||||||
Reference in New Issue
Block a user