mirror of
https://github.com/emsesp/EMS-ESP32.git
synced 2026-04-02 15:06:32 +03:00
minflowtemp taken from offset 13 or 8
This commit is contained in:
@@ -1101,6 +1101,8 @@ void Thermostat::process_JunkersWW(std::shared_ptr<const Telegram> telegram) {
|
||||
void Thermostat::process_JunkersDisp(std::shared_ptr<const Telegram> telegram) {
|
||||
has_enumupdate(telegram, ibaMainDisplay_, 1, 1);
|
||||
has_update(telegram, ibaLanguage_, 3);
|
||||
has_update(telegram, ibaMinExtTemperature_, 16);
|
||||
has_update(telegram, ibaBuildingType_, 17); // percent /10
|
||||
}
|
||||
|
||||
// type 0x02A5 - data from Worchester CRF200
|
||||
@@ -1255,10 +1257,10 @@ void Thermostat::process_RC300Summer(std::shared_ptr<const Telegram> telegram) {
|
||||
}
|
||||
|
||||
// minflowtemp could be in 8 or 13, see #2879 and #2969
|
||||
// for testing!
|
||||
uint8_t minflowtemp = 0;
|
||||
if (telegram->read_value(minflowtemp, 13) && minflowtemp > 0 && model() == EMSdevice::EMS_DEVICE_FLAG_BC400 && hc->heatingtype != 3) {
|
||||
has_update(hc->minflowtemp, minflowtemp);
|
||||
// for testing! Check for non-zero value in 13 and 8, only if we have both in telegram
|
||||
has_update(telegram, hc->minflowtemp2, 13);
|
||||
if (hc->minflowtemp2 > 0 && hc->minflowtemp2 != EMS_VALUE_UINT8_NOTSET) {
|
||||
has_update(hc->minflowtemp, hc->minflowtemp2);
|
||||
} else {
|
||||
has_update(telegram, hc->minflowtemp, 8);
|
||||
}
|
||||
@@ -2032,6 +2034,8 @@ bool Thermostat::set_minexttemp(const char * value, const int8_t id) {
|
||||
write_command(0x241, 10, mt, 0x241);
|
||||
} else if (isRC300()) {
|
||||
write_command(0x240, 10, mt, 0x240);
|
||||
} else if (model() == EMSdevice::EMS_DEVICE_FLAG_JUNKERS) {
|
||||
write_command(0x110, 16, mt, 0x110);
|
||||
} else {
|
||||
write_command(EMS_TYPE_IBASettings, 5, mt, EMS_TYPE_IBASettings);
|
||||
}
|
||||
@@ -2188,6 +2192,14 @@ bool Thermostat::set_remotehum(const char * value, const int8_t id) {
|
||||
|
||||
// 0xA5/0xA7 - Set the building settings
|
||||
bool Thermostat::set_building(const char * value, const int8_t id) {
|
||||
if (model() == EMSdevice::EMS_DEVICE_FLAG_JUNKERS) {
|
||||
int i;
|
||||
if (Helpers::value2number(value, i, 0, 100)) {
|
||||
write_command(0x110, 17, i / 10, 0x110);
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
uint8_t bd;
|
||||
if (!Helpers::value2enum(value, bd, FL_(enum_ibaBuildingType))) {
|
||||
return false;
|
||||
@@ -2333,6 +2345,7 @@ bool Thermostat::set_control(const char * value, const int8_t id) {
|
||||
// 1-FB10, 2-FB100
|
||||
if (model() == EMSdevice::EMS_DEVICE_FLAG_JUNKERS && !has_flags(EMSdevice::EMS_DEVICE_FLAG_JUNKERS_OLD)) {
|
||||
if (Helpers::value2enum(value, ctrl, FL_(enum_j_control))) {
|
||||
hc->control = ctrl; // set in advance, dont wait for verify
|
||||
write_command(set_typeids[hc->hc()], 1, ctrl);
|
||||
return true;
|
||||
}
|
||||
@@ -2381,6 +2394,7 @@ bool Thermostat::set_control(const char * value, const int8_t id) {
|
||||
}
|
||||
} else if (Helpers::value2enum(value, ctrl, FL_(enum_control))) {
|
||||
write_command(set_typeids[hc->hc()], EMS_OFFSET_RC35Set_control, ctrl);
|
||||
hc->control = ctrl; // set in advance, dont wait for verify
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -4084,7 +4098,7 @@ bool Thermostat::set_temperature(const float temperature, const uint8_t mode, co
|
||||
case HeatingCircuit::Mode::MINFLOW:
|
||||
set_typeid = summer_typeids[hc->hc()];
|
||||
validate_typeid = set_typeid;
|
||||
offset = hc->heatingtype != 3 && model == EMS_DEVICE_FLAG_BC400 ? 13 : 8;
|
||||
offset = (hc->minflowtemp2 > 0 && hc->minflowtemp2 != EMS_VALUE_UINT8_NOTSET) ? 13 : 8;
|
||||
factor = 1;
|
||||
break;
|
||||
case HeatingCircuit::Mode::MAXFLOW:
|
||||
@@ -4737,6 +4751,19 @@ void Thermostat::register_device_values() {
|
||||
DeviceValueUOM::NONE,
|
||||
MAKE_CF_CB(set_language));
|
||||
}
|
||||
register_device_value(DeviceValueTAG::TAG_DEVICE_DATA,
|
||||
&ibaBuildingType_,
|
||||
DeviceValueType::UINT8,
|
||||
DeviceValueNumOp::DV_NUMOP_MUL10,
|
||||
FL_(ibaBuildingType),
|
||||
DeviceValueUOM::PERCENT,
|
||||
MAKE_CF_CB(set_building));
|
||||
register_device_value(DeviceValueTAG::TAG_DEVICE_DATA,
|
||||
&ibaMinExtTemperature_,
|
||||
DeviceValueType::INT8,
|
||||
FL_(ibaMinExtTemperature),
|
||||
DeviceValueUOM::DEGREES,
|
||||
MAKE_CF_CB(set_minexttemp));
|
||||
register_device_value(DeviceValueTAG::TAG_DEVICE_DATA,
|
||||
&hybridStrategy_,
|
||||
DeviceValueType::ENUM,
|
||||
|
||||
@@ -65,6 +65,7 @@ class Thermostat : public EMSdevice {
|
||||
int16_t curroominfl;
|
||||
uint8_t flowtempoffset;
|
||||
uint8_t minflowtemp;
|
||||
uint8_t minflowtemp2 = EMS_VALUE_UINT8_NOTSET;
|
||||
uint8_t maxflowtemp;
|
||||
uint8_t reducemode;
|
||||
uint8_t nofrostmode;
|
||||
|
||||
Reference in New Issue
Block a user