mirror of
https://github.com/emsesp/EMS-ESP32.git
synced 2025-12-10 09:49:54 +03:00
Merge remote-tracking branch 'origin/dev' into ft_https
This commit is contained in:
@@ -99,7 +99,7 @@ Boiler::Boiler(uint8_t device_type, int8_t device_id, uint8_t product_id, const
|
||||
register_device_value(TAG_BOILER_DATA, &heatingActive_, DeviceValueType::BOOL, nullptr, FL_(heatingActive), DeviceValueUOM::NONE);
|
||||
register_device_value(TAG_BOILER_DATA, &tapwaterActive_, DeviceValueType::BOOL, nullptr, FL_(tapwaterActive), DeviceValueUOM::NONE);
|
||||
register_device_value(TAG_BOILER_DATA, &selFlowTemp_, DeviceValueType::UINT, nullptr, FL_(selFlowTemp), DeviceValueUOM::DEGREES, MAKE_CF_CB(set_flow_temp));
|
||||
register_device_value(TAG_BOILER_DATA, &selBurnPow_, DeviceValueType::UINT, nullptr, FL_(selBurnPow), DeviceValueUOM::PERCENT);
|
||||
register_device_value(TAG_BOILER_DATA, &selBurnPow_, DeviceValueType::UINT, nullptr, FL_(selBurnPow), DeviceValueUOM::PERCENT, MAKE_CF_CB(set_burn_power));
|
||||
register_device_value(TAG_BOILER_DATA, &heatingPumpMod_, DeviceValueType::UINT, nullptr, FL_(heatingPumpMod), DeviceValueUOM::PERCENT);
|
||||
register_device_value(TAG_BOILER_DATA, &heatingPump2Mod_, DeviceValueType::UINT, nullptr, FL_(heatingPump2Mod), DeviceValueUOM::PERCENT);
|
||||
register_device_value(TAG_BOILER_DATA, &outdoorTemp_, DeviceValueType::SHORT, FL_(div10), FL_(outdoorTemp), DeviceValueUOM::DEGREES);
|
||||
@@ -635,10 +635,10 @@ void Boiler::process_HpOutdoor(std::shared_ptr<const Telegram> telegram) {
|
||||
has_update(telegram->read_value(hpTr4_, 18));
|
||||
has_update(telegram->read_value(hpTr5_, 20));
|
||||
has_update(telegram->read_value(hpTr6_, 0));
|
||||
has_update(telegram->read_value(hpTr7_, 31));
|
||||
has_update(telegram->read_value(hpTr7_, 30));
|
||||
has_update(telegram->read_value(hpTl2_, 12));
|
||||
has_update(telegram->read_value(hpPl1_, 27));
|
||||
has_update(telegram->read_value(hpPh1_, 29));
|
||||
has_update(telegram->read_value(hpPl1_, 26));
|
||||
has_update(telegram->read_value(hpPh1_, 28));
|
||||
}
|
||||
|
||||
// 0x2A - MC110Status
|
||||
@@ -800,6 +800,20 @@ bool Boiler::set_flow_temp(const char * value, const int8_t id) {
|
||||
return true;
|
||||
}
|
||||
|
||||
// set selected burner power
|
||||
bool Boiler::set_burn_power(const char * value, const int8_t id) {
|
||||
int v = 0;
|
||||
if (!Helpers::value2number(value, v)) {
|
||||
LOG_WARNING(F("Set burner max. power: Invalid value"));
|
||||
return false;
|
||||
}
|
||||
|
||||
LOG_INFO(F("Setting burner max. power to %d %"), v);
|
||||
write_command(EMS_TYPE_UBASetPoints, 1, v, EMS_TYPE_UBASetPoints);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
// Set the warm water flow temperature offset 0x33
|
||||
bool Boiler::set_wWFlowTempOffset(const char * value, const int8_t id) {
|
||||
int v = 0;
|
||||
|
||||
@@ -207,6 +207,7 @@ class Boiler : public EMSdevice {
|
||||
bool set_warmwater_maxpower(const char * value, const int8_t id);
|
||||
bool set_wWFlowTempOffset(const char * value, const int8_t id);
|
||||
bool set_flow_temp(const char * value, const int8_t id);
|
||||
bool set_burn_power(const char * value, const int8_t id);
|
||||
bool set_heating_activated(const char * value, const int8_t id);
|
||||
bool set_heating_temp(const char * value, const int8_t id);
|
||||
bool set_min_power(const char * value, const int8_t id);
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -101,6 +101,7 @@ class Thermostat : public EMSdevice {
|
||||
ROOMINFLUENCE,
|
||||
TEMPAUTO,
|
||||
NOREDUCE,
|
||||
ON,
|
||||
UNKNOWN
|
||||
|
||||
};
|
||||
@@ -276,6 +277,7 @@ class Thermostat : public EMSdevice {
|
||||
void process_RC20Set_2(std::shared_ptr<const Telegram> telegram);
|
||||
void process_RC10Monitor(std::shared_ptr<const Telegram> telegram);
|
||||
void process_RC10Set(std::shared_ptr<const Telegram> telegram);
|
||||
void process_CRFMonitor(std::shared_ptr<const Telegram> telegram);
|
||||
void process_RC300Monitor(std::shared_ptr<const Telegram> telegram);
|
||||
void process_RC300Set(std::shared_ptr<const Telegram> telegram);
|
||||
void process_RC300Summer(std::shared_ptr<const Telegram> telegram);
|
||||
|
||||
Reference in New Issue
Block a user