This commit is contained in:
MichaelDvP
2022-12-13 11:43:37 +01:00
parent c26793c68d
commit de9e261807
3 changed files with 74 additions and 0 deletions

View File

@@ -181,6 +181,9 @@ Boiler::Boiler(uint8_t device_type, int8_t device_id, uint8_t product_id, const
register_telegram_type(0x4A2, "HpInput", false, MAKE_PF_CB(process_HpInput));
register_telegram_type(0x486, "HpInConfig", false, MAKE_PF_CB(process_HpInConfig));
register_telegram_type(0x492, "HpHeaterConfig", false, MAKE_PF_CB(process_HpHeaterConfig));
register_telegram_type(0x484, "HPSilentMode", false, MAKE_PF_CB(process_HpSilentMode));
register_telegram_type(0x491, "HPAdditionalHeater", false, MAKE_PF_CB(process_HpAdditionalHeater));
}
/*
@@ -558,6 +561,24 @@ Boiler::Boiler(uint8_t device_type, int8_t device_id, uint8_t product_id, const
FL_(maxHeatDhw),
DeviceValueUOM::NONE,
MAKE_CF_CB(set_maxHeatDhw));
register_device_value(DeviceValueTAG::TAG_DEVICE_DATA,
&auxHeaterOnly_,
DeviceValueType::BOOL,
FL_(auxHeaterOnly),
DeviceValueUOM::NONE,
MAKE_CF_CB(set_additionalHeaterOnly));
register_device_value(DeviceValueTAG::TAG_DEVICE_DATA,
&addHeaterDelay_,
DeviceValueType::USHORT,
FL_(addHeaterDelay),
DeviceValueUOM::NONE,
MAKE_CF_CB(set_additionalHeaterDelay));
register_device_value(DeviceValueTAG::TAG_DEVICE_DATA,
&minTempSilent_,
DeviceValueType::INT,
FL_(minTempSilent),
DeviceValueUOM::NONE,
MAKE_CF_CB(set_minTempSilent));
}
// dhw - DEVICE_DATA_ww topic
@@ -1453,6 +1474,18 @@ void Boiler::process_amExtraMessage(std::shared_ptr<const Telegram> telegram) {
#pragma GCC diagnostic pop
// Boiler(0x08) -> All(0x00), ?(0x0484), data: 00 00 14 28 0D 50 00 00 00 02 02 07 28 01 00 02 05 19 0A 0A 03 0D 07 00 0A
// Boiler(0x08) -> All(0x00), ?(0x0484), data: 01 90 00 F6 28 14 64 00 00 E1 00 1E 00 1E 01 64 01 64 54 20 00 00 (offset 25)
void Boiler::process_HpSilentMode(std::shared_ptr<const Telegram> telegram) {
has_update(telegram, minTempSilent_, 11);
}
// 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) {
has_update(telegram, auxHeaterOnly_, 1);
has_update(telegram, addHeaterDelay_, 10);
}
// Settings AM200
// pos 12: off(00)/Keelbypass(01)/(hc1pump(02) only standalone)
@@ -2394,4 +2427,32 @@ bool Boiler::set_maxHeat(const char * value, const int8_t id) {
return true;
}
bool Boiler::set_minTempSilent(const char * value, const int8_t id) {
int v;
if (Helpers::value2temperature(value, v)) {
write_command(0x484, 11, v, 0x484);
return true;
}
return false;
}
bool Boiler::set_additionalHeaterOnly(const char * value, const int8_t id) {
bool v;
if (Helpers::value2bool(value, v)) {
write_command(0x491, 1, v ? 1 : 0, 0x491);
return true;
}
return false;
}
bool Boiler::set_additionalHeaterDelay(const char * value, const int8_t id) {
int v;
if (Helpers::value2number(value, v)) {
uint8_t data[2] = {(uint8_t)(v >> 8), (uint8_t)(v & 0xFF)};
write_command(0x491, 10, data, 2, 0x491);
return true;
}
return false;
}
} // namespace emsesp