Skip to content

Commit

Permalink
add hpMaxPower fix #1475
Browse files Browse the repository at this point in the history
  • Loading branch information
MichaelDvP committed Dec 4, 2023
1 parent f9b8ac6 commit 7b9a04e
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/devices/boiler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -470,6 +470,7 @@ Boiler::Boiler(uint8_t device_type, int8_t device_id, uint8_t product_id, const
register_device_value(DeviceValueTAG::TAG_DEVICE_DATA, &nrgSuppCooling_, DeviceValueType::ULONG, FL_(nrgSuppCooling), DeviceValueUOM::KWH);
register_device_value(DeviceValueTAG::TAG_DEVICE_DATA, &nrgSuppPool_, DeviceValueType::ULONG, FL_(nrgSuppPool), DeviceValueUOM::KWH);
register_device_value(DeviceValueTAG::TAG_DEVICE_DATA, &hpPower_, DeviceValueType::UINT, DeviceValueNumOp::DV_NUMOP_DIV10, FL_(hpPower), DeviceValueUOM::KW);
register_device_value(DeviceValueTAG::TAG_DEVICE_DATA, &hpMaxPower_, DeviceValueType::UINT, FL_(hpMaxPower), DeviceValueUOM::PERCENT, MAKE_CF_CB(set_hpMaxPower));
register_device_value(DeviceValueTAG::TAG_DEVICE_DATA, &hpCompOn_, DeviceValueType::BOOL, FL_(hpCompOn), DeviceValueUOM::NONE);
register_device_value(DeviceValueTAG::TAG_DEVICE_DATA, &hpActivity_, DeviceValueType::ENUM, FL_(enum_hpactivity), FL_(hpActivity), DeviceValueUOM::NONE);
// register_device_value(DeviceValueTAG::TAG_DEVICE_DATA, &hpHeatingOn_, DeviceValueType::BOOL, FL_(hpHeatingOn), DeviceValueUOM::NONE);
Expand Down Expand Up @@ -1822,6 +1823,7 @@ void Boiler::process_HpSilentMode(std::shared_ptr<const Telegram> telegram) {
has_update(telegram, hpHystCool_, 35); // is / 5, maybe offset swapped with pool
has_update(telegram, hpHystPool_, 33); // is / 5
has_update(telegram, hpCircPumpWw_, 46);
has_update(telegram, hpMaxPower_, 31);
has_update(telegram, silentFrom_, 52); // in steps of 15 min
has_update(telegram, silentTo_, 53); // in steps of 15 min
}
Expand Down Expand Up @@ -2887,6 +2889,15 @@ bool Boiler::set_hpPumpMode(const char * value, const int8_t id) {
return false;
}

bool Boiler::set_hpMaxPower(const char * value, const int8_t id) {
int v;
if (Helpers::value2number(value, v)) {
write_command(0x484, 31, v, 0x484);
return true;
}
return false;
}

bool Boiler::set_vp_cooling(const char * value, const int8_t id) {
bool v;
if (Helpers::value2bool(value, v)) {
Expand Down
2 changes: 2 additions & 0 deletions src/devices/boiler.h
Original file line number Diff line number Diff line change
Expand Up @@ -236,6 +236,7 @@ class Boiler : public EMSdevice {
uint8_t maxHeatComp_;
uint8_t maxHeatHeat_;
uint8_t maxHeatDhw_;
uint8_t hpMaxPower_;

uint8_t pvCooling_;
uint8_t manDefrost_;
Expand Down Expand Up @@ -434,6 +435,7 @@ class Boiler : public EMSdevice {
bool set_pvCooling(const char * value, const int8_t id);
bool set_hpCircPumpWw(const char * value, const int8_t id);
bool set_hpPumpMode(const char * value, const int8_t id);
bool set_hpMaxPower(const char * value, const int8_t id);

bool set_auxLimit(const char * value, const int8_t id);
inline bool set_auxMaxLimit(const char * value, const int8_t id) {
Expand Down
1 change: 1 addition & 0 deletions src/locale_translations.h
Original file line number Diff line number Diff line change
Expand Up @@ -386,6 +386,7 @@ MAKE_TRANSLATION(hpBrineOut, "hpbrineout", "brine out/condenser", "Sole aus/Kond
MAKE_TRANSLATION(hpSwitchValve, "hpswitchvalve", "switch valve", "Schaltventil", "schakelklep", "Växelventil", "zawór przełączający", "skifteventil", "valve de commutation", "ısı pompası aktivitesi", "valvola commutazione pompa di calore")
MAKE_TRANSLATION(hpActivity, "hpactivity", "compressor activity", "Kompressor-Betriebsmodus", "Compressoractiviteit", "Kompressoraktivitet", "pompa ciepła, aktywność sprężarki", "kompressoraktivitet", "", "hp ısı pompası", "attività compressore")

MAKE_TRANSLATION(hpMaxPower, "hpmaxpower", "compressor max power", "max. Kompressorleistung", "", "", "", "", "", "", "") // TODO translate
MAKE_TRANSLATION(hpPower, "hppower", "compressor power output", "Kompressorleistung", "Compressorvermogen", "Kompressoreffekt", "moc wyjściowa sprężarki", "kompressoreffekt", "puissance de sortie compresseur", "ısı pompası güç çıkışı", "potenza uscita compressore")
MAKE_TRANSLATION(hpTc0, "hptc0", "heat carrier return (TC0)", "Kältemittel Rücklauf (TC0)", "Koudemiddel retour (TC0)", "Värmebärare Retur (TC0)", "temperatura nośnika ciepła na powrocie (TC0)", "kjølemiddel retur (TC0)", "retour caloporteur (TC0)", "sıcak su dönüşü (TC0)", "ritorno del refrigerante (TC0)")
MAKE_TRANSLATION(hpTc1, "hptc1", "heat carrier forward (TC1)", "Kältemittel Vorlauf (TC1)", "Koudemiddel aanvoer (TC1)", "Värmebärare Framledning (TC1)", "temperatura nośnika ciepła pierwotna (TC1)", "kjølemiddel tur (TC1)", "avance caloporteur (TC1)", "sıcak su çıkışı (TC1)", "flusso di refrigerante (TC1)")
Expand Down

0 comments on commit 7b9a04e

Please sign in to comment.