mirror of
https://github.com/emsesp/EMS-ESP32.git
synced 2025-12-06 15:59:52 +03:00
Merge remote-tracking branch 'origin/dev' into ft_https
This commit is contained in:
@@ -111,6 +111,13 @@ Thermostat::Thermostat(uint8_t device_type, uint8_t device_id, uint8_t product_i
|
||||
set_typeids = {};
|
||||
register_telegram_type(monitor_typeids[0], F("EasyMonitor"), true, MAKE_PF_CB(process_EasyMonitor));
|
||||
|
||||
} else if (model == EMSdevice::EMS_DEVICE_FLAG_CRF) {
|
||||
monitor_typeids = {0x02A5, 0x02A6, 0x02A7, 0x02A8};
|
||||
set_typeids = {};
|
||||
for (uint8_t i = 0; i < monitor_typeids.size(); i++) {
|
||||
register_telegram_type(monitor_typeids[i], F("CRFMonitor"), true, MAKE_PF_CB(process_CRFMonitor));
|
||||
}
|
||||
|
||||
// RC300/RC100
|
||||
} else if ((model == EMSdevice::EMS_DEVICE_FLAG_RC300) || (model == EMSdevice::EMS_DEVICE_FLAG_RC100)) {
|
||||
monitor_typeids = {0x02A5, 0x02A6, 0x02A7, 0x02A8};
|
||||
@@ -292,7 +299,8 @@ std::shared_ptr<Thermostat::HeatingCircuit> Thermostat::heating_circuit(std::sha
|
||||
|
||||
// not found, search device-id types for remote thermostats
|
||||
if (telegram->src >= 0x18 && telegram->src <= 0x1B) {
|
||||
hc_num = telegram->src - 0x17;
|
||||
hc_num = telegram->src - 0x17;
|
||||
toggle_ = true;
|
||||
}
|
||||
|
||||
// still didn't recognize it, ignore it
|
||||
@@ -469,6 +477,12 @@ uint8_t Thermostat::HeatingCircuit::get_mode() const {
|
||||
} else if (mode == 2) {
|
||||
return HeatingCircuit::Mode::AUTO;
|
||||
}
|
||||
} else if (model == EMSdevice::EMS_DEVICE_FLAG_CRF) {
|
||||
if (mode == 0) {
|
||||
return HeatingCircuit::Mode::AUTO;
|
||||
} else if (mode == 1) {
|
||||
return HeatingCircuit::Mode::OFF;
|
||||
}
|
||||
} else if ((model == EMSdevice::EMS_DEVICE_FLAG_RC300) || (model == EMSdevice::EMS_DEVICE_FLAG_RC100)) {
|
||||
if (mode == 0) {
|
||||
return HeatingCircuit::Mode::MANUAL;
|
||||
@@ -515,6 +529,12 @@ uint8_t Thermostat::HeatingCircuit::get_mode_type() const {
|
||||
} else if (modetype == 1) {
|
||||
return HeatingCircuit::Mode::DAY;
|
||||
}
|
||||
} else if (model == EMS_DEVICE_FLAG_CRF) {
|
||||
if (modetype == 0) {
|
||||
return HeatingCircuit::Mode::OFF;
|
||||
} else if (modetype == 1) {
|
||||
return HeatingCircuit::Mode::ON;
|
||||
}
|
||||
} else if (model == EMS_DEVICE_FLAG_RC300) {
|
||||
if (modetype == 0) {
|
||||
return HeatingCircuit::Mode::ECO;
|
||||
@@ -751,6 +771,19 @@ void Thermostat::process_JunkersMonitor(std::shared_ptr<const Telegram> telegram
|
||||
has_update(telegram->read_value(hc->mode, 1)); // 1 = manual, 2 = auto
|
||||
}
|
||||
|
||||
// type 0x02A5 - data from Worchester CRF200
|
||||
void Thermostat::process_CRFMonitor(std::shared_ptr<const Telegram> telegram) {
|
||||
std::shared_ptr<Thermostat::HeatingCircuit> hc = heating_circuit(telegram);
|
||||
if (hc == nullptr) {
|
||||
return;
|
||||
}
|
||||
has_update(telegram->read_value(hc->curr_roomTemp, 0)); // is * 10
|
||||
has_update(telegram->read_bitvalue(hc->modetype, 2, 0));
|
||||
has_update(telegram->read_bitvalue(hc->mode, 2, 4)); // bit 4, mode (auto=0 or off=1)
|
||||
has_update(telegram->read_value(hc->setpoint_roomTemp, 6, 1)); // is * 2, force as single byte
|
||||
has_update(telegram->read_value(hc->targetflowtemp, 4));
|
||||
}
|
||||
|
||||
// type 0x02A5 - data from the Nefit RC1010/3000 thermostat (0x18) and RC300/310s on 0x10
|
||||
void Thermostat::process_RC300Monitor(std::shared_ptr<const Telegram> telegram) {
|
||||
std::shared_ptr<Thermostat::HeatingCircuit> hc = heating_circuit(telegram);
|
||||
@@ -2267,6 +2300,11 @@ void Thermostat::register_device_values_hc(std::shared_ptr<Thermostat::HeatingCi
|
||||
register_device_value(tag, &hc->program, DeviceValueType::UINT, nullptr, FL_(program), DeviceValueUOM::NONE, MAKE_CF_CB(set_program));
|
||||
register_device_value(tag, &hc->tempautotemp, DeviceValueType::UINT, FL_(div2), FL_(tempautotemp), DeviceValueUOM::DEGREES, MAKE_CF_CB(set_tempautotemp));
|
||||
break;
|
||||
case EMS_DEVICE_FLAG_CRF:
|
||||
register_device_value(tag, &hc->mode, DeviceValueType::ENUM, FL_(enum_mode5), FL_(mode), DeviceValueUOM::NONE);
|
||||
register_device_value(tag, &hc->modetype, DeviceValueType::ENUM, FL_(enum_modetype5), FL_(modetype), DeviceValueUOM::NONE);
|
||||
register_device_value(tag, &hc->targetflowtemp, DeviceValueType::UINT, nullptr, FL_(targetflowtemp), DeviceValueUOM::DEGREES);
|
||||
break;
|
||||
case EMS_DEVICE_FLAG_RC20:
|
||||
register_device_value(tag, &hc->mode, DeviceValueType::ENUM, FL_(enum_mode2), FL_(mode), DeviceValueUOM::NONE, MAKE_CF_CB(set_mode));
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user