mirror of
https://github.com/emsesp/EMS-ESP32.git
synced 2025-12-08 00:39:50 +03:00
add uom K, heatpump difftemp #803
This commit is contained in:
@@ -184,6 +184,7 @@ Boiler::Boiler(uint8_t device_type, int8_t device_id, uint8_t product_id, const
|
||||
|
||||
register_telegram_type(0x488, "HPValve", true, MAKE_PF_CB(process_HpValve));
|
||||
register_telegram_type(0x484, "HPSilentMode", true, MAKE_PF_CB(process_HpSilentMode));
|
||||
register_telegram_type(0x48B, "HPPumps", true, MAKE_PF_CB(process_HpPumps));
|
||||
register_telegram_type(0x491, "HPAdditionalHeater", true, MAKE_PF_CB(process_HpAdditionalHeater));
|
||||
}
|
||||
|
||||
@@ -624,6 +625,24 @@ Boiler::Boiler(uint8_t device_type, int8_t device_id, uint8_t product_id, const
|
||||
DeviceValueUOM::DEGREES,
|
||||
MAKE_CF_CB(set_tempParMode));
|
||||
register_device_value(DeviceValueTAG::TAG_DEVICE_DATA, &auxHeatMixValve_, DeviceValueType::INT, FL_(auxHeatMixValve), DeviceValueUOM::PERCENT);
|
||||
register_device_value(DeviceValueTAG::TAG_DEVICE_DATA,
|
||||
&tempDiffHeat_,
|
||||
DeviceValueType::UINT,
|
||||
DeviceValueNumOp::DV_NUMOP_DIV10,
|
||||
FL_(tempDiffHeat),
|
||||
DeviceValueUOM::K,
|
||||
MAKE_CF_CB(set_tempDiffHeat),
|
||||
3,
|
||||
10);
|
||||
register_device_value(DeviceValueTAG::TAG_DEVICE_DATA,
|
||||
&tempDiffCool_,
|
||||
DeviceValueType::UINT,
|
||||
DeviceValueNumOp::DV_NUMOP_DIV10,
|
||||
FL_(tempDiffCool),
|
||||
DeviceValueUOM::K,
|
||||
MAKE_CF_CB(set_tempDiffCool),
|
||||
3,
|
||||
10);
|
||||
}
|
||||
|
||||
// dhw - DEVICE_DATA_ww topic
|
||||
@@ -1535,6 +1554,12 @@ void Boiler::process_HpValve(std::shared_ptr<const Telegram> telegram) {
|
||||
has_update(telegram, auxHeatMixValve_, 7);
|
||||
}
|
||||
|
||||
// Boiler(0x08) -B-> All(0x00), ?(0x048B), data: 00 00 0A 1E 4E 00 1E 01 2C 00 01 64 55 05 12 50 50 50 00 00 1E 01 2C 00
|
||||
// Boiler(0x08) -B-> All(0x00), ?(0x048B), data: 00 1E 00 96 00 1E (offset 24)
|
||||
void Boiler::process_HpPumps(std::shared_ptr<const Telegram> telegram) {
|
||||
has_update(telegram, tempDiffHeat_, 4); // is * 10
|
||||
// has_update(telegram, tempDiffCool_, 3); // is * 10
|
||||
}
|
||||
|
||||
// Boiler(0x08) -> All(0x00), ?(0x0491), data: 03 01 00 00 00 02 64 00 00 14 01 2C 00 0A 00 1E 00 1E 00 00 1E 0A 1E 05 05
|
||||
void Boiler::process_HpAdditionalHeater(std::shared_ptr<const Telegram> telegram) {
|
||||
@@ -2524,7 +2549,7 @@ bool Boiler::set_tempParMode(const char * value, const int8_t id) {
|
||||
bool Boiler::set_additionalHeaterDelay(const char * value, const int8_t id) {
|
||||
int v;
|
||||
if (Helpers::value2number(value, v)) {
|
||||
v /= 5;
|
||||
v /= 10;
|
||||
uint8_t data[2] = {(uint8_t)(v >> 8), (uint8_t)v};
|
||||
write_command(0x491, 16, data, 2, 0x491);
|
||||
return true;
|
||||
@@ -2535,11 +2560,21 @@ bool Boiler::set_additionalHeaterDelay(const char * value, const int8_t id) {
|
||||
bool Boiler::set_hpHyst(const char * value, const int8_t id) {
|
||||
int v;
|
||||
if (Helpers::value2number(value, v)) {
|
||||
v /= 10;
|
||||
v /= 5;
|
||||
uint8_t data[2] = {(uint8_t)(v >> 8), (uint8_t)v};
|
||||
write_command(0x484, id, data, 2, 0x484);
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
bool Boiler::set_tempDiff(const char * value, const int8_t id) {
|
||||
float v;
|
||||
if (Helpers::value2float(value, v)) {
|
||||
write_command(0x48B, id, (uint8_t)(v * 10), 0x48B);
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
} // namespace emsesp
|
||||
|
||||
Reference in New Issue
Block a user