merge PR #923 - fixes and the tested heatpump/heatsource entities by mvdp

This commit is contained in:
Proddy
2023-01-22 17:08:17 +01:00
parent 7f5e3d3b4c
commit bb24da92e4
25 changed files with 456 additions and 118 deletions

View File

@@ -83,6 +83,8 @@ Boiler::Boiler(uint8_t device_type, int8_t device_id, uint8_t product_id, const
register_telegram_type(0x48B, "HPPumps", true, MAKE_PF_CB(process_HpPumps));
register_telegram_type(0x491, "HPAdditionalHeater", true, MAKE_PF_CB(process_HpAdditionalHeater));
register_telegram_type(0x499, "HPDhwSettings", true, MAKE_PF_CB(process_HpDhwSettings));
register_telegram_type(0x49C, "HPSettings2", true, MAKE_PF_CB(process_HpSettings2));
register_telegram_type(0x49D, "HPSettings3", true, MAKE_PF_CB(process_HpSettings3));
}
/*
@@ -103,7 +105,6 @@ Boiler::Boiler(uint8_t device_type, int8_t device_id, uint8_t product_id, const
register_device_value(DeviceValueTAG::TAG_DEVICE_DATA, &tapwaterActive_, DeviceValueType::BOOL, FL_(tapwaterActive), DeviceValueUOM::NONE);
register_device_value(DeviceValueTAG::TAG_DEVICE_DATA, &selFlowTemp_, DeviceValueType::UINT, FL_(selFlowTemp), DeviceValueUOM::DEGREES, MAKE_CF_CB(set_flow_temp));
register_device_value(DeviceValueTAG::TAG_DEVICE_DATA, &heatingPumpMod_, DeviceValueType::UINT, FL_(heatingPumpMod), DeviceValueUOM::PERCENT);
register_device_value(DeviceValueTAG::TAG_DEVICE_DATA, &heatingPump2Mod_, DeviceValueType::UINT, FL_(heatingPump2Mod), DeviceValueUOM::PERCENT);
register_device_value(DeviceValueTAG::TAG_DEVICE_DATA,
&outdoorTemp_,
DeviceValueType::SHORT,
@@ -180,6 +181,7 @@ Boiler::Boiler(uint8_t device_type, int8_t device_id, uint8_t product_id, const
DeviceValueTAG::TAG_DEVICE_DATA, &boil2HystOff_, DeviceValueType::INT, FL_(boil2HystOff), DeviceValueUOM::DEGREES_R, MAKE_CF_CB(set_hyst2_off), 0, 20);
register_device_value(DeviceValueTAG::TAG_DEVICE_DATA, &setFlowTemp_, DeviceValueType::UINT, FL_(setFlowTemp), DeviceValueUOM::DEGREES);
register_device_value(DeviceValueTAG::TAG_DEVICE_DATA, &setBurnPow_, DeviceValueType::UINT, FL_(setBurnPow), DeviceValueUOM::PERCENT);
register_device_value(DeviceValueTAG::TAG_DEVICE_DATA, &absBurnPow_, DeviceValueType::UINT, FL_(absBurnPow), DeviceValueUOM::PERCENT);
register_device_value(
DeviceValueTAG::TAG_DEVICE_DATA, &selBurnPow_, DeviceValueType::UINT, FL_(selBurnPow), DeviceValueUOM::PERCENT, MAKE_CF_CB(set_burn_power), 0, 254);
register_device_value(DeviceValueTAG::TAG_DEVICE_DATA, &curBurnPow_, DeviceValueType::UINT, FL_(curBurnPow), DeviceValueUOM::PERCENT);
@@ -475,12 +477,21 @@ Boiler::Boiler(uint8_t device_type, int8_t device_id, uint8_t product_id, const
10,
1000);
register_device_value(DeviceValueTAG::TAG_DEVICE_DATA,
&auxMaxTemp_,
&auxMaxLimit_,
DeviceValueType::UINT,
DeviceValueNumOp::DV_NUMOP_MUL10,
FL_(auxMaxTemp),
DeviceValueNumOp::DV_NUMOP_DIV10,
FL_(auxMaxLimit),
DeviceValueUOM::K,
MAKE_CF_CB(set_auxMaxTemp),
MAKE_CF_CB(set_auxMaxLimit),
0,
10);
register_device_value(DeviceValueTAG::TAG_DEVICE_DATA,
&auxLimitStart_,
DeviceValueType::UINT,
DeviceValueNumOp::DV_NUMOP_DIV10,
FL_(auxLimitStart),
DeviceValueUOM::K,
MAKE_CF_CB(set_auxLimitStart),
0,
10);
register_device_value(DeviceValueTAG::TAG_DEVICE_DATA,
@@ -524,6 +535,20 @@ Boiler::Boiler(uint8_t device_type, int8_t device_id, uint8_t product_id, const
FL_(silentMode),
DeviceValueUOM::NONE,
MAKE_CF_CB(set_silentMode));
register_device_value(DeviceValueTAG::TAG_DEVICE_DATA,
&silentFrom_,
DeviceValueType::UINT,
DeviceValueNumOp::DV_NUMOP_MUL15,
FL_(silentFrom),
DeviceValueUOM::MINUTES,
MAKE_CF_CB(set_silentFrom));
register_device_value(DeviceValueTAG::TAG_DEVICE_DATA,
&silentTo_,
DeviceValueType::UINT,
DeviceValueNumOp::DV_NUMOP_MUL15,
FL_(silentTo),
DeviceValueUOM::MINUTES,
MAKE_CF_CB(set_silentTo));
register_device_value(DeviceValueTAG::TAG_DEVICE_DATA,
&minTempSilent_,
DeviceValueType::INT,
@@ -555,6 +580,40 @@ Boiler::Boiler(uint8_t device_type, int8_t device_id, uint8_t product_id, const
MAKE_CF_CB(set_tempDiffCool),
3,
10);
register_device_value(DeviceValueTAG::TAG_DEVICE_DATA, &vp_cooling_, DeviceValueType::BOOL, FL_(vp_cooling), DeviceValueUOM::NONE, MAKE_CF_CB(set_vp_cooling));
register_device_value(DeviceValueTAG::TAG_DEVICE_DATA, &heatCable_, DeviceValueType::BOOL, FL_(heatCable), DeviceValueUOM::NONE, MAKE_CF_CB(set_heatCable));
register_device_value(DeviceValueTAG::TAG_DEVICE_DATA, &VC0valve_, DeviceValueType::BOOL, FL_(VC0valve), DeviceValueUOM::NONE, MAKE_CF_CB(set_VC0valve));
register_device_value(DeviceValueTAG::TAG_DEVICE_DATA, &primePump_, DeviceValueType::BOOL, FL_(primePump), DeviceValueUOM::NONE, MAKE_CF_CB(set_primePump));
register_device_value(DeviceValueTAG::TAG_DEVICE_DATA,
&primePumpMod_,
DeviceValueType::UINT,
FL_(primePumpMod),
DeviceValueUOM::PERCENT,
MAKE_CF_CB(set_primePumpMod));
register_device_value(DeviceValueTAG::TAG_DEVICE_DATA,
&hp3wayValve_,
DeviceValueType::BOOL,
FL_(hp3wayValve),
DeviceValueUOM::NONE,
MAKE_CF_CB(set_hp3wayValve));
register_device_value(DeviceValueTAG::TAG_DEVICE_DATA,
&elHeatStep1_,
DeviceValueType::BOOL,
FL_(elHeatStep1),
DeviceValueUOM::NONE,
MAKE_CF_CB(set_elHeatStep1));
register_device_value(DeviceValueTAG::TAG_DEVICE_DATA,
&elHeatStep2_,
DeviceValueType::BOOL,
FL_(elHeatStep2),
DeviceValueUOM::NONE,
MAKE_CF_CB(set_elHeatStep2));
register_device_value(DeviceValueTAG::TAG_DEVICE_DATA,
&elHeatStep3_,
DeviceValueType::BOOL,
FL_(elHeatStep3),
DeviceValueUOM::NONE,
MAKE_CF_CB(set_elHeatStep3));
// heatpump DHW settings
register_device_value(DeviceValueTAG::TAG_BOILER_DATA_WW,
&wwAlternatingOper_,
@@ -901,11 +960,11 @@ void Boiler::process_UBAParameterWW(std::shared_ptr<const Telegram> telegram) {
// has_bitupdate(telegram, wwEquipt_,0,3); // 8=boiler has ww
has_update(telegram, wwActivated_, 1); // 0xFF means on
has_update(telegram, wwSelTemp_, 2);
has_update(telegram, wwHystOn_, 3); // Hyst on (default -5)
has_update(telegram, wwHystOff_, 4); // Hyst off (default -1)
has_update(telegram, wwFlowTempOffset_, 5); // default 40
has_update(telegram, wwCircPump_, 6); // 0xFF means on
has_enumupdate(telegram, wwCircMode_, 7, 1); // 1=1x3min 6=6x3min 7=continuous
has_update(telegram, wwHystOn_, 3); // Hyst on (default -5)
has_update(telegram, wwHystOff_, 4); // Hyst off (default -1)
has_update(telegram, wwFlowTempOffset_, 5); // default 40
has_update(telegram, wwCircPump_, 6); // 0xFF means on
has_update(telegram, wwCircMode_, 7); // 0=off, 1=1x3min 6=6x3min 7=continuous
has_update(telegram, wwDisinfectionTemp_, 8);
has_bitupdate(telegram, wwChargeType_, 10, 0); // 0 = charge pump, 0xff = 3-way valve
@@ -1018,9 +1077,11 @@ void Boiler::process_UBAMonitorSlow(std::shared_ptr<const Telegram> telegram) {
/*
* UBAMonitorSlowPlus2 - type 0xE3
* 88 00 E3 00 04 00 00 00 00 01 00 00 00 00 00 02 22 2B 64 46 01 00 00 61
* https://github.com/Th3M3/buderus_ems-wiki/blob/master/Quelle_08.md
* https://github.com/emsesp/EMS-ESP32/issues/908
*/
void Boiler::process_UBAMonitorSlowPlus2(std::shared_ptr<const Telegram> telegram) {
has_update(telegram, heatingPump2Mod_, 13); // Heat Pump Modulation
has_update(telegram, absBurnPow_, 13); // current burner absolute power (percent of rating plate power)
}
/*
@@ -1078,7 +1139,7 @@ void Boiler::process_UBAParameterWWPlus(std::shared_ptr<const Telegram> telegram
has_update(telegram, wwHystOff_, 8);
has_update(telegram, wwFlowTempOffset_, 9);
has_update(telegram, wwCircPump_, 10); // 0x01 means yes
has_enumupdate(telegram, wwCircMode_, 11, 1); // 1=1x3min... 6=6x3min, 7=continuous
has_update(telegram, wwCircMode_, 11); // 0=off, 1=1x3min... 6=6x3min, 7=continuous
has_update(telegram, wwDisinfectionTemp_, 12); // setting here, status in E9
has_update(telegram, wwAlternatingOper_, 14); // 0x01 means enabled
has_update(telegram, wwSelTempSingle_, 16);
@@ -1105,6 +1166,7 @@ void Boiler::process_UBAMonitorWWPlus(std::shared_ptr<const Telegram> telegram)
has_update(telegram, wwSetTemp_, 0);
has_update(telegram, wwCurTemp_, 1);
has_update(telegram, wwCurTemp2_, 3);
has_update(telegram, wwCurFlow_, 11);
has_update(telegram, wwWorkM_, 14, 3); // force to 3 bytes
has_update(telegram, wwStarts_, 17, 3); // force to 3 bytes
@@ -1391,8 +1453,7 @@ void Boiler::process_UBAErrorMessage2(std::shared_ptr<const Telegram> telegram)
snprintf(&code[3], sizeof(code) - 3, "(%d) %02d.%02d.%04d %02d:%02d - now", codeNo, start_day, start_month, start_year, start_hour, start_min);
}
} else { // no clock, the uptime is stored https://github.com/emsesp/EMS-ESP32/issues/121
uint32_t starttime = 0;
uint32_t endtime = 0;
uint32_t starttime, endtime;
telegram->read_value(starttime, 11, 3);
telegram->read_value(endtime, 16, 3);
snprintf(&code[3], sizeof(code) - 3, "(%d) @uptime %d - %d min", codeNo, starttime, endtime);
@@ -1440,6 +1501,8 @@ void Boiler::process_HpSilentMode(std::shared_ptr<const Telegram> telegram) {
has_update(telegram, hpHystCool_, 35); // is / 5, maybe offset swapped with pool
has_update(telegram, hpHystPool_, 33); // is / 5
has_update(telegram, hpCircPumpWw_, 46);
has_update(telegram, silentFrom_, 52); // in steps of 15 min
has_update(telegram, silentTo_, 53); // in steps of 15 min
}
// Boiler(0x08) -B-> All(0x00), ?(0x0488), data: 8E 00 00 00 00 00 01 03
@@ -1462,7 +1525,8 @@ void Boiler::process_HpAdditionalHeater(std::shared_ptr<const Telegram> telegram
has_update(telegram, auxHeaterOff_, 2);
has_update(telegram, auxHeatMode_, 4); // eco/comfort
has_update(telegram, tempParMode_, 5);
has_update(telegram, auxMaxTemp_, 14); // is *10
has_update(telegram, auxMaxLimit_, 14); // is * 10
has_update(telegram, auxLimitStart_, 15); // is * 10
has_update(telegram, auxHeaterDelay_, 16); // is / 10
}
@@ -1474,6 +1538,25 @@ void Boiler::process_HpDhwSettings(std::shared_ptr<const Telegram> telegram) {
has_update(telegram, wwEcoPlusOffTemp_, 5);
}
// 0x49C:
// Boiler(0x08) -B-> All(0x00), ?(0x049C), data: 00 00 00 00
void Boiler::process_HpSettings2(std::shared_ptr<const Telegram> telegram) {
has_update(telegram, vp_cooling_, 3);
}
// 0x49D
// Boiler(0x08) -B-> All(0x00), ?(0x049D), data: 00 00 00 00 00 00 00 00 00 00 00 00
void Boiler::process_HpSettings3(std::shared_ptr<const Telegram> telegram) {
has_update(telegram, heatCable_, 2);
has_update(telegram, VC0valve_, 3);
has_update(telegram, primePump_, 4);
has_update(telegram, primePumpMod_, 5);
has_update(telegram, hp3wayValve_, 6);
has_update(telegram, elHeatStep1_, 7);
has_update(telegram, elHeatStep2_, 8);
has_update(telegram, elHeatStep3_, 9);
}
/*
* Hybrid heatpump with telegram 0xBB is readable and writeable in boiler and thermostat
* thermostat always overwrites settings in boiler
@@ -1900,13 +1983,15 @@ bool Boiler::set_pump_delay(const char * value, const int8_t id) {
// note some boilers do not have this setting, than it's done by thermostat
// on a RC35 it's by EMSESP::send_write_request(0x37, 0x10, 2, &set, 1, 0); (set is 1,2,3) 1=hot, 2=eco, 3=intelligent
// on a RC310 it's 1=high, 2=eco
// eco key on controller: tele.05, offset 70: 0xAA =eco, 0x55= comfort, https://github.com/emsesp/EMS-ESP32/issues/908
bool Boiler::set_ww_mode(const char * value, const int8_t id) {
uint8_t set;
uint8_t comfort[] = {0x00, 0xD8, 0xEC};
uint8_t comfort[] = {0x00, 0xD8, 0xEC}; // heat, eco, intelligent
if (is_fetch(EMS_TYPE_UBAParameterWWPlus)) {
if (Helpers::value2enum(value, set, FL_(enum_comfort1))) {
write_command(EMS_TYPE_UBAParameterWWPlus, 13, comfort[set], EMS_TYPE_UBAParameterWWPlus);
write_command(0x05, 70, set ? 0xAA : 0x55); //
return true;
}
} else {
@@ -2043,7 +2128,7 @@ bool Boiler::set_ww_circulation_pump(const char * value, const int8_t id) {
}
// Set the mode of circulation, 1x3min, ... 6x3min, continuous
// true = on, false = off
// if 0-off, switching is not possibe, if 1-7 switching to off is not possible
bool Boiler::set_ww_circulation_mode(const char * value, const int8_t id) {
uint8_t v;
if (!Helpers::value2enum(value, v, FL_(enum_freq))) {
@@ -2051,9 +2136,9 @@ bool Boiler::set_ww_circulation_mode(const char * value, const int8_t id) {
}
if (is_fetch(EMS_TYPE_UBAParameterWWPlus)) {
write_command(EMS_TYPE_UBAParameterWWPlus, 11, v + 1, EMS_TYPE_UBAParameterWWPlus);
write_command(EMS_TYPE_UBAParameterWWPlus, 11, v, EMS_TYPE_UBAParameterWWPlus);
} else {
write_command(EMS_TYPE_UBAParameterWW, 7, v + 1, EMS_TYPE_UBAParameterWW);
write_command(EMS_TYPE_UBAParameterWW, 7, v, EMS_TYPE_UBAParameterWW);
}
return true;
@@ -2255,6 +2340,24 @@ bool Boiler::set_silentMode(const char * value, const int8_t id) {
return true;
}
bool Boiler::set_silentFrom(const char * value, const int8_t id) {
int v;
if (!Helpers::value2number(value, v)) {
return false;
}
write_command(0x484, 52, v / 15, 0x484);
return true;
}
bool Boiler::set_silentTo(const char * value, const int8_t id) {
int v;
if (!Helpers::value2number(value, v)) {
return false;
}
write_command(0x484, 53, v / 15, 0x484);
return true;
}
bool Boiler::set_minTempSilent(const char * value, const int8_t id) {
int v;
if (Helpers::value2temperature(value, v)) {
@@ -2311,10 +2414,10 @@ bool Boiler::set_auxHeatMode(const char * value, const int8_t id) {
return false;
}
bool Boiler::set_auxMaxTemp(const char * value, const int8_t id) {
bool Boiler::set_auxLimit(const char * value, const int8_t id) {
float v;
if (Helpers::value2float(value, v)) {
write_command(0x491, 14, (uint8_t)(v * 10), 0x491);
write_command(0x491, id, (uint8_t)(v * 10), 0x491);
return true;
}
return false;
@@ -2376,17 +2479,76 @@ bool Boiler::set_hpCircPumpWw(const char * value, const int8_t id) {
return false;
}
bool Boiler::set_vp_cooling(const char * value, const int8_t id) {
bool v;
if (Helpers::value2bool(value, v)) {
write_command(0x49C, 3, v ? 1 : 0, 0x49C);
return true;
}
return false;
}
bool Boiler::set_heatCable(const char * value, const int8_t id) {
bool v;
if (Helpers::value2bool(value, v)) {
write_command(0x49D, 2, v ? 1 : 0, 0x49D);
return true;
}
return false;
}
bool Boiler::set_VC0valve(const char * value, const int8_t id) {
bool v;
if (Helpers::value2bool(value, v)) {
write_command(0x49D, 3, v ? 1 : 0, 0x49D);
return true;
}
return false;
}
bool Boiler::set_primePump(const char * value, const int8_t id) {
bool v;
if (Helpers::value2bool(value, v)) {
write_command(0x49D, 4, v ? 1 : 0, 0x49D);
return true;
}
return false;
}
bool Boiler::set_primePumpMod(const char * value, const int8_t id) {
int v;
if (Helpers::value2number(value, v)) {
write_command(0x49D, 5, v, 0x49D);
return true;
}
return false;
}
bool Boiler::set_hp3wayValve(const char * value, const int8_t id) {
bool v;
if (Helpers::value2bool(value, v)) {
write_command(0x49D, 6, v ? 1 : 0, 0x49D);
return true;
}
return false;
}
bool Boiler::set_elHeatStep(const char * value, const int8_t id) {
bool v;
if (Helpers::value2bool(value, v)) {
write_command(0x49D, 6 + id, v ? 1 : 0, 0x49D);
return true;
}
return false;
}
// dhw alternating operation, turn on/off; heatpumps only?
bool Boiler::set_wwAlternatingOper(const char * value, const int8_t id) {
bool v;
if (!Helpers::value2bool(value, v)) {
return false;
}
// if (is_fetch(EMS_TYPE_UBAParameterWWPlus)) { // do we need/want this?
write_command(EMS_TYPE_UBAParameterWWPlus, 14, v ? 1 : 0, EMS_TYPE_UBAParameterWWPlus);
// } else {
// write_command(EMS_TYPE_UBAParameterWW, 14, v ? 0xFF : 0, EMS_TYPE_UBAParameterWW);
// }
return true;
}
@@ -2400,4 +2562,4 @@ bool Boiler::set_wwAltOpPrio(const char * value, const int8_t id) {
return false;
}
} // namespace emsesp
} // namespace emsesp

View File

@@ -101,7 +101,7 @@ class Boiler : public EMSdevice {
uint8_t tapwaterActive_; // Hot tap water is on/off
uint8_t selFlowTemp_; // Selected flow temperature
uint8_t selBurnPow_; // Burner max power % (can be > 100%)
uint8_t heatingPump2Mod_; // heatpump modulation from 0xE3 (heatpumps)
uint8_t absBurnPow_; // absolute burner power in % of rating plate
uint8_t heatingPumpMod_; // Pump modulation %
int16_t outdoorTemp_; // Outside temperature
uint16_t curFlowTemp_; // Current flow temperature
@@ -218,13 +218,16 @@ class Boiler : public EMSdevice {
uint8_t pvCooling_;
uint8_t manDefrost_;
uint8_t auxHeatMode_;
uint8_t auxMaxTemp_;
uint8_t auxMaxLimit_;
uint8_t auxLimitStart_;
uint8_t auxHeaterOnly_;
uint8_t auxHeaterOff_;
uint8_t auxHeaterStatus_;
uint16_t auxHeaterDelay_;
uint8_t silentMode_;
int8_t minTempSilent_;
uint8_t silentFrom_;
uint8_t silentTo_;
int8_t tempParMode_;
int8_t auxHeatMixValve_;
uint16_t hpHystHeat_;
@@ -238,6 +241,16 @@ class Boiler : public EMSdevice {
uint8_t wwEcoOffTemp_;
uint8_t wwEcoPlusOffTemp_;
uint8_t vp_cooling_;
uint8_t heatCable_;
uint8_t VC0valve_;
uint8_t primePump_;
uint8_t primePumpMod_;
uint8_t hp3wayValve_;
uint8_t elHeatStep1_;
uint8_t elHeatStep2_;
uint8_t elHeatStep3_;
/*
// Hybrid heatpump with telegram 0xBB is readable and writeable in boiler and thermostat
// thermostat always overwrites settings in boiler
@@ -290,6 +303,8 @@ class Boiler : public EMSdevice {
void process_HpValve(std::shared_ptr<const Telegram> telegram);
void process_HpPumps(std::shared_ptr<const Telegram> telegram);
void process_HpDhwSettings(std::shared_ptr<const Telegram> telegram);
void process_HpSettings2(std::shared_ptr<const Telegram> telegram);
void process_HpSettings3(std::shared_ptr<const Telegram> telegram);
// commands - none of these use the additional id parameter
bool set_ww_mode(const char * value, const int8_t id);
@@ -361,16 +376,25 @@ class Boiler : public EMSdevice {
}
bool set_silentMode(const char * value, const int8_t id);
bool set_minTempSilent(const char * value, const int8_t id);
bool set_silentFrom(const char * value, const int8_t id);
bool set_silentTo(const char * value, const int8_t id);
bool set_additionalHeaterOnly(const char * value, const int8_t id);
bool set_additionalHeater(const char * value, const int8_t id);
bool set_additionalHeaterDelay(const char * value, const int8_t id);
bool set_tempParMode(const char * value, const int8_t id);
bool set_auxHeatMode(const char * value, const int8_t id);
bool set_auxMaxTemp(const char * value, const int8_t id);
bool set_manDefrost(const char * value, const int8_t id);
bool set_pvCooling(const char * value, const int8_t id);
bool set_hpCircPumpWw(const char * value, const int8_t id);
bool set_auxLimit(const char * value, const int8_t id);
inline bool set_auxMaxLimit(const char * value, const int8_t id) {
return set_auxLimit(value, 14);
}
inline bool set_auxLimitStart(const char * value, const int8_t id) {
return set_auxLimit(value, 15);
}
bool set_hpHyst(const char * value, const int8_t id);
inline bool set_hpHystHeat(const char * value, const int8_t id) {
return set_hpHyst(value, 37);
@@ -398,6 +422,22 @@ class Boiler : public EMSdevice {
inline bool set_wwEcoPlusOffTemp(const char * value, const int8_t id) {
return set_wwOffTemp(value, 5);
}
bool set_vp_cooling(const char * value, const int8_t id);
bool set_heatCable(const char * value, const int8_t id);
bool set_VC0valve(const char * value, const int8_t id);
bool set_primePump(const char * value, const int8_t id);
bool set_primePumpMod(const char * value, const int8_t id);
bool set_hp3wayValve(const char * value, const int8_t id);
bool set_elHeatStep(const char * value, const int8_t id);
inline bool set_elHeatStep1(const char * value, const int8_t id) {
return set_elHeatStep(value, 1);
}
inline bool set_elHeatStep2(const char * value, const int8_t id) {
return set_elHeatStep(value, 2);
}
inline bool set_elHeatStep3(const char * value, const int8_t id) {
return set_elHeatStep(value, 3);
}
bool set_wwAlternatingOper(const char * value, const int8_t id);
bool set_wwAltOpPrio(const char * value, const int8_t id);
inline bool set_wwAltOpPrioHeat(const char * value, const int8_t id) {

View File

@@ -74,6 +74,12 @@ Heatsource::Heatsource(uint8_t device_type, uint8_t device_id, uint8_t product_i
DeviceValueNumOp::DV_NUMOP_DIV10,
FL_(aCylBottomTemp),
DeviceValueUOM::DEGREES);
register_device_value(DeviceValueTAG::TAG_AHS1 + ahs,
&flueGasTemp_,
DeviceValueType::SHORT,
DeviceValueNumOp::DV_NUMOP_DIV10,
FL_(flueGasTemp),
DeviceValueUOM::DEGREES);
// register_device_value(DeviceValueTAG::TAG_AHS1 + ahs, &valveByPass_, DeviceValueType::BOOL, nullptr, FL_(valveByPass), DeviceValueUOM::NONE);
register_device_value(DeviceValueTAG::TAG_AHS1 + ahs, &valveBuffer_, DeviceValueType::UINT, FL_(valveBuffer), DeviceValueUOM::PERCENT);
register_device_value(DeviceValueTAG::TAG_AHS1 + ahs, &valveReturn_, DeviceValueType::UINT, FL_(valveReturn), DeviceValueUOM::PERCENT);
@@ -161,6 +167,12 @@ Heatsource::Heatsource(uint8_t device_type, uint8_t device_id, uint8_t product_i
DeviceValueTAG::TAG_AHS1 + ahs, &blockHyst_, DeviceValueType::INT, FL_(blockHyst), DeviceValueUOM::DEGREES_R, MAKE_CF_CB(set_blockHyst), 0, 50);
register_device_value(
DeviceValueTAG::TAG_AHS1 + ahs, &releaseWait_, DeviceValueType::UINT, FL_(releaseWait), DeviceValueUOM::MINUTES, MAKE_CF_CB(set_releaseWait), 0, 240);
register_device_value(DeviceValueTAG::TAG_AHS1 + ahs, &burner_, DeviceValueType::BOOL, FL_(burner), DeviceValueUOM::NONE);
register_device_value(DeviceValueTAG::TAG_AHS1 + ahs, &aPump_, DeviceValueType::BOOL, FL_(aPump), DeviceValueUOM::NONE);
register_device_value(DeviceValueTAG::TAG_AHS1 + ahs, &heatRequest_, DeviceValueType::UINT, FL_(heatRequest), DeviceValueUOM::PERCENT);
register_device_value(DeviceValueTAG::TAG_AHS1 + ahs, &blockRemain_, DeviceValueType::UINT, FL_(blockRemain), DeviceValueUOM::MINUTES);
register_device_value(DeviceValueTAG::TAG_AHS1 + ahs, &blockRemainWw_, DeviceValueType::UINT, FL_(blockRemainWw), DeviceValueUOM::MINUTES);
}
// cascaded heating sources, only some values per individual heatsource (hs)
@@ -214,6 +226,7 @@ void Heatsource::process_UBAMonitorFastPlus(std::shared_ptr<const Telegram> tele
void Heatsource::process_amTempMessage(std::shared_ptr<const Telegram> telegram) {
has_update(telegram, curFlowTemp_, 0); // TB4
has_update(telegram, retTemp_, 2); // TR2
has_update(telegram, flueGasTemp_, 4);
has_update(telegram, aFlowTemp_, 6);
has_update(telegram, aRetTemp_, 8);
has_update(telegram, cylTopTemp_, 10);
@@ -226,14 +239,11 @@ void Heatsource::process_amTempMessage(std::shared_ptr<const Telegram> telegram)
void Heatsource::process_amStatusMessage(std::shared_ptr<const Telegram> telegram) {
has_update(telegram, aPumpMod_, 0); // PR1
// offset 1: bitfield 01-pump on, 02-VR1 opening, 04-VR1 closing, 08-VB1 opening, 10-VB1 closing
// uint8_t stat = aPump_ | setValveBuffer_ << 3 | setValveReturn_ << 1;
// if (telegram->read_value(stat, 1)) {
// has_update(aPump_, stat & 0x01);
// has_update(valveBuffer_, (stat >> 3) & 0x03);
// has_update(valveReturn_, (stat >> 1) & 0x03);
// }
// actually we dont know the offset of VR2
// has_update(telegram, valveBypass_, ?); // VR2
has_bitupdate(telegram, burner_, 1, 5);
has_bitupdate(telegram, aPump_, 1, 0);
has_update(telegram, heatRequest_, 2); // percent
has_update(telegram, valveReturn_, 4); // VR1, percent
has_update(telegram, valveBuffer_, 5); // VB1, percent
}
@@ -275,6 +285,8 @@ void Heatsource::process_amCommandMessage(std::shared_ptr<const Telegram> telegr
// Rx: 60 00 FF 00 04 50 00 FF 00 FF FF 00 0D 00 01 00 00 00 00 01 03 01 00 03 00 2D 19 C8 02 94 00 4A
// Rx: 60 00 FF 19 04 50 00 FF FF 39
void Heatsource::process_amExtraMessage(std::shared_ptr<const Telegram> telegram) {
has_update(telegram, blockRemain_, 24); // minutes
has_update(telegram, blockRemainWw_, 25); // minutes
}
#pragma GCC diagnostic pop

View File

@@ -44,9 +44,16 @@ class Heatsource : public EMSdevice {
uint8_t aPumpMod_; // PR1 - percent
uint8_t valveBuffer_; // VB1
uint8_t valveReturn_; // VR1
uint16_t flueGasTemp_;
// uint8_t valveBypass_; // VR2 position unknown
// uint8_t heatSource_; // OEV
uint8_t burner_; // bit 5, offset 1, 54E
uint8_t aPump_; // bit 0, offset 1, 54E
uint8_t heatRequest_; // offset 2, percent
uint8_t blockRemain_; // offset 24, 550 min
uint8_t blockRemainWw_; // offset 25, 550 min
// Settings:
uint8_t vr2Config_; // pos 12: off(00)/Keelbypass(01)/(hc1pump(02) only standalone)
uint8_t ahsActivated_; // pos 00: Alternate heat source activation: No(00),Yes(01)