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")