diff --git a/src/core/locale_translations.h b/src/core/locale_translations.h index 32a5b3aa5..fe3f131e6 100644 --- a/src/core/locale_translations.h +++ b/src/core/locale_translations.h @@ -796,6 +796,7 @@ MAKE_TRANSLATION(pumpStatus, "pumpstatus", "pump status (PC1)", "Pumpenstatus HK MAKE_TRANSLATION(mixerStatus, "valvestatus", "mixing valve actuator (VC1)", "Mischerventilposition (VC1)", "positie mixerklep (VC1)", "Shuntventil Status (VC1)", "siłownik zaworu mieszającego (VC1)", "shuntventil status (VC1)", "actionnement vanne mélangeur (VC1)", "karışım vanası aktüatörü (VC1)", "posizione valvola miscela (VC1)", "pohon zmiešavacieho ventilu (VC1)", "pohon směšovacího ventilu (VC1)") MAKE_TRANSLATION(flowTempVf, "flowtempvf", "flow temperature in header (T0/Vf)", "Vorlauftemperatur am Verteiler (T0/Vf)", "aanvoertemperatuur verdeler (T0/Vf)", "Flödestemperatur Fördelare (T0/Vf)", "temperatura zasilania na rozdzielaczu (T0/Vf)", "turtemperatur ved fordeleren (T0/Vf)", "température départ collecteur (T0/Vf)", "başlıkta akış sıcaklığı", "Temperatura di mandata al distributore (T0/Vf)", "teplota prívodu v zberači (T0/Vf)", "teplota přívodu v hlavici (T0/Vf)") MAKE_TRANSLATION(mixerSetTime, "valvesettime", "time to set valve", "Zeit zum einstellen des Ventils", "Inschakeltijd mengklep", "Inställningstid Shuntventil", "czas na ustawienie zaworu", "instillningstid ventil", "délai activation vanne", "vana ayar zamanı", "ritardo attivazione valvola", "čas na nastavenie ventilu", "čas pro nastavení ventilu") +MAKE_TRANSLATION(setDiffPress, "setdiffpress", "set differential pressure", "Pumpensolldruck", "", "Tryckskillnad", "różnica ciśnień", "", "", "", "", "nastaviť diferenčný tlak", "nastavení rozdílového tlaku") // TODO translate // mixer pool MAKE_TRANSLATION(poolSetTemp, "poolsettemp", "pool set temperature", "Sollwert Pooltemperatur", "Streeftemperatuur zwembad", "Pool Temperatur Börvärde", "zadana temperatura basenu", "valgt temp basseng", "température consigne piscine", "hedef havuz sıcaklığı", "temperatura nominale piscina", "nastavená teplota bazéna", "cílová teplota bazénu") diff --git a/src/devices/mixer.cpp b/src/devices/mixer.cpp index ebf990b85..3cc2fc00a 100644 --- a/src/devices/mixer.cpp +++ b/src/devices/mixer.cpp @@ -37,6 +37,9 @@ Mixer::Mixer(uint8_t device_type, uint8_t device_id, uint8_t product_id, const c register_device_value(tag, &flowSetTemp_, DeviceValueType::UINT8, FL_(flowSetTemp), DeviceValueUOM::DEGREES, MAKE_CF_CB(set_flowSetTemp)); register_device_value(tag, &pumpStatus_, DeviceValueType::BOOL, FL_(pumpStatus), DeviceValueUOM::NONE, MAKE_CF_CB(set_pump)); register_device_value(tag, &activated_, DeviceValueType::BOOL, FL_(activated), DeviceValueUOM::NONE, MAKE_CF_CB(set_activated)); + register_device_value(tag, &flowRate_, DeviceValueType::UINT16, FL_(flow), DeviceValueUOM::LH); + register_device_value( + tag, &pressure_, DeviceValueType::UINT8, DeviceValueNumOp::DV_NUMOP_MUL50, FL_(setDiffPress), DeviceValueUOM::MBAR, MAKE_CF_CB(set_pressure)); register_device_value(tag, &setValveTime_, DeviceValueType::UINT8, @@ -91,7 +94,8 @@ void Mixer::process_MMPLUSStatusMessage_HC(std::shared_ptr teleg has_update(telegram, flowTempHc_, 3); // is * 10 has_update(telegram, flowSetTemp_, 5); has_bitupdate(telegram, pumpStatus_, 0, 0); - has_update(telegram, status_, 2); // valve status + has_update(telegram, status_, 2); // valve status + has_update(telegram, flowRate_, 9); // l/h } // Mixer IPM - 0x010C @@ -153,6 +157,7 @@ void Mixer::process_MMPLUSConfigMessage_HC(std::shared_ptr teleg has_update(telegram, activated_, 0); // on = 0xFF has_update(telegram, setValveTime_, 1); // valve runtime in 10 sec, default 120 s, max 600 s has_update(telegram, flowTempOffset_, 2); // Mixer increase [0-20 K] + has_update(telegram, pressure_, 9); } // Thermostat(0x10) -> Mixer(0x20), ?(0x2E1), data: 01 1C 64 00 01 @@ -271,4 +276,14 @@ bool Mixer::set_flowTempOffset(const char * value, const int8_t id) { return false; } +bool Mixer::set_pressure(const char * value, const int8_t id) { + int v; + if (!Helpers::value2number(value, v)) { + return false; + } + uint8_t hc = device_id() - 0x20; + write_command(0x2CD + hc, 9, v / 50, 0x2CD + hc); + return true; +} + } // namespace emsesp diff --git a/src/devices/mixer.h b/src/devices/mixer.h index fb2cc8523..2e4c3475a 100644 --- a/src/devices/mixer.h +++ b/src/devices/mixer.h @@ -45,6 +45,7 @@ class Mixer : public EMSdevice { bool set_activated(const char * value, const int8_t id); bool set_setValveTime(const char * value, const int8_t id); bool set_flowTempOffset(const char * value, const int8_t id); + bool set_pressure(const char * value, const int8_t id); private: uint16_t flowTempHc_; @@ -55,6 +56,8 @@ class Mixer : public EMSdevice { uint8_t activated_; uint8_t setValveTime_; uint8_t flowTempOffset_; + uint16_t flowRate_; // l/h + uint8_t pressure_; // setting 150-750mbar, scale 50 }; } // namespace emsesp