mirror of
https://github.com/emsesp/EMS-ESP32.git
synced 2025-12-07 16:29:51 +03:00
add weather compensation, #1642
This commit is contained in:
@@ -64,6 +64,7 @@ Boiler::Boiler(uint8_t device_type, int8_t device_id, uint8_t product_id, const
|
||||
register_telegram_type(0xE6, "UBAParametersPlus", true, MAKE_PF_CB(process_UBAParametersPlus));
|
||||
register_telegram_type(0xE9, "UBAMonitorWWPlus", false, MAKE_PF_CB(process_UBAMonitorWWPlus));
|
||||
register_telegram_type(0xEA, "UBAParameterWWPlus", true, MAKE_PF_CB(process_UBAParameterWWPlus));
|
||||
register_telegram_type(0x28, "WeatherComp", true, MAKE_PF_CB(process_WeatherComp));
|
||||
}
|
||||
|
||||
if (model() == EMSdevice::EMS_DEVICE_FLAG_HEATPUMP) {
|
||||
@@ -241,6 +242,9 @@ Boiler::Boiler(uint8_t device_type, int8_t device_id, uint8_t product_id, const
|
||||
MAKE_CF_CB(set_hyst2_off),
|
||||
0,
|
||||
20);
|
||||
register_device_value(DeviceValueTAG::TAG_DEVICE_DATA, &curveOn_, DeviceValueType::BOOL, FL_(curveOn), DeviceValueUOM::NONE, MAKE_CF_CB(set_curveOn));
|
||||
register_device_value(DeviceValueTAG::TAG_DEVICE_DATA, &curveBase_, DeviceValueType::UINT, FL_(curveBase), DeviceValueUOM::DEGREES, MAKE_CF_CB(set_curveBase));
|
||||
register_device_value(DeviceValueTAG::TAG_DEVICE_DATA, &curveEnd_, DeviceValueType::UINT, FL_(curveEnd), DeviceValueUOM::DEGREES, MAKE_CF_CB(set_curveEnd));
|
||||
}
|
||||
register_device_value(DeviceValueTAG::TAG_DEVICE_DATA,
|
||||
&heatingActivated_,
|
||||
@@ -1994,6 +1998,14 @@ void Boiler::process_HIUSettings(std::shared_ptr<const Telegram> telegram) {
|
||||
has_update(telegram, setReturnTemp_, 2);
|
||||
}
|
||||
|
||||
// Weather compensation, #1642
|
||||
// boiler(0x08) -W-> Me(0x0B), ?(0x28), data: 00 3C 32 10 00 05
|
||||
void Boiler::process_WeatherComp(std::shared_ptr<const Telegram> telegram) {
|
||||
has_update(telegram, curveOn_, 0);
|
||||
has_update(telegram, curveEnd_, 1);
|
||||
has_update(telegram, curveBase_, 2);
|
||||
}
|
||||
|
||||
// HIU Settings
|
||||
bool Boiler::set_keepWarmTemp(const char * value, const int8_t id) {
|
||||
int v;
|
||||
@@ -3137,4 +3149,31 @@ bool Boiler::set_nomPower(const char * value, const int8_t id) {
|
||||
return true;
|
||||
}
|
||||
|
||||
bool Boiler::set_curveOn(const char * value, const int8_t id) {
|
||||
bool v;
|
||||
if (Helpers::value2bool(value, v)) {
|
||||
write_command(0x28, 0, v ? 0xFF : 0);
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
bool Boiler::set_curveBase(const char * value, const int8_t id) {
|
||||
int v;
|
||||
if (!Helpers::value2temperature(value, v)) {
|
||||
return false;
|
||||
}
|
||||
write_command(0x28, 2, v);
|
||||
return true;
|
||||
}
|
||||
|
||||
bool Boiler::set_curveEnd(const char * value, const int8_t id) {
|
||||
int v;
|
||||
if (!Helpers::value2temperature(value, v)) {
|
||||
return false;
|
||||
}
|
||||
write_command(0x28, 1, v);
|
||||
return true;
|
||||
}
|
||||
|
||||
} // namespace emsesp
|
||||
|
||||
@@ -155,6 +155,11 @@ class Boiler : public EMSdevice {
|
||||
uint16_t headertemp_; // see #1317
|
||||
uint16_t heatblock_; // see #1317
|
||||
|
||||
// weather compensation, see #1642
|
||||
uint8_t curveOn_;
|
||||
uint8_t curveBase_;
|
||||
uint8_t curveEnd_;
|
||||
|
||||
// info
|
||||
uint32_t upTimeTotal_; // Operating time
|
||||
uint32_t upTimeControl_; // Operating time control
|
||||
@@ -351,6 +356,7 @@ class Boiler : public EMSdevice {
|
||||
void process_HpSettings3(std::shared_ptr<const Telegram> telegram);
|
||||
void process_HpEnergy(std::shared_ptr<const Telegram> telegram);
|
||||
void process_HpMeters(std::shared_ptr<const Telegram> telegram);
|
||||
void process_WeatherComp(std::shared_ptr<const Telegram> telegram);
|
||||
// HIU
|
||||
void process_HIUSettings(std::shared_ptr<const Telegram> telegram);
|
||||
void process_HIUMonitor(std::shared_ptr<const Telegram> telegram);
|
||||
@@ -523,6 +529,9 @@ class Boiler : public EMSdevice {
|
||||
bool set_delayBoiler(const char * value, const int8_t id);
|
||||
bool set_tempDiffBoiler(const char * value, const int8_t id);
|
||||
*/
|
||||
bool set_curveOn(const char * value, const int8_t id);
|
||||
bool set_curveBase(const char * value, const int8_t id);
|
||||
bool set_curveEnd(const char * value, const int8_t id);
|
||||
|
||||
bool set_nrgHeat(const char * value, const int8_t id);
|
||||
bool set_nrgWw(const char * value, const int8_t id);
|
||||
|
||||
@@ -346,6 +346,10 @@ MAKE_TRANSLATION(pumpMode, "pumpmode", "boiler pump mode", "Kesselpumpen Modus",
|
||||
MAKE_TRANSLATION(headertemp, "headertemp", "low loss header", "Hydr. Weiche", "open verdeler", "", "sprzęgło hydrauliczne", "", "bouteille de déc. hydr.", "isı bloğu gidiş suyu sıc.", "comp. idr.", "nízkostratová hlavica") // TODO translate
|
||||
MAKE_TRANSLATION(heatblock, "heatblock", "heating block", "Wärmezelle", "Aanvoertemp. warmtecel", "", "blok grzewczy", "", "départ corps de chauffe", "Hid.denge kabı sıcaklığı", "mandata scamb. pr.", "vykurovací blok") // TODO translate
|
||||
|
||||
MAKE_TRANSLATION(curveOn, "curveon", "heatingcurve on", "Heizkurve an", "", "", "", "", "", "", "", "") // TODO translate
|
||||
MAKE_TRANSLATION(curveBase, "curvebase", "heatingcurve base", "Heizkurve Basis", "", "", "", "", "", "", "", "") // TODO translate
|
||||
MAKE_TRANSLATION(curveEnd, "curveend", "heatingcurve end", "Heizkurve Ende", "", "", "", "", "", "", "", "") // TODO translate
|
||||
|
||||
// heatpump/compress specific
|
||||
MAKE_TRANSLATION(upTimeTotal, "uptimetotal", "heatpump total uptime", "Wärmpepumpe Gesamtbetriebszeit", "", "", "łączny czas pracy pompy ciepła", "", "", "", "", "celková doba prevádzky tepelného čerpadla") // TODO translate
|
||||
MAKE_TRANSLATION(upTimeControl, "uptimecontrol", "total operating time heat", "Betriebszeit Heizen gesamt", "Totale bedrijfstijd", "Total tid uppvärmning", "łączny czas generowania ciepła", "total driftstid", "durée totale de fonctionnement chauffage", "ısınma toplam işletme süresi", "Tempo di funzionamento totale riscaldamento", "celkový prevádzkový čas tepla")
|
||||
|
||||
Reference in New Issue
Block a user