Merge branch 'dev2x' into dev2

This commit is contained in:
MichaelDvP
2023-11-13 13:57:05 +01:00
4 changed files with 30 additions and 16 deletions

View File

@@ -118,6 +118,7 @@ Boiler::Boiler(uint8_t device_type, int8_t device_id, uint8_t product_id, const
FL_(setReturnTemp),
DeviceValueUOM::DEGREES,
MAKE_CF_CB(set_returnTemp));
register_device_value(DeviceValueTAG::TAG_DEVICE_DATA, &burnGas_, DeviceValueType::BOOL, FL_(heatingOn), DeviceValueUOM::NONE);
}
/*
@@ -219,6 +220,16 @@ Boiler::Boiler(uint8_t device_type, int8_t device_id, uint8_t product_id, const
0,
120);
register_device_value(DeviceValueTAG::TAG_DEVICE_DATA, &absBurnPow_, DeviceValueType::UINT, FL_(absBurnPow), DeviceValueUOM::PERCENT);
register_device_value(DeviceValueTAG::TAG_DEVICE_DATA,
&heatblock_,
DeviceValueType::USHORT,
DeviceValueNumOp::DV_NUMOP_DIV10,
FL_(heatblock),
DeviceValueUOM::DEGREES);
register_device_value(
DeviceValueTAG::TAG_DEVICE_DATA, &boilHystOn_, DeviceValueType::INT, FL_(boilHystOn), DeviceValueUOM::DEGREES_R, MAKE_CF_CB(set_hyst_on), -20, 0);
register_device_value(
DeviceValueTAG::TAG_DEVICE_DATA, &boilHystOff_, DeviceValueType::INT, FL_(boilHystOff), DeviceValueUOM::DEGREES_R, MAKE_CF_CB(set_hyst_off), 0, 20);
}
register_device_value(DeviceValueTAG::TAG_DEVICE_DATA,
&heatingActivated_,
@@ -236,16 +247,6 @@ Boiler::Boiler(uint8_t device_type, int8_t device_id, uint8_t product_id, const
register_device_value(
DeviceValueTAG::TAG_DEVICE_DATA, &pumpDelay_, DeviceValueType::UINT, FL_(pumpDelay), DeviceValueUOM::MINUTES, MAKE_CF_CB(set_pump_delay), 0, 60);
register_device_value(DeviceValueTAG::TAG_DEVICE_DATA, &setFlowTemp_, DeviceValueType::UINT, FL_(setFlowTemp), DeviceValueUOM::DEGREES);
register_device_value(DeviceValueTAG::TAG_DEVICE_DATA,
&heatblock_,
DeviceValueType::USHORT,
DeviceValueNumOp::DV_NUMOP_DIV10,
FL_(heatblock),
DeviceValueUOM::DEGREES);
register_device_value(
DeviceValueTAG::TAG_DEVICE_DATA, &boilHystOn_, DeviceValueType::INT, FL_(boilHystOn), DeviceValueUOM::DEGREES_R, MAKE_CF_CB(set_hyst_on), -20, 0);
register_device_value(
DeviceValueTAG::TAG_DEVICE_DATA, &boilHystOff_, DeviceValueType::INT, FL_(boilHystOff), DeviceValueUOM::DEGREES_R, MAKE_CF_CB(set_hyst_off), 0, 20);
register_device_value(DeviceValueTAG::TAG_DEVICE_DATA, &setBurnPow_, DeviceValueType::UINT, FL_(setBurnPow), DeviceValueUOM::PERCENT);
register_device_value(
DeviceValueTAG::TAG_DEVICE_DATA, &selBurnPow_, DeviceValueType::UINT, FL_(selBurnPow), DeviceValueUOM::PERCENT, MAKE_CF_CB(set_burn_power), 0, 254);

View File

@@ -1021,9 +1021,14 @@ void Thermostat::process_RC300Set(std::shared_ptr<const Telegram> telegram) {
// has_update(telegram, hc->selTemp, 8, 1); // single byte conversion, value is * 2 - auto?
// has_update(telegram, hc->selTemp, 10, 1); // single byte conversion, value is * 2 - manual
// check why mode is both in the Monitor and Set for the RC300. It'll be read twice!
// has_update(telegram, hc->mode, 0); // Auto = xFF, Manual = x00 eg. 10 00 FF 08 01 B9 FF
has_update(telegram, hc->mode, 21); // 0-off, 1-manual, 2-auto
telegram->read_value(hc->mode_new, 21); // 0-off, 1-manual, 2-auto
if (Helpers::hasValue(hc->mode_new)) {
has_update(hc->mode, hc->mode_new);
} else {
uint8_t mode = EMS_VALUE_UINT_NOTSET;
telegram->read_value(mode, 0);
has_update(hc->mode, mode == 0xFF ? 2 : 1);
}
has_update(telegram, hc->daytemp, 2); // is * 2
has_update(telegram, hc->nighttemp, 4); // is * 2
@@ -2553,7 +2558,12 @@ bool Thermostat::set_mode_n(const uint8_t mode, const uint8_t hc_num) {
break;
case EMSdevice::EMS_DEVICE_FLAG_RC300:
case EMSdevice::EMS_DEVICE_FLAG_RC100:
offset = EMS_OFFSET_RCPLUSSet_mode;
if (Helpers::hasValue(hc->mode_new)) {
offset = EMS_OFFSET_RCPLUSSet_mode_new;
} else {
offset = EMS_OFFSET_RCPLUSSet_mode;
set_mode_value = set_mode_value == 2 ? 0xFF : 0;
}
break;
case EMSdevice::EMS_DEVICE_FLAG_JUNKERS:
if (has_flags(EMS_DEVICE_FLAG_JUNKERS_OLD)) {
@@ -3594,7 +3604,7 @@ void Thermostat::register_device_values() {
&wwDisinfectHour_,
DeviceValueType::UINT,
DeviceValueNumOp::DV_NUMOP_MUL15,
FL_(wwDisinfectTime),
FL_(wwDisinfectHour),
DeviceValueUOM::MINUTES,
MAKE_CF_CB(set_wwDisinfectHour),
0,

View File

@@ -41,6 +41,7 @@ class Thermostat : public EMSdevice {
uint8_t tempautotemp;
int8_t remoteseltemp;
uint8_t mode;
uint8_t mode_new;
uint8_t modetype;
uint8_t summermode;
uint8_t holidaymode;
@@ -317,7 +318,8 @@ class Thermostat : public EMSdevice {
static constexpr uint8_t EMS_OFFSET_RCPLUSStatusMessage_setpoint = 3; // setpoint temp
static constexpr uint8_t EMS_OFFSET_RCPLUSStatusMessage_curr = 0; // current temp
static constexpr uint8_t EMS_OFFSET_RCPLUSStatusMessage_currsetpoint = 6; // target setpoint temp
static constexpr uint8_t EMS_OFFSET_RCPLUSSet_mode = 21; // operation mode(0-off, 1-manual, 2-auto)
static constexpr uint8_t EMS_OFFSET_RCPLUSSet_mode = 0; // operation mode(Auto=0xFF, Manual=0x00)
static constexpr uint8_t EMS_OFFSET_RCPLUSSet_mode_new = 21; // operation mode(0-off, 1-manual, 2-auto)
static constexpr uint8_t EMS_OFFSET_RCPLUSSet_temp_comfort3 = 1; // comfort3 level
static constexpr uint8_t EMS_OFFSET_RCPLUSSet_temp_comfort2 = 2; // comfort2 level
static constexpr uint8_t EMS_OFFSET_RCPLUSSet_temp_comfort1 = 3; // comfort1 level