add values/settings #803

This commit is contained in:
MichaelDvP
2022-12-14 14:20:32 +01:00
parent de9e261807
commit 4cdd5e9f20
7 changed files with 99 additions and 6 deletions

View File

@@ -182,6 +182,7 @@ Boiler::Boiler(uint8_t device_type, int8_t device_id, uint8_t product_id, const
register_telegram_type(0x486, "HpInConfig", false, MAKE_PF_CB(process_HpInConfig));
register_telegram_type(0x492, "HpHeaterConfig", false, MAKE_PF_CB(process_HpHeaterConfig));
register_telegram_type(0x488, "HPValve", false, MAKE_PF_CB(process_HpValve));
register_telegram_type(0x484, "HPSilentMode", false, MAKE_PF_CB(process_HpSilentMode));
register_telegram_type(0x491, "HPAdditionalHeater", false, MAKE_PF_CB(process_HpAdditionalHeater));
}
@@ -579,6 +580,17 @@ Boiler::Boiler(uint8_t device_type, int8_t device_id, uint8_t product_id, const
FL_(minTempSilent),
DeviceValueUOM::NONE,
MAKE_CF_CB(set_minTempSilent));
register_device_value(DeviceValueTAG::TAG_DEVICE_DATA,
&tempParMode_,
DeviceValueType::INT,
FL_(tempParMode),
DeviceValueUOM::DEGREES,
MAKE_CF_CB(set_tempParMode));
register_device_value(DeviceValueTAG::TAG_DEVICE_DATA,
&auxHeatMixValve_,
DeviceValueType::INT,
FL_(auxHeatMixValve),
DeviceValueUOM::PERCENT);
}
// dhw - DEVICE_DATA_ww topic
@@ -1480,9 +1492,16 @@ void Boiler::process_HpSilentMode(std::shared_ptr<const Telegram> telegram) {
has_update(telegram, minTempSilent_, 11);
}
// Boiler(0x08) -B-> All(0x00), ?(0x0488), data: 8E 00 00 00 00 00 01 03
void Boiler::process_HpValve(std::shared_ptr<const Telegram> telegram) {
has_update(telegram, auxHeatMixValve_, 7);
}
// Boiler(0x08) -> All(0x00), ?(0x0491), data: 03 01 00 00 00 02 64 00 00 14 01 2C 00 0A 00 1E 00 1E 00 00 1E 0A 1E 05 05
void Boiler::process_HpAdditionalHeater(std::shared_ptr<const Telegram> telegram) {
has_update(telegram, auxHeaterOnly_, 1);
has_update(telegram, tempParMode_, 5);
has_update(telegram, addHeaterDelay_, 10);
}
@@ -2445,6 +2464,15 @@ bool Boiler::set_additionalHeaterOnly(const char * value, const int8_t id) {
return false;
}
bool Boiler::set_tempParMode(const char * value, const int8_t id) {
int v;
if (Helpers::value2temperature(value, v)) {
write_command(0x491, 5, v, 0x491);
return true;
}
return false;
}
bool Boiler::set_additionalHeaterDelay(const char * value, const int8_t id) {
int v;
if (Helpers::value2number(value, v)) {

View File

@@ -245,6 +245,8 @@ class Boiler : public EMSdevice {
uint8_t auxHeaterOnly_;
uint16_t addHeaterDelay_;
int8_t minTempSilent_;
int8_t tempParMode_;
int8_t auxHeatMixValve_;
/*
// Hybrid heatpump with telegram 0xBB is readable and writeable in boiler and thermostat
@@ -299,6 +301,7 @@ class Boiler : public EMSdevice {
void process_amExtraMessage(std::shared_ptr<const Telegram> telegram);
void process_HpSilentMode(std::shared_ptr<const Telegram> telegram);
void process_HpAdditionalHeater(std::shared_ptr<const Telegram> telegram);
void process_HpValve(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);
@@ -387,6 +390,7 @@ class Boiler : public EMSdevice {
bool set_minTempSilent(const char * value, const int8_t id);
bool set_additionalHeaterOnly(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_hybridStrategy(const char * value, const int8_t id);

View File

@@ -152,6 +152,7 @@ Thermostat::Thermostat(uint8_t device_type, uint8_t device_id, uint8_t product_i
register_telegram_type(0x23A, "RC300OutdoorTemp", true, MAKE_PF_CB(process_RC300OutdoorTemp));
register_telegram_type(0x267, "RC300Floordry", false, MAKE_PF_CB(process_RC300Floordry));
register_telegram_type(0x240, "RC300Settings", true, MAKE_PF_CB(process_RC300Settings));
register_telegram_type(0xBB, "HybridSettings", true, MAKE_PF_CB(process_HybridSettings));
// JUNKERS/HT3
} else if (model == EMSdevice::EMS_DEVICE_FLAG_JUNKERS) {
@@ -172,7 +173,7 @@ Thermostat::Thermostat(uint8_t device_type, uint8_t device_id, uint8_t product_i
register_telegram_type(set_typeids[i], "JunkersSet", false, MAKE_PF_CB(process_JunkersSet));
}
}
register_telegram_type(0xBB, "HybridSettings", true, MAKE_PF_CB(process_JunkersHybridSettings));
register_telegram_type(0xBB, "HybridSettings", true, MAKE_PF_CB(process_HybridSettings));
register_telegram_type(0x23, "JunkersSetMixer", true, MAKE_PF_CB(process_JunkersSetMixer));
register_telegram_type(0x123, "JunkersRemote", false, MAKE_PF_CB(process_JunkersRemoteMonitor));
register_telegram_type(0x1D3, "JunkersDhw", true, MAKE_PF_CB(process_JunkersWW));
@@ -869,7 +870,7 @@ void Thermostat::process_JunkersMonitor(std::shared_ptr<const Telegram> telegram
// 0xBB Heatpump optimization
// ?(0xBB), data: 00 00 00 00 00 00 00 00 00 00 00 FF 02 0F 1E 0B 1A 00 14 03
void Thermostat::process_JunkersHybridSettings(std::shared_ptr<const Telegram> telegram) {
void Thermostat::process_HybridSettings(std::shared_ptr<const Telegram> telegram) {
has_enumupdate(telegram, hybridStrategy_, 12, 1); // cost = 2, temperature = 3, mix = 4
has_update(telegram, switchOverTemp_, 13); // full degrees
has_update(telegram, energyCostRatio_, 14); // is *10
@@ -3471,6 +3472,64 @@ void Thermostat::register_device_values() {
MAKE_CF_CB(set_wwDisinfectHour),
0,
1431);
register_device_value(DeviceValueTAG::TAG_DEVICE_DATA,
&hybridStrategy_,
DeviceValueType::ENUM,
FL_(enum_hybridStrategy),
FL_(hybridStrategy),
DeviceValueUOM::NONE,
MAKE_CF_CB(set_hybridStrategy));
register_device_value(DeviceValueTAG::TAG_DEVICE_DATA,
&switchOverTemp_,
DeviceValueType::INT,
FL_(switchOverTemp),
DeviceValueUOM::DEGREES,
MAKE_CF_CB(set_switchOverTemp),
-20,
20);
register_device_value(DeviceValueTAG::TAG_DEVICE_DATA,
&energyCostRatio_,
DeviceValueType::UINT,
DeviceValueNumOp::DV_NUMOP_DIV10,
FL_(energyCostRatio),
DeviceValueUOM::NONE,
MAKE_CF_CB(set_energyCostRatio),
0,
20);
register_device_value(DeviceValueTAG::TAG_DEVICE_DATA,
&fossileFactor_,
DeviceValueType::UINT,
DeviceValueNumOp::DV_NUMOP_DIV10,
FL_(fossileFactor),
DeviceValueUOM::NONE,
MAKE_CF_CB(set_fossileFactor),
0,
5);
register_device_value(DeviceValueTAG::TAG_DEVICE_DATA,
&electricFactor_,
DeviceValueType::UINT,
DeviceValueNumOp::DV_NUMOP_DIV10,
FL_(electricFactor),
DeviceValueUOM::NONE,
MAKE_CF_CB(set_electricFactor),
0,
5);
register_device_value(DeviceValueTAG::TAG_DEVICE_DATA,
&delayBoiler_,
DeviceValueType::UINT,
FL_(delayBoiler),
DeviceValueUOM::MINUTES,
MAKE_CF_CB(set_delayBoiler),
5,
120);
register_device_value(DeviceValueTAG::TAG_DEVICE_DATA,
&tempDiffBoiler_,
DeviceValueType::UINT,
FL_(tempDiffBoiler),
DeviceValueUOM::DEGREES_R,
MAKE_CF_CB(set_tempDiffBoiler),
1,
99);
break;
case EMS_DEVICE_FLAG_RC10:
register_device_value(DeviceValueTAG::TAG_DEVICE_DATA,

View File

@@ -378,7 +378,7 @@ class Thermostat : public EMSdevice {
void process_JunkersSet2(std::shared_ptr<const Telegram> telegram);
void process_EasyMonitor(std::shared_ptr<const Telegram> telegram);
void process_JunkersRemoteMonitor(std::shared_ptr<const Telegram> telegram);
void process_JunkersHybridSettings(std::shared_ptr<const Telegram> telegram);
void process_HybridSettings(std::shared_ptr<const Telegram> telegram);
void process_JunkersSetMixer(std::shared_ptr<const Telegram> telegram);
void process_JunkersWW(std::shared_ptr<const Telegram> telegram);
void process_RemoteTemp(std::shared_ptr<const Telegram> telegram);