From de9e261807d81b010e78c602e14cf4e203b6c919 Mon Sep 17 00:00:00 2001 From: MichaelDvP Date: Tue, 13 Dec 2022 11:43:37 +0100 Subject: [PATCH 01/11] Test for #802 --- src/devices/boiler.cpp | 61 +++++++++++++++++++++++++++++++++++++++ src/devices/boiler.h | 9 ++++++ src/locale_translations.h | 4 +++ 3 files changed, 74 insertions(+) diff --git a/src/devices/boiler.cpp b/src/devices/boiler.cpp index c972eeaa9..04e07af86 100644 --- a/src/devices/boiler.cpp +++ b/src/devices/boiler.cpp @@ -181,6 +181,9 @@ Boiler::Boiler(uint8_t device_type, int8_t device_id, uint8_t product_id, const register_telegram_type(0x4A2, "HpInput", false, MAKE_PF_CB(process_HpInput)); 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(0x484, "HPSilentMode", false, MAKE_PF_CB(process_HpSilentMode)); + register_telegram_type(0x491, "HPAdditionalHeater", false, MAKE_PF_CB(process_HpAdditionalHeater)); } /* @@ -558,6 +561,24 @@ Boiler::Boiler(uint8_t device_type, int8_t device_id, uint8_t product_id, const FL_(maxHeatDhw), DeviceValueUOM::NONE, MAKE_CF_CB(set_maxHeatDhw)); + register_device_value(DeviceValueTAG::TAG_DEVICE_DATA, + &auxHeaterOnly_, + DeviceValueType::BOOL, + FL_(auxHeaterOnly), + DeviceValueUOM::NONE, + MAKE_CF_CB(set_additionalHeaterOnly)); + register_device_value(DeviceValueTAG::TAG_DEVICE_DATA, + &addHeaterDelay_, + DeviceValueType::USHORT, + FL_(addHeaterDelay), + DeviceValueUOM::NONE, + MAKE_CF_CB(set_additionalHeaterDelay)); + register_device_value(DeviceValueTAG::TAG_DEVICE_DATA, + &minTempSilent_, + DeviceValueType::INT, + FL_(minTempSilent), + DeviceValueUOM::NONE, + MAKE_CF_CB(set_minTempSilent)); } // dhw - DEVICE_DATA_ww topic @@ -1453,6 +1474,18 @@ void Boiler::process_amExtraMessage(std::shared_ptr telegram) { #pragma GCC diagnostic pop +// Boiler(0x08) -> All(0x00), ?(0x0484), data: 00 00 14 28 0D 50 00 00 00 02 02 07 28 01 00 02 05 19 0A 0A 03 0D 07 00 0A +// Boiler(0x08) -> All(0x00), ?(0x0484), data: 01 90 00 F6 28 14 64 00 00 E1 00 1E 00 1E 01 64 01 64 54 20 00 00 (offset 25) +void Boiler::process_HpSilentMode(std::shared_ptr telegram) { + has_update(telegram, minTempSilent_, 11); +} + +// 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 telegram) { + has_update(telegram, auxHeaterOnly_, 1); + has_update(telegram, addHeaterDelay_, 10); +} + // Settings AM200 // pos 12: off(00)/Keelbypass(01)/(hc1pump(02) only standalone) @@ -2394,4 +2427,32 @@ bool Boiler::set_maxHeat(const char * value, const int8_t id) { return true; } +bool Boiler::set_minTempSilent(const char * value, const int8_t id) { + int v; + if (Helpers::value2temperature(value, v)) { + write_command(0x484, 11, v, 0x484); + return true; + } + return false; +} + +bool Boiler::set_additionalHeaterOnly(const char * value, const int8_t id) { + bool v; + if (Helpers::value2bool(value, v)) { + write_command(0x491, 1, v ? 1 : 0, 0x491); + return true; + } + return false; +} + +bool Boiler::set_additionalHeaterDelay(const char * value, const int8_t id) { + int v; + if (Helpers::value2number(value, v)) { + uint8_t data[2] = {(uint8_t)(v >> 8), (uint8_t)(v & 0xFF)}; + write_command(0x491, 10, data, 2, 0x491); + return true; + } + return false; +} + } // namespace emsesp diff --git a/src/devices/boiler.h b/src/devices/boiler.h index 4eec3c73e..89fd078f9 100644 --- a/src/devices/boiler.h +++ b/src/devices/boiler.h @@ -242,6 +242,10 @@ class Boiler : public EMSdevice { int8_t blockHyst_; // pos 14?: Hyst. for bolier block (K) uint8_t releaseWait_; // pos 15: Boiler release wait time (min) + uint8_t auxHeaterOnly_; + uint16_t addHeaterDelay_; + int8_t minTempSilent_; + /* // Hybrid heatpump with telegram 0xBB is readable and writeable in boiler and thermostat // thermostat always overwrites settings in boiler @@ -293,6 +297,8 @@ class Boiler : public EMSdevice { void process_amSettingMessage(std::shared_ptr telegram); void process_amCommandMessage(std::shared_ptr telegram); void process_amExtraMessage(std::shared_ptr telegram); + void process_HpSilentMode(std::shared_ptr telegram); + void process_HpAdditionalHeater(std::shared_ptr telegram); // commands - none of these use the additional id parameter bool set_ww_mode(const char * value, const int8_t id); @@ -378,6 +384,9 @@ class Boiler : public EMSdevice { inline bool set_maxHeatDhw(const char * value, const int8_t id) { return set_maxHeat(value, 4); } + 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_hybridStrategy(const char * value, const int8_t id); diff --git a/src/locale_translations.h b/src/locale_translations.h index ec1d0a6c7..6d25d0a56 100644 --- a/src/locale_translations.h +++ b/src/locale_translations.h @@ -367,6 +367,10 @@ MAKE_PSTR_LIST(maxHeatComp, "maxheatcomp", "heat limit compressor", "Heizgrenze MAKE_PSTR_LIST(maxHeatHeat, "maxheatheat", "heat limit heating", "Heizgrenze Heizen", "heat limit heating", "heat limit heating", "limit ciepła dla ogrzewania", "maks varmegrense oppvarming") MAKE_PSTR_LIST(maxHeatDhw, "maxheatdhw", "heat limit dhw", "Heizgrenze Warmwasser", "heat limit dhw", "heat limit dhw", "limit ciepła dla c.w.u.", "varmegrense varmtvann") +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(minTempSilent, "mintempsilent", "min. outside temp. for silent mode", "Minimale Aussentemperatur Silentmodus") + // hybrid heatpump MAKE_PSTR_LIST(hybridStrategy, "hybridstrategy", "hybrid control strategy", "Hybrid Strategie", "Hybride strategie", "Hybrid kontrollstrategi", "strategia sterowania hybrydowego", "hybrid kontrollstrategi") MAKE_PSTR_LIST(switchOverTemp, "switchovertemp", "outside switchover temperature", "Außentemperatur für Umschaltung", "Schakeltemperatuur buitentemperatuur", "Utomhus Omställningstemperatur", "zewnętrzna temperatura przełączania", "utendørstemp styring") From 4cdd5e9f20fb17f53e153e3e4b34f6d3e07878f5 Mon Sep 17 00:00:00 2001 From: MichaelDvP Date: Wed, 14 Dec 2022 14:20:32 +0100 Subject: [PATCH 02/11] add values/settings #803 --- src/device_library.h | 4 +-- src/devices/boiler.cpp | 28 +++++++++++++++++ src/devices/boiler.h | 4 +++ src/devices/thermostat.cpp | 63 ++++++++++++++++++++++++++++++++++++-- src/devices/thermostat.h | 2 +- src/locale_translations.h | 2 ++ src/web/WebLogService.cpp | 2 +- 7 files changed, 99 insertions(+), 6 deletions(-) diff --git a/src/device_library.h b/src/device_library.h index 288e04dbb..41254cef6 100644 --- a/src/device_library.h +++ b/src/device_library.h @@ -39,7 +39,7 @@ {167, DeviceType::BOILER, "Cerapur Aero", DeviceFlags::EMS_DEVICE_FLAG_NONE}, {168, DeviceType::BOILER, "Hybrid Heatpump", DeviceFlags::EMS_DEVICE_FLAG_HYBRID}, {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}, {195, DeviceType::BOILER, "Condens 5000i/Greenstar 8000/GC9800IW", 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 {151, DeviceType::THERMOSTAT, "RC25", DeviceFlags::EMS_DEVICE_FLAG_RC25}, // 0x17 {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 {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 diff --git a/src/devices/boiler.cpp b/src/devices/boiler.cpp index 04e07af86..51a506a56 100644 --- a/src/devices/boiler.cpp +++ b/src/devices/boiler.cpp @@ -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 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 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 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)) { diff --git a/src/devices/boiler.h b/src/devices/boiler.h index 89fd078f9..1bb8cfe41 100644 --- a/src/devices/boiler.h +++ b/src/devices/boiler.h @@ -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 telegram); void process_HpSilentMode(std::shared_ptr telegram); void process_HpAdditionalHeater(std::shared_ptr telegram); + void process_HpValve(std::shared_ptr 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); diff --git a/src/devices/thermostat.cpp b/src/devices/thermostat.cpp index 12bce02dc..adc32937c 100644 --- a/src/devices/thermostat.cpp +++ b/src/devices/thermostat.cpp @@ -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 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 telegram) { +void Thermostat::process_HybridSettings(std::shared_ptr 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, diff --git a/src/devices/thermostat.h b/src/devices/thermostat.h index d49c0926c..6366cfd32 100644 --- a/src/devices/thermostat.h +++ b/src/devices/thermostat.h @@ -378,7 +378,7 @@ class Thermostat : public EMSdevice { void process_JunkersSet2(std::shared_ptr telegram); void process_EasyMonitor(std::shared_ptr telegram); void process_JunkersRemoteMonitor(std::shared_ptr telegram); - void process_JunkersHybridSettings(std::shared_ptr telegram); + void process_HybridSettings(std::shared_ptr telegram); void process_JunkersSetMixer(std::shared_ptr telegram); void process_JunkersWW(std::shared_ptr telegram); void process_RemoteTemp(std::shared_ptr telegram); diff --git a/src/locale_translations.h b/src/locale_translations.h index 6d25d0a56..24802c3a7 100644 --- a/src/locale_translations.h +++ b/src/locale_translations.h @@ -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(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(tempParMode, "tempparmode", "outside temp. parallel mode", "Aussentemperatur Parallelmodus") +MAKE_PSTR_LIST(auxHeatMixValve, "auxheatmix", "aux. heater mixing valve", "Mischer Zusatzheizer") // hybrid heatpump MAKE_PSTR_LIST(hybridStrategy, "hybridstrategy", "hybrid control strategy", "Hybrid Strategie", "Hybride strategie", "Hybrid kontrollstrategi", "strategia sterowania hybrydowego", "hybrid kontrollstrategi") diff --git a/src/web/WebLogService.cpp b/src/web/WebLogService.cpp index 5dd9f1ab9..2e154d87b 100644 --- a/src/web/WebLogService.cpp +++ b/src/web/WebLogService.cpp @@ -111,7 +111,7 @@ WebLogService::QueuedLogMessage::QueuedLogMessage(unsigned long id, std::shared_ void WebLogService::operator<<(std::shared_ptr message) { #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); // EMSESP::logger().warning("Low memory: WebLog buffer reduced to %d entries", maximum_log_messages_); } From c3eb55342520a92561765f9d52fc6383f7c7d4a7 Mon Sep 17 00:00:00 2001 From: MichaelDvP Date: Wed, 14 Dec 2022 15:53:40 +0100 Subject: [PATCH 03/11] UOMs --- interface/src/project/types.ts | 6 ++++-- src/devices/boiler.cpp | 4 ++-- src/emsdevicevalue.cpp | 7 +++---- src/emsdevicevalue.h | 3 ++- src/locale_common.h | 1 + 5 files changed, 12 insertions(+), 9 deletions(-) diff --git a/interface/src/project/types.ts b/interface/src/project/types.ts index c4a83c384..8f897b307 100644 --- a/interface/src/project/types.ts +++ b/interface/src/project/types.ts @@ -179,7 +179,8 @@ export enum DeviceValueUOM { MV, SQM, M3, - L + L, + K_MIN } export const DeviceValueUOM_s = [ @@ -203,7 +204,8 @@ export const DeviceValueUOM_s = [ 'mV', 'm²', 'm³', - 'l' + 'l', + 'K*min' ]; export enum AnalogType { diff --git a/src/devices/boiler.cpp b/src/devices/boiler.cpp index 51a506a56..c36059e37 100644 --- a/src/devices/boiler.cpp +++ b/src/devices/boiler.cpp @@ -572,13 +572,13 @@ Boiler::Boiler(uint8_t device_type, int8_t device_id, uint8_t product_id, const &addHeaterDelay_, DeviceValueType::USHORT, FL_(addHeaterDelay), - DeviceValueUOM::NONE, + DeviceValueUOM::K_MIN, MAKE_CF_CB(set_additionalHeaterDelay)); register_device_value(DeviceValueTAG::TAG_DEVICE_DATA, &minTempSilent_, DeviceValueType::INT, FL_(minTempSilent), - DeviceValueUOM::NONE, + DeviceValueUOM::DEGREES, MAKE_CF_CB(set_minTempSilent)); register_device_value(DeviceValueTAG::TAG_DEVICE_DATA, &tempParMode_, diff --git a/src/emsdevicevalue.cpp b/src/emsdevicevalue.cpp index 20e4d463a..dde0ecbbf 100644 --- a/src/emsdevicevalue.cpp +++ b/src/emsdevicevalue.cpp @@ -105,10 +105,9 @@ DeviceValue::DeviceValue(uint8_t device_type, // must be an int of 4 bytes, 32bit aligned const char * DeviceValue::DeviceValueUOM_s[] = { - F_(uom_blank), F_(uom_degrees), F_(uom_degrees), F_(uom_percent), F_(uom_lmin), F_(uom_kwh), F_(uom_wh), - FL_(hours)[0], FL_(minutes)[0], F_(uom_ua), F_(uom_bar), F_(uom_kw), F_(uom_w), F_(uom_kb), - FL_(seconds)[0], F_(uom_dbm), F_(uom_fahrenheit), F_(uom_mv), F_(uom_sqm), F_(uom_m3), - F_(uom_blank) // connectivity + F_(uom_blank), F_(uom_degrees), F_(uom_degrees), F_(uom_percent), F_(uom_lmin), F_(uom_kwh), F_(uom_wh), FL_(hours)[0], + FL_(minutes)[0], F_(uom_ua), F_(uom_bar), F_(uom_kw), F_(uom_w), F_(uom_kb), FL_(seconds)[0], F_(uom_dbm), + F_(uom_fahrenheit), F_(uom_mv), F_(uom_sqm), F_(uom_m3), F_(uom_l), F_(uom_kmin), F_(uom_blank) // connectivity }; diff --git a/src/emsdevicevalue.h b/src/emsdevicevalue.h index 638f7b714..294f5241a 100644 --- a/src/emsdevicevalue.h +++ b/src/emsdevicevalue.h @@ -68,7 +68,8 @@ class DeviceValue { SQM, // 18 square meter M3, // 19 cubic meter L, // 20 - CONNECTIVITY // 21 - used in HA + K_MIN, // 21 - Kelvin * minutes + CONNECTIVITY // 22 - used in HA }; // TAG mapping - maps to DeviceValueTAG_s in emsdevice.cpp diff --git a/src/locale_common.h b/src/locale_common.h index fdc4b59fa..0047d920a 100644 --- a/src/locale_common.h +++ b/src/locale_common.h @@ -215,6 +215,7 @@ MAKE_PSTR(uom_mv, "mV") MAKE_PSTR(uom_sqm, "m²") MAKE_PSTR(uom_m3, "m³") MAKE_PSTR(uom_l, "l") +MAKE_PSTR(uom_kmin, "K*min") // MQTT topics and prefixes MAKE_PSTR(heating_active, "heating_active") From 5c9ba8de4381d2cc6ec070700a69e0079a570cd4 Mon Sep 17 00:00:00 2001 From: MichaelDvP Date: Wed, 14 Dec 2022 17:27:45 +0100 Subject: [PATCH 04/11] fetch heatpump telegrams --- src/devices/boiler.cpp | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/src/devices/boiler.cpp b/src/devices/boiler.cpp index c36059e37..68adc92d9 100644 --- a/src/devices/boiler.cpp +++ b/src/devices/boiler.cpp @@ -178,13 +178,13 @@ Boiler::Boiler(uint8_t device_type, int8_t device_id, uint8_t product_id, const register_telegram_type(0x48D, "HpPower", true, MAKE_PF_CB(process_HpPower)); register_telegram_type(0x48F, "HpOutdoor", false, MAKE_PF_CB(process_HpOutdoor)); register_telegram_type(0x48A, "HpPool", true, MAKE_PF_CB(process_HpPool)); - register_telegram_type(0x4A2, "HpInput", false, MAKE_PF_CB(process_HpInput)); - 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(0x4A2, "HpInput", true, MAKE_PF_CB(process_HpInput)); + register_telegram_type(0x486, "HpInConfig", true, MAKE_PF_CB(process_HpInConfig)); + register_telegram_type(0x492, "HpHeaterConfig", true, 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)); + register_telegram_type(0x488, "HPValve", true, MAKE_PF_CB(process_HpValve)); + register_telegram_type(0x484, "HPSilentMode", true, MAKE_PF_CB(process_HpSilentMode)); + register_telegram_type(0x491, "HPAdditionalHeater", true, MAKE_PF_CB(process_HpAdditionalHeater)); } /* @@ -1200,6 +1200,7 @@ void Boiler::process_HpPool(std::shared_ptr telegram) { // Heatpump inputs - type 0x4A2 // Boiler(0x08) -> All(0x00), ?(0x04A2), data: 02 01 01 00 01 00 +// Boiler(0x08) -W-> Me(0x0B), HpInput(0x04A2), data: 20 07 06 01 00 (from #802) void Boiler::process_HpInput(std::shared_ptr telegram) { has_update(telegram, hpInput[0].state, 2); has_update(telegram, hpInput[1].state, 3); From 7c1bade54d4a1888d1056d17719321d03465be89 Mon Sep 17 00:00:00 2001 From: MichaelDvP Date: Thu, 15 Dec 2022 13:22:54 +0100 Subject: [PATCH 05/11] add auxilliary heater setting #803 --- src/devices/boiler.cpp | 18 +++++++++++++++++- src/devices/boiler.h | 2 ++ src/locale_translations.h | 1 + 3 files changed, 20 insertions(+), 1 deletion(-) diff --git a/src/devices/boiler.cpp b/src/devices/boiler.cpp index 68adc92d9..f37199dae 100644 --- a/src/devices/boiler.cpp +++ b/src/devices/boiler.cpp @@ -568,6 +568,12 @@ Boiler::Boiler(uint8_t device_type, int8_t device_id, uint8_t product_id, const FL_(auxHeaterOnly), DeviceValueUOM::NONE, MAKE_CF_CB(set_additionalHeaterOnly)); + register_device_value(DeviceValueTAG::TAG_DEVICE_DATA, + &auxHeater_, + DeviceValueType::BOOL, + FL_(auxHeater), + DeviceValueUOM::NONE, + MAKE_CF_CB(set_additionalHeater)); register_device_value(DeviceValueTAG::TAG_DEVICE_DATA, &addHeaterDelay_, DeviceValueType::USHORT, @@ -1502,8 +1508,9 @@ void Boiler::process_HpValve(std::shared_ptr telegram) { // 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 telegram) { has_update(telegram, auxHeaterOnly_, 1); + has_update(telegram, auxHeater_, 2); has_update(telegram, tempParMode_, 5); - has_update(telegram, addHeaterDelay_, 10); + // has_update(telegram, addHeaterDelay_, ?); // unknown position } // Settings AM200 @@ -2465,6 +2472,15 @@ bool Boiler::set_additionalHeaterOnly(const char * value, const int8_t id) { return false; } +bool Boiler::set_additionalHeater(const char * value, const int8_t id) { + bool v; + if (Helpers::value2bool(value, v)) { + write_command(0x491, 2, v ? 1 : 0, 0x491); + return true; + } + return false; +} + bool Boiler::set_tempParMode(const char * value, const int8_t id) { int v; if (Helpers::value2temperature(value, v)) { diff --git a/src/devices/boiler.h b/src/devices/boiler.h index 1bb8cfe41..cf85389d0 100644 --- a/src/devices/boiler.h +++ b/src/devices/boiler.h @@ -243,6 +243,7 @@ class Boiler : public EMSdevice { uint8_t releaseWait_; // pos 15: Boiler release wait time (min) uint8_t auxHeaterOnly_; + uint8_t auxHeater_; uint16_t addHeaterDelay_; int8_t minTempSilent_; int8_t tempParMode_; @@ -389,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_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); diff --git a/src/locale_translations.h b/src/locale_translations.h index 2d2f67a96..effb1f799 100644 --- a/src/locale_translations.h +++ b/src/locale_translations.h @@ -368,6 +368,7 @@ MAKE_PSTR_LIST(maxHeatComp, "maxheatcomp", "heat limit compressor", "Heizgrenze MAKE_PSTR_LIST(maxHeatHeat, "maxheatheat", "heat limit heating", "Heizgrenze Heizen", "heat limit heating", "heat limit heating", "limit ciepła dla ogrzewania", "maks varmegrense oppvarming", "limite chaleur chauffage") MAKE_PSTR_LIST(maxHeatDhw, "maxheatdhw", "heat limit dhw", "Heizgrenze Warmwasser", "heat limit dhw", "heat limit dhw", "limit ciepła dla c.w.u.", "varmegrense varmtvann", "limite chaleur ecs") +MAKE_PSTR_LIST(auxHeater, "auxheater", "auxilliary heater", "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(minTempSilent, "mintempsilent", "min. outside temp. for silent mode", "Minimale Aussentemperatur Silentmodus") From 1350638fb39c6fd3525b1179c2c988403f24f877 Mon Sep 17 00:00:00 2001 From: MichaelDvP Date: Fri, 16 Dec 2022 11:10:37 +0100 Subject: [PATCH 06/11] rename auxheater --- src/locale_translations.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/locale_translations.h b/src/locale_translations.h index effb1f799..e14ca7a86 100644 --- a/src/locale_translations.h +++ b/src/locale_translations.h @@ -368,7 +368,7 @@ MAKE_PSTR_LIST(maxHeatComp, "maxheatcomp", "heat limit compressor", "Heizgrenze MAKE_PSTR_LIST(maxHeatHeat, "maxheatheat", "heat limit heating", "Heizgrenze Heizen", "heat limit heating", "heat limit heating", "limit ciepła dla ogrzewania", "maks varmegrense oppvarming", "limite chaleur chauffage") MAKE_PSTR_LIST(maxHeatDhw, "maxheatdhw", "heat limit dhw", "Heizgrenze Warmwasser", "heat limit dhw", "heat limit dhw", "limit ciepła dla c.w.u.", "varmegrense varmtvann", "limite chaleur ecs") -MAKE_PSTR_LIST(auxHeater, "auxheater", "auxilliary heater", "Zusatzheizer") +MAKE_PSTR_LIST(auxHeater, "auxheater", "enable auxilliary heater", "Erlaube 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(minTempSilent, "mintempsilent", "min. outside temp. for silent mode", "Minimale Aussentemperatur Silentmodus") From 137e047205762102b3a8283b962277b815371751 Mon Sep 17 00:00:00 2001 From: MichaelDvP Date: Fri, 16 Dec 2022 15:11:56 +0100 Subject: [PATCH 07/11] auxheaterdelay and hyst #803 --- interface/src/project/types.ts | 6 ++++-- src/devices/boiler.cpp | 30 ++++++++++++++++++++++++------ src/devices/boiler.h | 4 +++- src/emsdevicevalue.cpp | 6 +++--- src/emsdevicevalue.h | 3 ++- src/locale_common.h | 3 ++- src/locale_translations.h | 3 ++- 7 files changed, 40 insertions(+), 15 deletions(-) diff --git a/interface/src/project/types.ts b/interface/src/project/types.ts index 8f897b307..6ab77d975 100644 --- a/interface/src/project/types.ts +++ b/interface/src/project/types.ts @@ -180,7 +180,8 @@ export enum DeviceValueUOM { SQM, M3, L, - K_MIN + KxMIN, + KpMIN } export const DeviceValueUOM_s = [ @@ -205,7 +206,8 @@ export const DeviceValueUOM_s = [ 'm²', 'm³', 'l', - 'K*min' + 'K*min', + 'K/min' ]; export enum AnalogType { diff --git a/src/devices/boiler.cpp b/src/devices/boiler.cpp index f37199dae..89cee7755 100644 --- a/src/devices/boiler.cpp +++ b/src/devices/boiler.cpp @@ -575,11 +575,19 @@ Boiler::Boiler(uint8_t device_type, int8_t device_id, uint8_t product_id, const DeviceValueUOM::NONE, MAKE_CF_CB(set_additionalHeater)); register_device_value(DeviceValueTAG::TAG_DEVICE_DATA, - &addHeaterDelay_, + &auxHeaterDelay_, DeviceValueType::USHORT, - FL_(addHeaterDelay), - DeviceValueUOM::K_MIN, + DeviceValueNumOp::DV_NUMOP_MUL10, + FL_(auxHeaterDelay), + DeviceValueUOM::KxMIN, MAKE_CF_CB(set_additionalHeaterDelay)); + register_device_value(DeviceValueTAG::TAG_DEVICE_DATA, + &auxHeaterHyst_, + DeviceValueType::USHORT, + DeviceValueNumOp::DV_NUMOP_MUL5, + FL_(auxHeaterHyst), + DeviceValueUOM::KpMIN, + MAKE_CF_CB(set_additionalHeaterHyst)); register_device_value(DeviceValueTAG::TAG_DEVICE_DATA, &minTempSilent_, DeviceValueType::INT, @@ -1497,6 +1505,7 @@ void Boiler::process_amExtraMessage(std::shared_ptr telegram) { // Boiler(0x08) -> All(0x00), ?(0x0484), data: 01 90 00 F6 28 14 64 00 00 E1 00 1E 00 1E 01 64 01 64 54 20 00 00 (offset 25) void Boiler::process_HpSilentMode(std::shared_ptr telegram) { has_update(telegram, minTempSilent_, 11); + has_update(telegram, auxHeaterHyst_, 37); } // Boiler(0x08) -B-> All(0x00), ?(0x0488), data: 8E 00 00 00 00 00 01 03 @@ -1510,7 +1519,7 @@ void Boiler::process_HpAdditionalHeater(std::shared_ptr telegram has_update(telegram, auxHeaterOnly_, 1); has_update(telegram, auxHeater_, 2); has_update(telegram, tempParMode_, 5); - // has_update(telegram, addHeaterDelay_, ?); // unknown position + has_update(telegram, auxHeaterDelay_, 16); // is / 10 } // Settings AM200 @@ -2493,11 +2502,20 @@ bool Boiler::set_tempParMode(const char * value, const int8_t id) { bool Boiler::set_additionalHeaterDelay(const char * value, const int8_t id) { int v; if (Helpers::value2number(value, v)) { - uint8_t data[2] = {(uint8_t)(v >> 8), (uint8_t)(v & 0xFF)}; - write_command(0x491, 10, data, 2, 0x491); + uint8_t data[2] = {(uint8_t)(v >> 8), (uint8_t)v}; + write_command(0x491, 16, data, 2, 0x491); return true; } return false; } +bool Boiler::set_additionalHeaterHyst(const char * value, const int8_t id) { + int v; + if (Helpers::value2number(value, v)) { + uint8_t data[2] = {(uint8_t)(v >> 8), (uint8_t)v}; + write_command(0x484, 37, data, 2, 0x484); + return true; + } + return false; +} } // namespace emsesp diff --git a/src/devices/boiler.h b/src/devices/boiler.h index cf85389d0..7ee7137f3 100644 --- a/src/devices/boiler.h +++ b/src/devices/boiler.h @@ -244,7 +244,8 @@ class Boiler : public EMSdevice { uint8_t auxHeaterOnly_; uint8_t auxHeater_; - uint16_t addHeaterDelay_; + uint16_t auxHeaterDelay_; + uint16_t auxHeaterHyst_; int8_t minTempSilent_; int8_t tempParMode_; int8_t auxHeatMixValve_; @@ -392,6 +393,7 @@ class Boiler : public EMSdevice { 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_additionalHeaterHyst(const char * value, const int8_t id); bool set_tempParMode(const char * value, const int8_t id); /* diff --git a/src/emsdevicevalue.cpp b/src/emsdevicevalue.cpp index dde0ecbbf..43ba1014c 100644 --- a/src/emsdevicevalue.cpp +++ b/src/emsdevicevalue.cpp @@ -105,9 +105,9 @@ DeviceValue::DeviceValue(uint8_t device_type, // must be an int of 4 bytes, 32bit aligned const char * DeviceValue::DeviceValueUOM_s[] = { - F_(uom_blank), F_(uom_degrees), F_(uom_degrees), F_(uom_percent), F_(uom_lmin), F_(uom_kwh), F_(uom_wh), FL_(hours)[0], - FL_(minutes)[0], F_(uom_ua), F_(uom_bar), F_(uom_kw), F_(uom_w), F_(uom_kb), FL_(seconds)[0], F_(uom_dbm), - F_(uom_fahrenheit), F_(uom_mv), F_(uom_sqm), F_(uom_m3), F_(uom_l), F_(uom_kmin), F_(uom_blank) // connectivity + F_(uom_blank), F_(uom_degrees), F_(uom_degrees), F_(uom_percent), F_(uom_lmin), F_(uom_kwh), F_(uom_wh), FL_(hours)[0], + FL_(minutes)[0], F_(uom_ua), F_(uom_bar), F_(uom_kw), F_(uom_w), F_(uom_kb), FL_(seconds)[0], F_(uom_dbm), + F_(uom_fahrenheit), F_(uom_mv), F_(uom_sqm), F_(uom_m3), F_(uom_l), F_(uom_kxmin), F_(uom_kpmin), F_(uom_blank) // connectivity }; diff --git a/src/emsdevicevalue.h b/src/emsdevicevalue.h index 294f5241a..4b03f879e 100644 --- a/src/emsdevicevalue.h +++ b/src/emsdevicevalue.h @@ -68,7 +68,8 @@ class DeviceValue { SQM, // 18 square meter M3, // 19 cubic meter L, // 20 - K_MIN, // 21 - Kelvin * minutes + KxMIN, // 21 - Kelvin * minutes + KpMIN, // 22 - Kelvin / minutes CONNECTIVITY // 22 - used in HA }; diff --git a/src/locale_common.h b/src/locale_common.h index 0047d920a..7b7f2e900 100644 --- a/src/locale_common.h +++ b/src/locale_common.h @@ -215,7 +215,8 @@ MAKE_PSTR(uom_mv, "mV") MAKE_PSTR(uom_sqm, "m²") MAKE_PSTR(uom_m3, "m³") MAKE_PSTR(uom_l, "l") -MAKE_PSTR(uom_kmin, "K*min") +MAKE_PSTR(uom_kxmin, "K*min") +MAKE_PSTR(uom_kpmin, "K/min") // MQTT topics and prefixes MAKE_PSTR(heating_active, "heating_active") diff --git a/src/locale_translations.h b/src/locale_translations.h index e14ca7a86..499da8e3c 100644 --- a/src/locale_translations.h +++ b/src/locale_translations.h @@ -370,7 +370,8 @@ MAKE_PSTR_LIST(maxHeatDhw, "maxheatdhw", "heat limit dhw", "Heizgrenze Warmwasse MAKE_PSTR_LIST(auxHeater, "auxheater", "enable auxilliary heater", "Erlaube 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(auxHeaterDelay, "auxheaterdelay", "auxilliary heater on delay", "Zusatzheizer Einschaltverzögerung") +MAKE_PSTR_LIST(auxHeaterHyst, "auxheaterhyst", "auxilliary heater on/off hyst", "Zusatzheizer Schalthysterese") 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") From a5298798894c4a53f68e374a6427a17b950d9daf Mon Sep 17 00:00:00 2001 From: MichaelDvP Date: Sat, 17 Dec 2022 11:10:23 +0100 Subject: [PATCH 08/11] some aux heater trnlations --- interface/src/project/types.ts | 6 ++---- src/devices/boiler.cpp | 4 ++-- src/emsdevicevalue.cpp | 6 +++--- src/emsdevicevalue.h | 3 +-- src/locale_common.h | 3 +-- src/locale_translations.h | 5 +++-- 6 files changed, 12 insertions(+), 15 deletions(-) diff --git a/interface/src/project/types.ts b/interface/src/project/types.ts index 6ab77d975..6d75ae00e 100644 --- a/interface/src/project/types.ts +++ b/interface/src/project/types.ts @@ -180,8 +180,7 @@ export enum DeviceValueUOM { SQM, M3, L, - KxMIN, - KpMIN + KMIN } export const DeviceValueUOM_s = [ @@ -206,8 +205,7 @@ export const DeviceValueUOM_s = [ 'm²', 'm³', 'l', - 'K*min', - 'K/min' + 'K*min' ]; export enum AnalogType { diff --git a/src/devices/boiler.cpp b/src/devices/boiler.cpp index 89cee7755..510d56988 100644 --- a/src/devices/boiler.cpp +++ b/src/devices/boiler.cpp @@ -579,14 +579,14 @@ Boiler::Boiler(uint8_t device_type, int8_t device_id, uint8_t product_id, const DeviceValueType::USHORT, DeviceValueNumOp::DV_NUMOP_MUL10, FL_(auxHeaterDelay), - DeviceValueUOM::KxMIN, + DeviceValueUOM::KMIN, MAKE_CF_CB(set_additionalHeaterDelay)); register_device_value(DeviceValueTAG::TAG_DEVICE_DATA, &auxHeaterHyst_, DeviceValueType::USHORT, DeviceValueNumOp::DV_NUMOP_MUL5, FL_(auxHeaterHyst), - DeviceValueUOM::KpMIN, + DeviceValueUOM::KMIN, MAKE_CF_CB(set_additionalHeaterHyst)); register_device_value(DeviceValueTAG::TAG_DEVICE_DATA, &minTempSilent_, diff --git a/src/emsdevicevalue.cpp b/src/emsdevicevalue.cpp index 43ba1014c..dde0ecbbf 100644 --- a/src/emsdevicevalue.cpp +++ b/src/emsdevicevalue.cpp @@ -105,9 +105,9 @@ DeviceValue::DeviceValue(uint8_t device_type, // must be an int of 4 bytes, 32bit aligned const char * DeviceValue::DeviceValueUOM_s[] = { - F_(uom_blank), F_(uom_degrees), F_(uom_degrees), F_(uom_percent), F_(uom_lmin), F_(uom_kwh), F_(uom_wh), FL_(hours)[0], - FL_(minutes)[0], F_(uom_ua), F_(uom_bar), F_(uom_kw), F_(uom_w), F_(uom_kb), FL_(seconds)[0], F_(uom_dbm), - F_(uom_fahrenheit), F_(uom_mv), F_(uom_sqm), F_(uom_m3), F_(uom_l), F_(uom_kxmin), F_(uom_kpmin), F_(uom_blank) // connectivity + F_(uom_blank), F_(uom_degrees), F_(uom_degrees), F_(uom_percent), F_(uom_lmin), F_(uom_kwh), F_(uom_wh), FL_(hours)[0], + FL_(minutes)[0], F_(uom_ua), F_(uom_bar), F_(uom_kw), F_(uom_w), F_(uom_kb), FL_(seconds)[0], F_(uom_dbm), + F_(uom_fahrenheit), F_(uom_mv), F_(uom_sqm), F_(uom_m3), F_(uom_l), F_(uom_kmin), F_(uom_blank) // connectivity }; diff --git a/src/emsdevicevalue.h b/src/emsdevicevalue.h index 4b03f879e..9c0a28730 100644 --- a/src/emsdevicevalue.h +++ b/src/emsdevicevalue.h @@ -68,8 +68,7 @@ class DeviceValue { SQM, // 18 square meter M3, // 19 cubic meter L, // 20 - KxMIN, // 21 - Kelvin * minutes - KpMIN, // 22 - Kelvin / minutes + KMIN, // 21 - Kelvin * minutes CONNECTIVITY // 22 - used in HA }; diff --git a/src/locale_common.h b/src/locale_common.h index 7b7f2e900..0047d920a 100644 --- a/src/locale_common.h +++ b/src/locale_common.h @@ -215,8 +215,7 @@ MAKE_PSTR(uom_mv, "mV") MAKE_PSTR(uom_sqm, "m²") MAKE_PSTR(uom_m3, "m³") MAKE_PSTR(uom_l, "l") -MAKE_PSTR(uom_kxmin, "K*min") -MAKE_PSTR(uom_kpmin, "K/min") +MAKE_PSTR(uom_kmin, "K*min") // MQTT topics and prefixes MAKE_PSTR(heating_active, "heating_active") diff --git a/src/locale_translations.h b/src/locale_translations.h index 499da8e3c..fca4abe45 100644 --- a/src/locale_translations.h +++ b/src/locale_translations.h @@ -368,10 +368,11 @@ MAKE_PSTR_LIST(maxHeatComp, "maxheatcomp", "heat limit compressor", "Heizgrenze MAKE_PSTR_LIST(maxHeatHeat, "maxheatheat", "heat limit heating", "Heizgrenze Heizen", "heat limit heating", "heat limit heating", "limit ciepła dla ogrzewania", "maks varmegrense oppvarming", "limite chaleur chauffage") MAKE_PSTR_LIST(maxHeatDhw, "maxheatdhw", "heat limit dhw", "Heizgrenze Warmwasser", "heat limit dhw", "heat limit dhw", "limit ciepła dla c.w.u.", "varmegrense varmtvann", "limite chaleur ecs") +// translations are in order en, de, nl, se, pl, no, fr, .... some missing MAKE_PSTR_LIST(auxHeater, "auxheater", "enable auxilliary heater", "Erlaube Zusatzheizer") MAKE_PSTR_LIST(auxHeaterOnly, "auxheateronly", "auxilliary heater only", "nur Zusatzheizer") -MAKE_PSTR_LIST(auxHeaterDelay, "auxheaterdelay", "auxilliary heater on delay", "Zusatzheizer Einschaltverzögerung") -MAKE_PSTR_LIST(auxHeaterHyst, "auxheaterhyst", "auxilliary heater on/off hyst", "Zusatzheizer Schalthysterese") +MAKE_PSTR_LIST(auxHeaterDelay, "auxheaterdelay", "auxilliary heater on delay", "Zusatzheizer verzögert ein", "Bijverw. vertraagd aan", "Tillskottfördröjning på", "Opóźn. włączenie dogrz.", "Tilleggsvarmer forsinket på", "Chauff app tempo marche") +MAKE_PSTR_LIST(auxHeaterHyst, "auxheaterhyst", "auxilliary heater on/off hyst", "Zusatzheizer Schalthysterese", "Aan/uit-hysteresis in verw. bedrijf instellen", "På/av-hystereses Husv.", "Histerez wł/wył Ogrzew.", "På/av-hysterese Oppvar.", "Hystérésis Marche en mode chauffage") 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") From dc6e7f7b1b7fa64880b7f54288e3df24d207cf8f Mon Sep 17 00:00:00 2001 From: MichaelDvP Date: Sat, 17 Dec 2022 12:05:29 +0100 Subject: [PATCH 09/11] changelog --- CHANGELOG_LATEST.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG_LATEST.md b/CHANGELOG_LATEST.md index b585670a0..52eb1dab4 100644 --- a/CHANGELOG_LATEST.md +++ b/CHANGELOG_LATEST.md @@ -25,6 +25,7 @@ - Use HA connectivity device class for Status, added boot time [#751](https://github.com/emsesp/EMS-ESP32/issues/751) - Add commands for analog sensors outputs - Support for multiple EMS-ESPs with MQTT and HA [[#759](https://github.com/emsesp/EMS-ESP32/issues/759)] +- Settings for heatpump silent mode and additional heater [[#802](https://github.com/emsesp/EMS-ESP32/issues/802)] [[#803](https://github.com/emsesp/EMS-ESP32/issues/803)] ## Fixed From ab3b9f13b574c3ca20917d06f896e60245f6bcfa Mon Sep 17 00:00:00 2001 From: MichaelDvP Date: Sat, 17 Dec 2022 13:01:50 +0100 Subject: [PATCH 10/11] Sort languages alphabetical --- interface/src/SignIn.tsx | 22 +++++++++---------- .../src/components/layout/LayoutAuthMenu.tsx | 21 +++++++++--------- interface/src/project/SettingsApplication.tsx | 9 ++++---- 3 files changed, 27 insertions(+), 25 deletions(-) diff --git a/interface/src/SignIn.tsx b/interface/src/SignIn.tsx index 3b991e481..4cda65dec 100644 --- a/interface/src/SignIn.tsx +++ b/interface/src/SignIn.tsx @@ -118,25 +118,25 @@ const SignIn: FC = () => {  DE + - - - + diff --git a/interface/src/components/layout/LayoutAuthMenu.tsx b/interface/src/components/layout/LayoutAuthMenu.tsx index 240979278..fcfe92034 100644 --- a/interface/src/components/layout/LayoutAuthMenu.tsx +++ b/interface/src/components/layout/LayoutAuthMenu.tsx @@ -78,29 +78,30 @@ const LayoutAuthMenu: FC = () => {  EN +  DE + + +  FR +  NL - - -  SE + + +  NO  PL - - -  NO - - - -  FR + + +  SE diff --git a/interface/src/project/SettingsApplication.tsx b/interface/src/project/SettingsApplication.tsx index 64efc93d7..20f642281 100644 --- a/interface/src/project/SettingsApplication.tsx +++ b/interface/src/project/SettingsApplication.tsx @@ -362,12 +362,13 @@ const SettingsApplication: FC = () => { select > English (EN) + Deutsch (DE) - Nederlands (NL) - Svenska (SE) - Polski (PL) - Norsk (NO) Français (FR) + Nederlands (NL) + Norsk (NO) + Polski (PL) + Svenska (SE) {data.led_gpio !== 0 && ( From 44e6bb79a210a50aa6029af51b4c72a557b51462 Mon Sep 17 00:00:00 2001 From: MichaelDvP Date: Sat, 17 Dec 2022 16:32:21 +0100 Subject: [PATCH 11/11] add auxHeaterStatus --- src/devices/boiler.cpp | 6 ++++++ src/devices/boiler.h | 1 + src/locale_translations.h | 1 + 3 files changed, 8 insertions(+) diff --git a/src/devices/boiler.cpp b/src/devices/boiler.cpp index 510d56988..f8f800439 100644 --- a/src/devices/boiler.cpp +++ b/src/devices/boiler.cpp @@ -574,6 +574,11 @@ Boiler::Boiler(uint8_t device_type, int8_t device_id, uint8_t product_id, const FL_(auxHeater), DeviceValueUOM::NONE, MAKE_CF_CB(set_additionalHeater)); + register_device_value(DeviceValueTAG::TAG_DEVICE_DATA, + &auxHeaterStatus_, + DeviceValueType::BOOL, + FL_(auxHeaterStatus), + DeviceValueUOM::NONE); register_device_value(DeviceValueTAG::TAG_DEVICE_DATA, &auxHeaterDelay_, DeviceValueType::USHORT, @@ -1510,6 +1515,7 @@ void Boiler::process_HpSilentMode(std::shared_ptr telegram) { // Boiler(0x08) -B-> All(0x00), ?(0x0488), data: 8E 00 00 00 00 00 01 03 void Boiler::process_HpValve(std::shared_ptr telegram) { + has_bitupdate(telegram, auxHeaterStatus_, 0, 2); has_update(telegram, auxHeatMixValve_, 7); } diff --git a/src/devices/boiler.h b/src/devices/boiler.h index 7ee7137f3..f4cc2e6a7 100644 --- a/src/devices/boiler.h +++ b/src/devices/boiler.h @@ -244,6 +244,7 @@ class Boiler : public EMSdevice { uint8_t auxHeaterOnly_; uint8_t auxHeater_; + uint8_t auxHeaterStatus_; uint16_t auxHeaterDelay_; uint16_t auxHeaterHyst_; int8_t minTempSilent_; diff --git a/src/locale_translations.h b/src/locale_translations.h index fca4abe45..dd13312c6 100644 --- a/src/locale_translations.h +++ b/src/locale_translations.h @@ -370,6 +370,7 @@ MAKE_PSTR_LIST(maxHeatDhw, "maxheatdhw", "heat limit dhw", "Heizgrenze Warmwasse // translations are in order en, de, nl, se, pl, no, fr, .... some missing MAKE_PSTR_LIST(auxHeater, "auxheater", "enable auxilliary heater", "Erlaube Zusatzheizer") +MAKE_PSTR_LIST(auxHeaterStatus, "auxheaterstatus", "auxilliary heater status", "Status Zusatzheizer") MAKE_PSTR_LIST(auxHeaterOnly, "auxheateronly", "auxilliary heater only", "nur Zusatzheizer") MAKE_PSTR_LIST(auxHeaterDelay, "auxheaterdelay", "auxilliary heater on delay", "Zusatzheizer verzögert ein", "Bijverw. vertraagd aan", "Tillskottfördröjning på", "Opóźn. włączenie dogrz.", "Tilleggsvarmer forsinket på", "Chauff app tempo marche") MAKE_PSTR_LIST(auxHeaterHyst, "auxheaterhyst", "auxilliary heater on/off hyst", "Zusatzheizer Schalthysterese", "Aan/uit-hysteresis in verw. bedrijf instellen", "På/av-hystereses Husv.", "Histerez wł/wył Ogrzew.", "På/av-hysterese Oppvar.", "Hystérésis Marche en mode chauffage")