mirror of
https://github.com/emsesp/EMS-ESP32.git
synced 2025-12-06 15:59:52 +03:00
wwprio to mixer, boiler
This commit is contained in:
@@ -67,6 +67,7 @@ Boiler::Boiler(uint8_t device_type, int8_t device_id, uint8_t product_id, const
|
|||||||
register_telegram_type(0xEA, "UBAParameterWWPlus", true, MAKE_PF_CB(process_UBAParameterWWPlus));
|
register_telegram_type(0xEA, "UBAParameterWWPlus", true, MAKE_PF_CB(process_UBAParameterWWPlus));
|
||||||
register_telegram_type(0x28, "WeatherComp", true, MAKE_PF_CB(process_WeatherComp));
|
register_telegram_type(0x28, "WeatherComp", true, MAKE_PF_CB(process_WeatherComp));
|
||||||
register_telegram_type(0x2E0, "UBASetPoints", false, MAKE_PF_CB(process_UBASetPoints2));
|
register_telegram_type(0x2E0, "UBASetPoints", false, MAKE_PF_CB(process_UBASetPoints2));
|
||||||
|
register_telegram_type(0x2CC, "HPPressure", true, MAKE_PF_CB(process_HpPressure));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (isHeatPump()) {
|
if (isHeatPump()) {
|
||||||
@@ -89,7 +90,6 @@ Boiler::Boiler(uint8_t device_type, int8_t device_id, uint8_t product_id, const
|
|||||||
register_telegram_type(0x49D, "HPSettings3", true, MAKE_PF_CB(process_HpSettings3));
|
register_telegram_type(0x49D, "HPSettings3", true, MAKE_PF_CB(process_HpSettings3));
|
||||||
register_telegram_type(0x4AE, "HPEnergy", true, MAKE_PF_CB(process_HpEnergy));
|
register_telegram_type(0x4AE, "HPEnergy", true, MAKE_PF_CB(process_HpEnergy));
|
||||||
register_telegram_type(0x4AF, "HPMeters", true, MAKE_PF_CB(process_HpMeters));
|
register_telegram_type(0x4AF, "HPMeters", true, MAKE_PF_CB(process_HpMeters));
|
||||||
register_telegram_type(0x2CC, "HPPressure", true, MAKE_PF_CB(process_HpPressure));
|
|
||||||
register_telegram_type(0x4A5, "HPFan", true, MAKE_PF_CB(process_HpFan));
|
register_telegram_type(0x4A5, "HPFan", true, MAKE_PF_CB(process_HpFan));
|
||||||
register_telegram_type(0x4AA, "HPPower2", true, MAKE_PF_CB(process_HpPower2));
|
register_telegram_type(0x4AA, "HPPower2", true, MAKE_PF_CB(process_HpPower2));
|
||||||
register_telegram_type(0x4A7, "HPPowerLimit", true, MAKE_PF_CB(process_HpPowerLimit));
|
register_telegram_type(0x4A7, "HPPowerLimit", true, MAKE_PF_CB(process_HpPowerLimit));
|
||||||
@@ -1104,6 +1104,7 @@ Boiler::Boiler(uint8_t device_type, int8_t device_id, uint8_t product_id, const
|
|||||||
DeviceValueNumOp::DV_NUMOP_DIV10,
|
DeviceValueNumOp::DV_NUMOP_DIV10,
|
||||||
FL_(wwCylMiddleTemp),
|
FL_(wwCylMiddleTemp),
|
||||||
DeviceValueUOM::DEGREES);
|
DeviceValueUOM::DEGREES);
|
||||||
|
register_device_value(DeviceValueTAG::TAG_DHW1, &wwPrio_, DeviceValueType::BOOL, FL_(wwprio), DeviceValueUOM::NONE, MAKE_CF_CB(set_ww_prio));
|
||||||
register_device_value(DeviceValueTAG::TAG_DHW1, &wwStarts_, DeviceValueType::UINT24, FL_(wwStarts), DeviceValueUOM::NONE);
|
register_device_value(DeviceValueTAG::TAG_DHW1, &wwStarts_, DeviceValueType::UINT24, FL_(wwStarts), DeviceValueUOM::NONE);
|
||||||
register_device_value(DeviceValueTAG::TAG_DHW1, &wwWorkM_, DeviceValueType::TIME, FL_(wwWorkM), DeviceValueUOM::MINUTES);
|
register_device_value(DeviceValueTAG::TAG_DHW1, &wwWorkM_, DeviceValueType::TIME, FL_(wwWorkM), DeviceValueUOM::MINUTES);
|
||||||
|
|
||||||
@@ -2225,6 +2226,7 @@ void Boiler::process_HpMeters(std::shared_ptr<const Telegram> telegram) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void Boiler::process_HpPressure(std::shared_ptr<const Telegram> telegram) {
|
void Boiler::process_HpPressure(std::shared_ptr<const Telegram> telegram) {
|
||||||
|
has_update(telegram, wwPrio_, 3);
|
||||||
has_update(telegram, hpSetDiffPress_, 9);
|
has_update(telegram, hpSetDiffPress_, 9);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -2458,6 +2460,16 @@ bool Boiler::set_ww_disinfect_temp(const char * value, const int8_t id) {
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Set the dhw priority
|
||||||
|
bool Boiler::set_ww_prio(const char * value, const int8_t id) {
|
||||||
|
bool b;
|
||||||
|
if (!Helpers::value2bool(value, b)) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
write_command(0x2CC, 3, b ? 0xFF : 0, 0x2CC);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
// flow temp
|
// flow temp
|
||||||
bool Boiler::set_flow_temp(const char * value, const int8_t id) {
|
bool Boiler::set_flow_temp(const char * value, const int8_t id) {
|
||||||
int v;
|
int v;
|
||||||
|
|||||||
@@ -100,6 +100,7 @@ class Boiler : public EMSdevice {
|
|||||||
uint8_t wwAlternatingOper_; // alternating operation on/off
|
uint8_t wwAlternatingOper_; // alternating operation on/off
|
||||||
uint8_t wwAltOpPrioHeat_; // alternating operation, prioritize heat time
|
uint8_t wwAltOpPrioHeat_; // alternating operation, prioritize heat time
|
||||||
uint8_t wwAltOpPrioWw_; // alternating operation, prioritize dhw time
|
uint8_t wwAltOpPrioWw_; // alternating operation, prioritize dhw time
|
||||||
|
uint8_t wwPrio_;
|
||||||
|
|
||||||
// special function
|
// special function
|
||||||
uint8_t forceHeatingOff_;
|
uint8_t forceHeatingOff_;
|
||||||
@@ -424,6 +425,7 @@ class Boiler : public EMSdevice {
|
|||||||
bool set_ww_maxtemp(const char * value, const int8_t id);
|
bool set_ww_maxtemp(const char * value, const int8_t id);
|
||||||
bool set_ww_flowTempOffset(const char * value, const int8_t id);
|
bool set_ww_flowTempOffset(const char * value, const int8_t id);
|
||||||
bool set_ww_chargeOptimization(const char * value, const int8_t id);
|
bool set_ww_chargeOptimization(const char * value, const int8_t id);
|
||||||
|
bool set_ww_prio(const char * value, const int8_t id);
|
||||||
bool set_flow_temp(const char * value, const int8_t id);
|
bool set_flow_temp(const char * value, const int8_t id);
|
||||||
bool set_burn_power(const char * value, const int8_t id);
|
bool set_burn_power(const char * value, const int8_t id);
|
||||||
bool set_heating_activated(const char * value, const int8_t id);
|
bool set_heating_activated(const char * value, const int8_t id);
|
||||||
|
|||||||
@@ -31,7 +31,7 @@ Mixer::Mixer(uint8_t device_type, uint8_t device_id, uint8_t product_id, const c
|
|||||||
if (flags == EMSdevice::EMS_DEVICE_FLAG_MMPLUS) {
|
if (flags == EMSdevice::EMS_DEVICE_FLAG_MMPLUS) {
|
||||||
register_telegram_type(device_id - 0x20 + 0x02D7, "MMPLUSStatusMessage", false, MAKE_PF_CB(process_MMPLUSStatusMessage_HC));
|
register_telegram_type(device_id - 0x20 + 0x02D7, "MMPLUSStatusMessage", false, MAKE_PF_CB(process_MMPLUSStatusMessage_HC));
|
||||||
// register_telegram_type(device_id - 0x20 + 0x02E1, "MMPLUSSetMessage", true, MAKE_PF_CB(process_MMPLUSSetMessage_HC));
|
// register_telegram_type(device_id - 0x20 + 0x02E1, "MMPLUSSetMessage", true, MAKE_PF_CB(process_MMPLUSSetMessage_HC));
|
||||||
register_telegram_type(device_id - 0x20 + 0x02CD, "MMPLUSConfigMessage", true, MAKE_PF_CB(process_MMPLUSConfigMessage_HC));
|
register_telegram_type(device_id - 0x20 + 0x02CD, "MMPLUSConfigMessage", false, MAKE_PF_CB(process_MMPLUSConfigMessage_HC));
|
||||||
register_device_value(tag, &flowTempHc_, DeviceValueType::UINT16, DeviceValueNumOp::DV_NUMOP_DIV10, FL_(flowTempHc), DeviceValueUOM::DEGREES);
|
register_device_value(tag, &flowTempHc_, DeviceValueType::UINT16, DeviceValueNumOp::DV_NUMOP_DIV10, FL_(flowTempHc), DeviceValueUOM::DEGREES);
|
||||||
register_device_value(tag, &status_, DeviceValueType::UINT8, FL_(mixerStatus), DeviceValueUOM::PERCENT);
|
register_device_value(tag, &status_, DeviceValueType::UINT8, FL_(mixerStatus), DeviceValueUOM::PERCENT);
|
||||||
register_device_value(tag, &flowSetTemp_, DeviceValueType::UINT8, FL_(flowSetTemp), DeviceValueUOM::DEGREES, MAKE_CF_CB(set_flowSetTemp));
|
register_device_value(tag, &flowSetTemp_, DeviceValueType::UINT8, FL_(flowSetTemp), DeviceValueUOM::DEGREES, MAKE_CF_CB(set_flowSetTemp));
|
||||||
@@ -50,7 +50,8 @@ Mixer::Mixer(uint8_t device_type, uint8_t device_id, uint8_t product_id, const c
|
|||||||
10,
|
10,
|
||||||
600);
|
600);
|
||||||
register_device_value(tag, &flowTempOffset_, DeviceValueType::UINT8, FL_(flowtempoffset), DeviceValueUOM::K, MAKE_CF_CB(set_flowTempOffset), 0, 20);
|
register_device_value(tag, &flowTempOffset_, DeviceValueType::UINT8, FL_(flowtempoffset), DeviceValueUOM::K, MAKE_CF_CB(set_flowTempOffset), 0, 20);
|
||||||
// EMSESP::send_read_request(device_id - 0x20 + 0x02CD, device_id, 0, 3);
|
register_device_value(tag, &wwprio_, DeviceValueType::BOOL, FL_(wwprio), DeviceValueUOM::NONE, MAKE_CF_CB(set_wwprio));
|
||||||
|
EMSESP::send_read_request(device_id - 0x20 + 0x02CD, device_id, 0, 3);
|
||||||
}
|
}
|
||||||
|
|
||||||
// EMS 1.0
|
// EMS 1.0
|
||||||
@@ -157,6 +158,7 @@ void Mixer::process_MMPLUSConfigMessage_HC(std::shared_ptr<const Telegram> teleg
|
|||||||
has_update(telegram, activated_, 0); // on = 0xFF
|
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, 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, flowTempOffset_, 2); // Mixer increase [0-20 K]
|
||||||
|
has_update(telegram, wwprio_, 3);
|
||||||
has_update(telegram, pressure_, 9);
|
has_update(telegram, pressure_, 9);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -286,4 +288,14 @@ bool Mixer::set_pressure(const char * value, const int8_t id) {
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool Mixer::set_wwprio(const char * value, const int8_t id) {
|
||||||
|
bool b;
|
||||||
|
if (!Helpers::value2bool(value, b)) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
uint8_t hc = device_id() - 0x20;
|
||||||
|
write_command(0x2CD + hc, 3, b ? 0xFF: 0, 0x2CD + hc);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
} // namespace emsesp
|
} // namespace emsesp
|
||||||
|
|||||||
@@ -46,6 +46,7 @@ class Mixer : public EMSdevice {
|
|||||||
bool set_setValveTime(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_flowTempOffset(const char * value, const int8_t id);
|
||||||
bool set_pressure(const char * value, const int8_t id);
|
bool set_pressure(const char * value, const int8_t id);
|
||||||
|
bool set_wwprio(const char * value, const int8_t id);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
uint16_t flowTempHc_;
|
uint16_t flowTempHc_;
|
||||||
@@ -58,6 +59,7 @@ class Mixer : public EMSdevice {
|
|||||||
uint8_t flowTempOffset_;
|
uint8_t flowTempOffset_;
|
||||||
uint16_t flowRate_; // l/h
|
uint16_t flowRate_; // l/h
|
||||||
uint8_t pressure_; // setting 150-750mbar, scale 50
|
uint8_t pressure_; // setting 150-750mbar, scale 50
|
||||||
|
uint8_t wwprio_;
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace emsesp
|
} // namespace emsesp
|
||||||
|
|||||||
Reference in New Issue
Block a user