mirror of
https://github.com/emsesp/EMS-ESP32.git
synced 2025-12-09 17:29:50 +03:00
Add silentmode from/to #896
This commit is contained in:
@@ -526,6 +526,20 @@ Boiler::Boiler(uint8_t device_type, int8_t device_id, uint8_t product_id, const
|
||||
FL_(silentMode),
|
||||
DeviceValueUOM::NONE,
|
||||
MAKE_CF_CB(set_silentMode));
|
||||
register_device_value(DeviceValueTAG::TAG_DEVICE_DATA,
|
||||
&silentFrom_,
|
||||
DeviceValueType::UINT,
|
||||
DeviceValueNumOp::DV_NUMOP_MUL15,
|
||||
FL_(silentFrom),
|
||||
DeviceValueUOM::MINUTES,
|
||||
MAKE_CF_CB(set_silentFrom));
|
||||
register_device_value(DeviceValueTAG::TAG_DEVICE_DATA,
|
||||
&silentTo_,
|
||||
DeviceValueType::UINT,
|
||||
DeviceValueNumOp::DV_NUMOP_MUL15,
|
||||
FL_(silentTo),
|
||||
DeviceValueUOM::MINUTES,
|
||||
MAKE_CF_CB(set_silentTo));
|
||||
register_device_value(DeviceValueTAG::TAG_DEVICE_DATA,
|
||||
&minTempSilent_,
|
||||
DeviceValueType::INT,
|
||||
@@ -1450,6 +1464,8 @@ void Boiler::process_HpSilentMode(std::shared_ptr<const Telegram> telegram) {
|
||||
has_update(telegram, hpHystCool_, 35); // is / 5, maybe offset swapped with pool
|
||||
has_update(telegram, hpHystPool_, 33); // is / 5
|
||||
has_update(telegram, hpCircPumpWw_, 46);
|
||||
has_update(telegram, silentFrom_, 52); // in steps of 15 min
|
||||
has_update(telegram, silentTo_, 53); // in steps of 15 min
|
||||
}
|
||||
|
||||
// Boiler(0x08) -B-> All(0x00), ?(0x0488), data: 8E 00 00 00 00 00 01 03
|
||||
@@ -2284,6 +2300,24 @@ bool Boiler::set_silentMode(const char * value, const int8_t id) {
|
||||
return true;
|
||||
}
|
||||
|
||||
bool Boiler::set_silentFrom(const char * value, const int8_t id) {
|
||||
int v;
|
||||
if (!Helpers::value2number(value, v)) {
|
||||
return false;
|
||||
}
|
||||
write_command(0x484, 52, v / 15, 0x484);
|
||||
return true;
|
||||
}
|
||||
|
||||
bool Boiler::set_silentTo(const char * value, const int8_t id) {
|
||||
int v;
|
||||
if (!Helpers::value2number(value, v)) {
|
||||
return false;
|
||||
}
|
||||
write_command(0x484, 53, v / 15, 0x484);
|
||||
return true;
|
||||
}
|
||||
|
||||
bool Boiler::set_minTempSilent(const char * value, const int8_t id) {
|
||||
int v;
|
||||
if (Helpers::value2temperature(value, v)) {
|
||||
|
||||
@@ -222,6 +222,8 @@ class Boiler : public EMSdevice {
|
||||
uint16_t auxHeaterDelay_;
|
||||
uint8_t silentMode_;
|
||||
int8_t minTempSilent_;
|
||||
uint8_t silentFrom_;
|
||||
uint8_t silentTo_;
|
||||
int8_t tempParMode_;
|
||||
int8_t auxHeatMixValve_;
|
||||
uint16_t hpHystHeat_;
|
||||
@@ -370,6 +372,8 @@ class Boiler : public EMSdevice {
|
||||
}
|
||||
bool set_silentMode(const char * value, const int8_t id);
|
||||
bool set_minTempSilent(const char * value, const int8_t id);
|
||||
bool set_silentFrom(const char * value, const int8_t id);
|
||||
bool set_silentTo(const char * value, const int8_t id);
|
||||
bool set_additionalHeaterOnly(const char * value, const int8_t id);
|
||||
bool set_additionalHeater(const char * value, const int8_t id);
|
||||
bool set_additionalHeaterDelay(const char * value, const int8_t id);
|
||||
|
||||
Reference in New Issue
Block a user