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

@@ -39,7 +39,7 @@
{167, DeviceType::BOILER, "Cerapur Aero", DeviceFlags::EMS_DEVICE_FLAG_NONE}, {167, DeviceType::BOILER, "Cerapur Aero", DeviceFlags::EMS_DEVICE_FLAG_NONE},
{168, DeviceType::BOILER, "Hybrid Heatpump", DeviceFlags::EMS_DEVICE_FLAG_HYBRID}, {168, DeviceType::BOILER, "Hybrid Heatpump", DeviceFlags::EMS_DEVICE_FLAG_HYBRID},
{170, DeviceType::BOILER, "Logano GB212", DeviceFlags::EMS_DEVICE_FLAG_NONE}, {170, DeviceType::BOILER, "Logano GB212", DeviceFlags::EMS_DEVICE_FLAG_NONE},
{172, DeviceType::BOILER, "Enviline/Compress 6000AW/Hybrid 7000iAW/SupraEco/Geo 5xx/WLW196i", DeviceFlags::EMS_DEVICE_FLAG_HEATPUMP}, {172, DeviceType::BOILER, "Enviline/Compress 6000AW/Hybrid 3000-7000iAW/SupraEco/Geo 5xx/WLW196i", DeviceFlags::EMS_DEVICE_FLAG_HEATPUMP},
{173, DeviceType::BOILER, "Geo 5xx", DeviceFlags::EMS_DEVICE_FLAG_HEATPUMP}, {173, DeviceType::BOILER, "Geo 5xx", DeviceFlags::EMS_DEVICE_FLAG_HEATPUMP},
{195, DeviceType::BOILER, "Condens 5000i/Greenstar 8000/GC9800IW", DeviceFlags::EMS_DEVICE_FLAG_NONE}, {195, DeviceType::BOILER, "Condens 5000i/Greenstar 8000/GC9800IW", DeviceFlags::EMS_DEVICE_FLAG_NONE},
{203, DeviceType::BOILER, "Logamax U122/Cerapur", DeviceFlags::EMS_DEVICE_FLAG_NONE}, {203, DeviceType::BOILER, "Logamax U122/Cerapur", DeviceFlags::EMS_DEVICE_FLAG_NONE},
@@ -92,7 +92,7 @@
{ 94, DeviceType::THERMOSTAT, "RFM20 Remote", DeviceFlags::EMS_DEVICE_FLAG_NONE}, // 0x18 { 94, DeviceType::THERMOSTAT, "RFM20 Remote", DeviceFlags::EMS_DEVICE_FLAG_NONE}, // 0x18
{151, DeviceType::THERMOSTAT, "RC25", DeviceFlags::EMS_DEVICE_FLAG_RC25}, // 0x17 {151, DeviceType::THERMOSTAT, "RC25", DeviceFlags::EMS_DEVICE_FLAG_RC25}, // 0x17
{157, DeviceType::THERMOSTAT, "RC200/CW100", DeviceFlags::EMS_DEVICE_FLAG_RC100}, // 0x18 {157, DeviceType::THERMOSTAT, "RC200/CW100", DeviceFlags::EMS_DEVICE_FLAG_RC100}, // 0x18
{158, DeviceType::THERMOSTAT, "RC300/RC310/Moduline 3000/1010H/CW400/Sense II", DeviceFlags::EMS_DEVICE_FLAG_RC300}, // 0x10 {158, DeviceType::THERMOSTAT, "RC300/RC310/Moduline 3000/1010H/CW400/Sense II/HPC410", DeviceFlags::EMS_DEVICE_FLAG_RC300}, // 0x10
{165, DeviceType::THERMOSTAT, "RC100/Moduline 1000/1010", DeviceFlags::EMS_DEVICE_FLAG_RC100}, // 0x18, 0x38 {165, DeviceType::THERMOSTAT, "RC100/Moduline 1000/1010", DeviceFlags::EMS_DEVICE_FLAG_RC100}, // 0x18, 0x38
{172, DeviceType::THERMOSTAT, "Rego 2000/3000", DeviceFlags::EMS_DEVICE_FLAG_RC300}, // 0x10 {172, DeviceType::THERMOSTAT, "Rego 2000/3000", DeviceFlags::EMS_DEVICE_FLAG_RC300}, // 0x10
{216, DeviceType::THERMOSTAT, "CRF200S", DeviceFlags::EMS_DEVICE_FLAG_CRF | DeviceFlags::EMS_DEVICE_FLAG_NO_WRITE}, // 0x18 {216, DeviceType::THERMOSTAT, "CRF200S", DeviceFlags::EMS_DEVICE_FLAG_CRF | DeviceFlags::EMS_DEVICE_FLAG_NO_WRITE}, // 0x18

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(0x486, "HpInConfig", false, MAKE_PF_CB(process_HpInConfig));
register_telegram_type(0x492, "HpHeaterConfig", false, MAKE_PF_CB(process_HpHeaterConfig)); 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(0x484, "HPSilentMode", false, MAKE_PF_CB(process_HpSilentMode));
register_telegram_type(0x491, "HPAdditionalHeater", false, MAKE_PF_CB(process_HpAdditionalHeater)); 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), FL_(minTempSilent),
DeviceValueUOM::NONE, DeviceValueUOM::NONE,
MAKE_CF_CB(set_minTempSilent)); 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 // dhw - DEVICE_DATA_ww topic
@@ -1480,9 +1492,16 @@ void Boiler::process_HpSilentMode(std::shared_ptr<const Telegram> telegram) {
has_update(telegram, minTempSilent_, 11); 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 // 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) { void Boiler::process_HpAdditionalHeater(std::shared_ptr<const Telegram> telegram) {
has_update(telegram, auxHeaterOnly_, 1); has_update(telegram, auxHeaterOnly_, 1);
has_update(telegram, tempParMode_, 5);
has_update(telegram, addHeaterDelay_, 10); has_update(telegram, addHeaterDelay_, 10);
} }
@@ -2445,6 +2464,15 @@ bool Boiler::set_additionalHeaterOnly(const char * value, const int8_t id) {
return false; 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) { bool Boiler::set_additionalHeaterDelay(const char * value, const int8_t id) {
int v; int v;
if (Helpers::value2number(value, v)) { if (Helpers::value2number(value, v)) {

View File

@@ -245,6 +245,8 @@ class Boiler : public EMSdevice {
uint8_t auxHeaterOnly_; uint8_t auxHeaterOnly_;
uint16_t addHeaterDelay_; uint16_t addHeaterDelay_;
int8_t minTempSilent_; int8_t minTempSilent_;
int8_t tempParMode_;
int8_t auxHeatMixValve_;
/* /*
// Hybrid heatpump with telegram 0xBB is readable and writeable in boiler and thermostat // 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_amExtraMessage(std::shared_ptr<const Telegram> telegram);
void process_HpSilentMode(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_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 // commands - none of these use the additional id parameter
bool set_ww_mode(const char * value, const int8_t id); 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_minTempSilent(const char * value, const int8_t id);
bool set_additionalHeaterOnly(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_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); 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(0x23A, "RC300OutdoorTemp", true, MAKE_PF_CB(process_RC300OutdoorTemp));
register_telegram_type(0x267, "RC300Floordry", false, MAKE_PF_CB(process_RC300Floordry)); 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(0x240, "RC300Settings", true, MAKE_PF_CB(process_RC300Settings));
register_telegram_type(0xBB, "HybridSettings", true, MAKE_PF_CB(process_HybridSettings));
// JUNKERS/HT3 // JUNKERS/HT3
} else if (model == EMSdevice::EMS_DEVICE_FLAG_JUNKERS) { } 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(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(0x23, "JunkersSetMixer", true, MAKE_PF_CB(process_JunkersSetMixer));
register_telegram_type(0x123, "JunkersRemote", false, MAKE_PF_CB(process_JunkersRemoteMonitor)); register_telegram_type(0x123, "JunkersRemote", false, MAKE_PF_CB(process_JunkersRemoteMonitor));
register_telegram_type(0x1D3, "JunkersDhw", true, MAKE_PF_CB(process_JunkersWW)); 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 Heatpump optimization
// ?(0xBB), data: 00 00 00 00 00 00 00 00 00 00 00 FF 02 0F 1E 0B 1A 00 14 03 // ?(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_enumupdate(telegram, hybridStrategy_, 12, 1); // cost = 2, temperature = 3, mix = 4
has_update(telegram, switchOverTemp_, 13); // full degrees has_update(telegram, switchOverTemp_, 13); // full degrees
has_update(telegram, energyCostRatio_, 14); // is *10 has_update(telegram, energyCostRatio_, 14); // is *10
@@ -3471,6 +3472,64 @@ void Thermostat::register_device_values() {
MAKE_CF_CB(set_wwDisinfectHour), MAKE_CF_CB(set_wwDisinfectHour),
0, 0,
1431); 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; break;
case EMS_DEVICE_FLAG_RC10: case EMS_DEVICE_FLAG_RC10:
register_device_value(DeviceValueTAG::TAG_DEVICE_DATA, 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_JunkersSet2(std::shared_ptr<const Telegram> telegram);
void process_EasyMonitor(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_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_JunkersSetMixer(std::shared_ptr<const Telegram> telegram);
void process_JunkersWW(std::shared_ptr<const Telegram> telegram); void process_JunkersWW(std::shared_ptr<const Telegram> telegram);
void process_RemoteTemp(std::shared_ptr<const Telegram> telegram); void process_RemoteTemp(std::shared_ptr<const Telegram> telegram);

View File

@@ -370,6 +370,8 @@ MAKE_PSTR_LIST(maxHeatDhw, "maxheatdhw", "heat limit dhw", "Heizgrenze Warmwasse
MAKE_PSTR_LIST(auxHeaterOnly, "auxheateronly", "auxilliary heater only", "nur Zusatzheizer") MAKE_PSTR_LIST(auxHeaterOnly, "auxheateronly", "auxilliary heater only", "nur Zusatzheizer")
MAKE_PSTR_LIST(addHeaterDelay, "addheaterdelay", "additional heater on delay", "Zusatzheizer Einschaltverzögerung") MAKE_PSTR_LIST(addHeaterDelay, "addheaterdelay", "additional heater on delay", "Zusatzheizer Einschaltverzögerung")
MAKE_PSTR_LIST(minTempSilent, "mintempsilent", "min. outside temp. for silent mode", "Minimale Aussentemperatur Silentmodus") MAKE_PSTR_LIST(minTempSilent, "mintempsilent", "min. outside temp. for silent mode", "Minimale Aussentemperatur Silentmodus")
MAKE_PSTR_LIST(tempParMode, "tempparmode", "outside temp. parallel mode", "Aussentemperatur Parallelmodus")
MAKE_PSTR_LIST(auxHeatMixValve, "auxheatmix", "aux. heater mixing valve", "Mischer Zusatzheizer")
// hybrid heatpump // hybrid heatpump
MAKE_PSTR_LIST(hybridStrategy, "hybridstrategy", "hybrid control strategy", "Hybrid Strategie", "Hybride strategie", "Hybrid kontrollstrategi", "strategia sterowania hybrydowego", "hybrid kontrollstrategi") MAKE_PSTR_LIST(hybridStrategy, "hybridstrategy", "hybrid control strategy", "Hybrid Strategie", "Hybride strategie", "Hybrid kontrollstrategi", "strategia sterowania hybrydowego", "hybrid kontrollstrategi")

View File

@@ -111,7 +111,7 @@ WebLogService::QueuedLogMessage::QueuedLogMessage(unsigned long id, std::shared_
void WebLogService::operator<<(std::shared_ptr<uuid::log::Message> message) { void WebLogService::operator<<(std::shared_ptr<uuid::log::Message> message) {
#ifndef EMSESP_STANDALONE #ifndef EMSESP_STANDALONE
if (ESP.getMaxAllocHeap() < 20480) { if (maximum_log_messages_ > 10 && ESP.getMaxAllocHeap() < 41984) {
maximum_log_messages(maximum_log_messages_ > 25 ? maximum_log_messages_ - 25 : 10); maximum_log_messages(maximum_log_messages_ > 25 ? maximum_log_messages_ - 25 : 10);
// EMSESP::logger().warning("Low memory: WebLog buffer reduced to %d entries", maximum_log_messages_); // EMSESP::logger().warning("Low memory: WebLog buffer reduced to %d entries", maximum_log_messages_);
} }