mirror of
https://github.com/emsesp/EMS-ESP32.git
synced 2025-12-09 17:29:50 +03:00
Merge branch 'dev' into dev2
This commit is contained in:
@@ -482,6 +482,15 @@ Boiler::Boiler(uint8_t device_type, int8_t device_id, uint8_t product_id, const
|
||||
FL_(hpMaxPower),
|
||||
DeviceValueUOM::PERCENT,
|
||||
MAKE_CF_CB(set_hpMaxPower));
|
||||
register_device_value(DeviceValueTAG::TAG_DEVICE_DATA,
|
||||
&hpSetDiffPress_,
|
||||
DeviceValueType::UINT,
|
||||
DeviceValueNumOp::DV_NUMOP_MUL50,
|
||||
FL_(hpSetDiffPress),
|
||||
DeviceValueUOM::MBAR,
|
||||
MAKE_CF_CB(set_hpDiffPress),
|
||||
150,
|
||||
750);
|
||||
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);
|
||||
@@ -1935,6 +1944,10 @@ void Boiler::process_HpMeters(std::shared_ptr<const Telegram> telegram) {
|
||||
has_update(telegram, meterHeat_, 24);
|
||||
}
|
||||
|
||||
void Boiler::process_HpPressure(std::shared_ptr<const Telegram> telegram) {
|
||||
has_update(telegram, hpSetDiffPress_, 9);
|
||||
}
|
||||
|
||||
// HIU unit
|
||||
|
||||
// boiler(0x08) -B-> All(0x00), ?(0x0779), data: 06 05 01 01 AD 02 EF FF FF 00 00 7F FF
|
||||
@@ -2939,6 +2952,15 @@ bool Boiler::set_hpMaxPower(const char * value, const int8_t id) {
|
||||
return false;
|
||||
}
|
||||
|
||||
bool Boiler::set_hpDiffPress(const char * value, const int8_t id) {
|
||||
int v;
|
||||
if (Helpers::value2number(value, v)) {
|
||||
write_command(0x2CC, 9, (uint8_t)(v / 50), 0x2CC);
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
bool Boiler::set_vp_cooling(const char * value, const int8_t id) {
|
||||
bool v;
|
||||
if (Helpers::value2bool(value, v)) {
|
||||
|
||||
@@ -223,6 +223,7 @@ class Boiler : public EMSdevice {
|
||||
uint32_t meterHeat_;
|
||||
uint8_t hpEA0_;
|
||||
uint8_t hpPumpMode_;
|
||||
uint8_t hpSetDiffPress_;
|
||||
|
||||
// Pool unit
|
||||
int8_t poolSetTemp_;
|
||||
@@ -334,6 +335,7 @@ class Boiler : public EMSdevice {
|
||||
void process_HpPool(std::shared_ptr<const Telegram> telegram);
|
||||
void process_HpInput(std::shared_ptr<const Telegram> telegram);
|
||||
void process_HpInConfig(std::shared_ptr<const Telegram> telegram);
|
||||
void process_HpPressure(std::shared_ptr<const Telegram> telegram);
|
||||
void process_HpCooling(std::shared_ptr<const Telegram> telegram);
|
||||
void process_HpHeaterConfig(std::shared_ptr<const Telegram> telegram);
|
||||
void process_HybridHp(std::shared_ptr<const Telegram> telegram);
|
||||
@@ -437,6 +439,7 @@ class Boiler : public EMSdevice {
|
||||
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_hpDiffPress(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) {
|
||||
|
||||
@@ -30,7 +30,7 @@ Mixer::Mixer(uint8_t device_type, uint8_t device_id, uint8_t product_id, const c
|
||||
if (flags == EMSdevice::EMS_DEVICE_FLAG_MMPLUS) {
|
||||
register_telegram_type(device_id - 0x20 + 0x02D7, "MMPLUSStatusMessage_HC", false, MAKE_PF_CB(process_MMPLUSStatusMessage_HC));
|
||||
// register_telegram_type(device_id - 0x20 + 0x02E1, "MMPLUSSetMessage_HC", true, MAKE_PF_CB(process_MMPLUSSetMessage_HC));
|
||||
register_telegram_type(device_id - 0x20 + 0x02CD, "MMPLUSSetMessage_HC", false, MAKE_PF_CB(process_MMPLUSSetMessage_HC));
|
||||
register_telegram_type((device_id - 0x20) * 2 + 0x02CC, "MMPLUSSetMessage_HC", false, MAKE_PF_CB(process_MMPLUSSetMessage_HC));
|
||||
hc_ = device_id - 0x20 + 1;
|
||||
uint8_t tag = DeviceValueTAG::TAG_HC1 + hc_ - 1;
|
||||
register_device_value(tag, &flowTempHc_, DeviceValueType::USHORT, DeviceValueNumOp::DV_NUMOP_DIV10, FL_(flowTempHc), DeviceValueUOM::DEGREES);
|
||||
@@ -151,7 +151,7 @@ void Mixer::process_MMConfigMessage(std::shared_ptr<const Telegram> telegram) {
|
||||
has_update(telegram, setValveTime_, 1); // valve runtime in 10 sec, max 120 s
|
||||
}
|
||||
|
||||
// Mixer Setting 0x2CD
|
||||
// Mixer Setting 0x2CC
|
||||
void Mixer::process_MMPLUSSetMessage_HC(std::shared_ptr<const Telegram> telegram) {
|
||||
has_update(telegram, activated_, 0); // on = 0xFF
|
||||
has_update(telegram, setValveTime_, 1); // valve runtime in 10 sec, max 120 s
|
||||
@@ -241,7 +241,7 @@ bool Mixer::set_activated(const char * value, const int8_t id) {
|
||||
}
|
||||
if (flags() == EMSdevice::EMS_DEVICE_FLAG_MMPLUS) {
|
||||
uint8_t hc = device_id() - 0x20;
|
||||
write_command(0x2CD + hc, 0, b ? 0xFF : 0, 0x2CD + hc);
|
||||
write_command(0x2CC + hc * 2, 0, b ? 0xFF : 0, 0x2CC + hc * 2);
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
@@ -260,7 +260,7 @@ bool Mixer::set_setValveTime(const char * value, const int8_t id) {
|
||||
if (flags() == EMSdevice::EMS_DEVICE_FLAG_MMPLUS) {
|
||||
v = (v + 5) / 10;
|
||||
uint8_t hc = device_id() - 0x20;
|
||||
write_command(0x2CD + hc, 1, v, 0x2CD + hc);
|
||||
write_command(0x2CC + hc * 2, 1, v, 0x2CC + hc * 2);
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
@@ -273,7 +273,7 @@ bool Mixer::set_flowTempOffset(const char * value, const int8_t id) {
|
||||
}
|
||||
if (flags() == EMSdevice::EMS_DEVICE_FLAG_MMPLUS) {
|
||||
uint8_t hc = device_id() - 0x20;
|
||||
write_command(0x2CD + hc, 2, v, 0x2CD + hc);
|
||||
write_command(0x2CC + hc * 2, 2, v, 0x2CC + hc * 2);
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
|
||||
Reference in New Issue
Block a user