Skip to content

Commit

Permalink
dhw comf/eco switch off temps #803
Browse files Browse the repository at this point in the history
  • Loading branch information
MichaelDvP committed Dec 19, 2022
1 parent 502613b commit f1dbd30
Show file tree
Hide file tree
Showing 3 changed files with 49 additions and 1 deletion.
36 changes: 35 additions & 1 deletion src/devices/boiler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,7 @@ Boiler::Boiler(uint8_t device_type, int8_t device_id, uint8_t product_id, const
register_telegram_type(0x484, "HPSilentMode", true, MAKE_PF_CB(process_HpSilentMode));
register_telegram_type(0x48B, "HPPumps", true, MAKE_PF_CB(process_HpPumps));
register_telegram_type(0x491, "HPAdditionalHeater", true, MAKE_PF_CB(process_HpAdditionalHeater));
register_telegram_type(0x499, "HPDhwSettings", true, MAKE_PF_CB(process_HpDhwSettings));
}

/*
Expand Down Expand Up @@ -643,6 +644,23 @@ Boiler::Boiler(uint8_t device_type, int8_t device_id, uint8_t product_id, const
MAKE_CF_CB(set_tempDiffCool),
3,
10);
// heatpump DHW settings
register_device_value(DeviceValueTAG::TAG_BOILER_DATA_WW,
&wwComfOffTemp_,
DeviceValueType::UINT,
FL_(wwComfOffTemp),
DeviceValueUOM::DEGREES,
MAKE_CF_CB(set_wwComfOffTemp),
15,
65);
register_device_value(DeviceValueTAG::TAG_BOILER_DATA_WW,
&wwEcoOffTemp_,
DeviceValueType::UINT,
FL_(wwEcoOffTemp),
DeviceValueUOM::DEGREES,
MAKE_CF_CB(set_wwEcoOffTemp),
15,
65);
}

// dhw - DEVICE_DATA_ww topic
Expand Down Expand Up @@ -1558,7 +1576,7 @@ void Boiler::process_HpValve(std::shared_ptr<const Telegram> telegram) {
// Boiler(0x08) -B-> All(0x00), ?(0x048B), data: 00 1E 00 96 00 1E (offset 24)
void Boiler::process_HpPumps(std::shared_ptr<const Telegram> telegram) {
has_update(telegram, tempDiffHeat_, 4); // is * 10
// has_update(telegram, tempDiffCool_, 3); // is * 10
has_update(telegram, tempDiffCool_, 3); // is * 10
}

// 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
Expand All @@ -1569,6 +1587,13 @@ void Boiler::process_HpAdditionalHeater(std::shared_ptr<const Telegram> telegram
has_update(telegram, auxHeaterDelay_, 16); // is / 10
}

// DHW 0x499
// Boiler(0x08) -B-> All(0x00), ?(0x0499), data: 31 33 3F 3B 01
void Boiler::process_HpDhwSettings(std::shared_ptr<const Telegram> telegram) {
has_update(telegram, wwComfOffTemp_, 1);
has_update(telegram, wwEcoOffTemp_, 0);
}

// Settings AM200

// pos 12: off(00)/Keelbypass(01)/(hc1pump(02) only standalone)
Expand Down Expand Up @@ -2577,4 +2602,13 @@ bool Boiler::set_tempDiff(const char * value, const int8_t id) {
return false;
}

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

} // namespace emsesp
11 changes: 11 additions & 0 deletions src/devices/boiler.h
Original file line number Diff line number Diff line change
Expand Up @@ -255,6 +255,9 @@ class Boiler : public EMSdevice {
uint8_t tempDiffHeat_;
uint8_t tempDiffCool_;

uint8_t wwComfOffTemp_;
uint8_t wwEcoOffTemp_;

/*
// Hybrid heatpump with telegram 0xBB is readable and writeable in boiler and thermostat
// thermostat always overwrites settings in boiler
Expand Down Expand Up @@ -310,6 +313,7 @@ class Boiler : public EMSdevice {
void process_HpAdditionalHeater(std::shared_ptr<const Telegram> telegram);
void process_HpValve(std::shared_ptr<const Telegram> telegram);
void process_HpPumps(std::shared_ptr<const Telegram> telegram);
void process_HpDhwSettings(std::shared_ptr<const Telegram> telegram);

// commands - none of these use the additional id parameter
bool set_ww_mode(const char * value, const int8_t id);
Expand Down Expand Up @@ -418,6 +422,13 @@ class Boiler : public EMSdevice {
inline bool set_tempDiffCool(const char * value, const int8_t id) {
return set_tempDiff(value, 3);
}
bool set_wwOffTemp(const char * value, const int8_t id);
inline bool set_wwComfOffTemp(const char * value, const int8_t id) {
return set_wwOffTemp(value, 1);
}
inline bool set_wwEcoOffTemp(const char * value, const int8_t id) {
return set_wwOffTemp(value, 0);
}

/*
bool set_hybridStrategy(const char * value, const int8_t id);
Expand Down
3 changes: 3 additions & 0 deletions src/locale_translations.h
Original file line number Diff line number Diff line change
Expand Up @@ -382,6 +382,9 @@ MAKE_PSTR_LIST(hpHystPool, "hphystpool", "on/off hyst pool", "Schalthysterese Po
MAKE_PSTR_LIST(tempDiffHeat, "tempdiffheat", "temp. diff. TC3/TC0 heat", "Temp.diff. TC3/TC0 Heizen", "Temp.vers. TC3/TC0 verw", "", "", "", "Delta T TC3/TC0 Chauff")
MAKE_PSTR_LIST(tempDiffCool, "tempdiffcool", "temp. diff. TC3/TC0 cool", "Temp.diff. TC3/TC0 Kühlen", "Temp.vers. TC3/TC0 koel.", "", "", "", "Delta T TC3/TC0 Refroid.")

MAKE_PSTR_LIST(wwComfOffTemp, "wwcomfoff", "comfort switch off", "Komfort Ausschalttemp", "Comfort Uitschakeltemp.", "", "", "", "Confort Temp. d'arrêt")
MAKE_PSTR_LIST(wwEcoOffTemp, "wwecooff", "eco switch off", "ECO Ausschalttemp", "Eco Uitschakeltemp.", "", "", "", "Eco Temp. d'arrêt")

// hybrid heatpump
MAKE_PSTR_LIST(hybridStrategy, "hybridstrategy", "hybrid control strategy", "Hybrid Strategie", "Hybride strategie", "Hybrid kontrollstrategi", "strategia sterowania hybrydowego", "hybrid kontrollstrategi", "stratégie contrôle hybride")
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", "basculement par température extérieure")
Expand Down

0 comments on commit f1dbd30

Please sign in to comment.