mirror of
https://github.com/emsesp/EMS-ESP32.git
synced 2025-12-08 16:59:50 +03:00
rename hybrid entities
This commit is contained in:
@@ -205,12 +205,12 @@ Boiler::Boiler(uint8_t device_type, int8_t device_id, uint8_t product_id, const
|
||||
// Hybrid Heatpump
|
||||
if (model() == EMSdevice::EMS_DEVICE_FLAG_HYBRID) {
|
||||
register_device_value(DeviceValueTAG::TAG_BOILER_DATA,
|
||||
&gasPriceMode_,
|
||||
&hybridStrategy_,
|
||||
DeviceValueType::ENUM,
|
||||
FL_(enum_gasPriceMode),
|
||||
FL_(gasPriceMode),
|
||||
FL_(enum_hybridStrategy),
|
||||
FL_(hybridStrategy),
|
||||
DeviceValueUOM::NONE,
|
||||
MAKE_CF_CB(set_gasPriceMode));
|
||||
MAKE_CF_CB(set_hybridStrategy));
|
||||
register_device_value(DeviceValueTAG::TAG_BOILER_DATA,
|
||||
&switchOverTemp_,
|
||||
DeviceValueType::UINT,
|
||||
@@ -219,12 +219,12 @@ Boiler::Boiler(uint8_t device_type, int8_t device_id, uint8_t product_id, const
|
||||
DeviceValueUOM::DEGREES,
|
||||
MAKE_CF_CB(set_switchOverTemp));
|
||||
register_device_value(DeviceValueTAG::TAG_BOILER_DATA,
|
||||
&gasPriceRatio_,
|
||||
&energyCostRatio_,
|
||||
DeviceValueType::UINT,
|
||||
FL_(div10),
|
||||
FL_(gasPriceRatio),
|
||||
FL_(energyCostRatio),
|
||||
DeviceValueUOM::NONE,
|
||||
MAKE_CF_CB(set_gasPriceRatio));
|
||||
MAKE_CF_CB(set_energyCostRatio));
|
||||
register_device_value(DeviceValueTAG::TAG_BOILER_DATA,
|
||||
&fossileFactor_,
|
||||
DeviceValueType::UINT,
|
||||
@@ -240,12 +240,12 @@ Boiler::Boiler(uint8_t device_type, int8_t device_id, uint8_t product_id, const
|
||||
DeviceValueUOM::NONE,
|
||||
MAKE_CF_CB(set_electricFactor));
|
||||
register_device_value(DeviceValueTAG::TAG_BOILER_DATA,
|
||||
&waitBoiler_,
|
||||
&delayBoiler_,
|
||||
DeviceValueType::UINT,
|
||||
nullptr,
|
||||
FL_(waitBoiler),
|
||||
FL_(delayBoiler),
|
||||
DeviceValueUOM::MINUTES,
|
||||
MAKE_CF_CB(set_waitBoiler));
|
||||
MAKE_CF_CB(set_delayBoiler));
|
||||
register_device_value(DeviceValueTAG::TAG_BOILER_DATA,
|
||||
&tempDiffBoiler_,
|
||||
DeviceValueType::UINT,
|
||||
@@ -1050,16 +1050,15 @@ void Boiler::process_UBAMaintenanceData(std::shared_ptr<const Telegram> telegram
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// 0xBB Heatpump optimization
|
||||
// Boiler(0x08) -> Me(0x0B), ?(0xBB), data: 00 00 00 00 00 00 00 00 00 00 00 FF 02 0F 1E 0B 1A 00 14 03
|
||||
void Boiler::process_HybridHp(std::shared_ptr<const Telegram> telegram) {
|
||||
has_enumupdate(telegram, gasPriceMode_, 12, 1); // cost = 2, temperature = 3, mix = 4
|
||||
has_enumupdate(telegram, hybridStrategy_, 12, 1); // cost = 2, temperature = 3, mix = 4
|
||||
has_update(telegram, switchOverTemp_, 13); // full degrees
|
||||
has_update(telegram, gasPriceRatio_, 14); // is *10
|
||||
has_update(telegram, energyCostRatio_, 14); // is *10
|
||||
has_update(telegram, fossileFactor_, 15); // is * 10
|
||||
has_update(telegram, electricFactor_, 16); // is * 10
|
||||
has_update(telegram, waitBoiler_, 18); // minutes
|
||||
has_update(telegram, delayBoiler_, 18); // minutes
|
||||
has_update(telegram, tempDiffBoiler_, 19); // relative degrees
|
||||
}
|
||||
|
||||
@@ -1067,14 +1066,15 @@ void Boiler::process_HybridHp(std::shared_ptr<const Telegram> telegram) {
|
||||
* Settings
|
||||
*/
|
||||
|
||||
bool Boiler::set_gasPriceMode(const char * value, const int8_t id) {
|
||||
bool Boiler::set_hybridStrategy(const char * value, const int8_t id) {
|
||||
uint8_t v;
|
||||
if (!Helpers::value2enum(value, v, FL_(enum_gasPriceMode))) {
|
||||
if (!Helpers::value2enum(value, v, FL_(enum_hybridStrategy))) {
|
||||
return false;
|
||||
}
|
||||
write_command(0xBB, 12, v + 1, 0xBB);
|
||||
return true;
|
||||
}
|
||||
|
||||
bool Boiler::set_switchOverTemp(const char * value, const int8_t id) {
|
||||
int v;
|
||||
if (!Helpers::value2temperature(value, v)) {
|
||||
@@ -1083,7 +1083,8 @@ bool Boiler::set_switchOverTemp(const char * value, const int8_t id) {
|
||||
write_command(0xBB, 13, v, 0xBB);
|
||||
return true;
|
||||
}
|
||||
bool Boiler::set_gasPriceRatio(const char * value, const int8_t id) {
|
||||
|
||||
bool Boiler::set_energyCostRatio(const char * value, const int8_t id) {
|
||||
float v;
|
||||
if (!Helpers::value2float(value, v)) {
|
||||
return false;
|
||||
@@ -1091,6 +1092,7 @@ bool Boiler::set_gasPriceRatio(const char * value, const int8_t id) {
|
||||
write_command(0xBB, 14, (uint8_t)(v * 10), 0xBB);
|
||||
return true;
|
||||
}
|
||||
|
||||
bool Boiler::set_fossileFactor(const char * value, const int8_t id) {
|
||||
float v;
|
||||
if (!Helpers::value2float(value, v)) {
|
||||
@@ -1099,6 +1101,7 @@ bool Boiler::set_fossileFactor(const char * value, const int8_t id) {
|
||||
write_command(0xBB, 15, (uint8_t)(v * 10), 0xBB);
|
||||
return true;
|
||||
}
|
||||
|
||||
bool Boiler::set_electricFactor(const char * value, const int8_t id) {
|
||||
float v;
|
||||
if (!Helpers::value2float(value, v)) {
|
||||
@@ -1107,7 +1110,8 @@ bool Boiler::set_electricFactor(const char * value, const int8_t id) {
|
||||
write_command(0xBB, 16, (uint8_t)(v * 10), 0xBB);
|
||||
return true;
|
||||
}
|
||||
bool Boiler::set_waitBoiler(const char * value, const int8_t id) {
|
||||
|
||||
bool Boiler::set_delayBoiler(const char * value, const int8_t id) {
|
||||
int v;
|
||||
if (!Helpers::value2number(value, v)) {
|
||||
return false;
|
||||
@@ -1115,6 +1119,7 @@ bool Boiler::set_waitBoiler(const char * value, const int8_t id) {
|
||||
write_command(0xBB, 18, v, 0xBB);
|
||||
return true;
|
||||
}
|
||||
|
||||
bool Boiler::set_tempDiffBoiler(const char * value, const int8_t id) {
|
||||
int v;
|
||||
if (!Helpers::value2temperature(value, v, true)) {
|
||||
|
||||
@@ -194,12 +194,12 @@ class Boiler : public EMSdevice {
|
||||
int8_t poolSetTemp_;
|
||||
|
||||
// HybridHP
|
||||
uint8_t gasPriceMode_; // cost = 2, temperature = 3, mix = 4
|
||||
uint8_t hybridStrategy_; // cost = 2, temperature = 3, mix = 4
|
||||
uint8_t switchOverTemp_; // degrees
|
||||
uint8_t gasPriceRatio_; // is *10
|
||||
uint8_t energyCostRatio_; // is *10
|
||||
uint8_t fossileFactor_; // is * 10
|
||||
uint8_t electricFactor_; // is * 10
|
||||
uint8_t waitBoiler_; // minutes
|
||||
uint8_t delayBoiler_; // minutes
|
||||
uint8_t tempDiffBoiler_; // relative temperature degrees
|
||||
|
||||
void process_UBAParameterWW(std::shared_ptr<const Telegram> telegram);
|
||||
@@ -267,12 +267,12 @@ class Boiler : public EMSdevice {
|
||||
bool set_ww_hyst_off(const char * value, const int8_t id);
|
||||
bool set_pool_temp(const char * value, const int8_t id);
|
||||
|
||||
bool set_gasPriceMode(const char * value, const int8_t id);
|
||||
bool set_hybridStrategy(const char * value, const int8_t id);
|
||||
bool set_switchOverTemp(const char * value, const int8_t id);
|
||||
bool set_gasPriceRatio(const char * value, const int8_t id);
|
||||
bool set_energyCostRatio(const char * value, const int8_t id);
|
||||
bool set_fossileFactor(const char * value, const int8_t id);
|
||||
bool set_electricFactor(const char * value, const int8_t id);
|
||||
bool set_waitBoiler(const char * value, const int8_t id);
|
||||
bool set_delayBoiler(const char * value, const int8_t id);
|
||||
bool set_tempDiffBoiler(const char * value, const int8_t id);
|
||||
};
|
||||
|
||||
|
||||
@@ -221,6 +221,12 @@ MAKE_PSTR(tag_wwc1, "wwc1")
|
||||
MAKE_PSTR(tag_wwc2, "wwc2")
|
||||
MAKE_PSTR(tag_wwc3, "wwc3")
|
||||
MAKE_PSTR(tag_wwc4, "wwc4")
|
||||
MAKE_PSTR(tag_wwc5, "wwc5")
|
||||
MAKE_PSTR(tag_wwc6, "wwc6")
|
||||
MAKE_PSTR(tag_wwc7, "wwc7")
|
||||
MAKE_PSTR(tag_wwc8, "wwc8")
|
||||
MAKE_PSTR(tag_wwc9, "wwc9")
|
||||
MAKE_PSTR(tag_wwc10, "wwc10")
|
||||
MAKE_PSTR(tag_hs1, "hs1")
|
||||
MAKE_PSTR(tag_hs2, "hs2")
|
||||
MAKE_PSTR(tag_hs3, "hs3")
|
||||
@@ -510,14 +516,14 @@ MAKE_PSTR_LIST(hpPl1, F("hppl1"), F("low pressure side temperature (PL1)"))
|
||||
MAKE_PSTR_LIST(hpPh1, F("hpph1"), F("high pressure side temperature (PH1)"))
|
||||
|
||||
// hybrid heatpump
|
||||
MAKE_PSTR_LIST(enum_gasPriceMode, F("co2"), F("cost"), F("temperature"), F("mix"))
|
||||
MAKE_PSTR_LIST(gasPriceMode, F("gaspricemode"), F("gas price mode"))
|
||||
MAKE_PSTR_LIST(switchOverTemp, F("switchovertemp"), F("switch over temperature"))
|
||||
MAKE_PSTR_LIST(gasPriceRatio, F("gaspriceratio"), F("gas price ratio"))
|
||||
MAKE_PSTR_LIST(fossileFactor, F("fossilefactor"), F("fossile factor"))
|
||||
MAKE_PSTR_LIST(electricFactor, F("electricfactor"), F("electric factor"))
|
||||
MAKE_PSTR_LIST(waitBoiler, F("waitboiler"), F("wait boiler"))
|
||||
MAKE_PSTR_LIST(tempDiffBoiler, F("tempdiffboiler"), F("temperature difference boiler"))
|
||||
MAKE_PSTR_LIST(enum_hybridStrategy, F("co2-optimized"), F("cost-optimized"), F("outside-temp-switched"), F("co2-cost-mix"))
|
||||
MAKE_PSTR_LIST(hybridStrategy, F("hybridstrategy"), F("hybrid control strategy"))
|
||||
MAKE_PSTR_LIST(switchOverTemp, F("switchovertemp"), F("outside switchover temperature"))
|
||||
MAKE_PSTR_LIST(energyCostRatio, F("energycostratio"), F("energy cost ratio"))
|
||||
MAKE_PSTR_LIST(fossileFactor, F("fossilefactor"), F("fossile energy factor"))
|
||||
MAKE_PSTR_LIST(electricFactor, F("electricfactor"), F("electric energy factor"))
|
||||
MAKE_PSTR_LIST(delayBoiler, F("delayboiler"), F("delay boiler support"))
|
||||
MAKE_PSTR_LIST(tempDiffBoiler, F("tempdiffboiler"), F("tempediff boiler support"))
|
||||
|
||||
// the following are dhw for the boiler and automatically tagged with 'ww'
|
||||
MAKE_PSTR_LIST(wwSelTemp, F("wwseltemp"), F("selected temperature"))
|
||||
@@ -671,6 +677,7 @@ MAKE_PSTR_LIST(poolSetTemp, F("poolsettemp"), F("pool set temperature"))
|
||||
MAKE_PSTR_LIST(poolTemp, F("pooltemp"), F("pool temperature"))
|
||||
MAKE_PSTR_LIST(poolShuntStatus, F("poolshuntstatus"), F("pool shunt status opening/closing"))
|
||||
MAKE_PSTR_LIST(poolShunt, F("poolshunt"), F("pool shunt open/close (0% = pool / 100% = heat)"))
|
||||
MAKE_PSTR_LIST(hydrTemp, F("hydrTemp"), F("hydraulic header temperature"))
|
||||
|
||||
// solar
|
||||
MAKE_PSTR_LIST(collectorTemp, F("collectortemp"), F("collector temperature (TS1)"))
|
||||
|
||||
Reference in New Issue
Block a user