mirror of
https://github.com/emsesp/EMS-ESP32.git
synced 2025-12-06 15:59:52 +03:00
move hs1..hs16 to heatsource, AM200 as ahs1
This commit is contained in:
@@ -134,9 +134,12 @@ uint8_t Command::process(const char * path, const bool is_admin, const JsonObjec
|
|||||||
id_n += 8; // wwc1 has id 9
|
id_n += 8; // wwc1 has id 9
|
||||||
} else if (input.containsKey("id")) {
|
} else if (input.containsKey("id")) {
|
||||||
id_n = input["id"];
|
id_n = input["id"];
|
||||||
|
} else if (input.containsKey("ahs")) {
|
||||||
|
id_n = input["ahs"];
|
||||||
|
id_n += 18; // ahs1 has id 19
|
||||||
} else if (input.containsKey("hs")) {
|
} else if (input.containsKey("hs")) {
|
||||||
id_n = input["hs"];
|
id_n = input["hs"];
|
||||||
id_n += 18; // hs1 has id 19
|
id_n += 19; // hs1 has id 20
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -218,11 +221,14 @@ const char * Command::parse_command_string(const char * command, int8_t & id) {
|
|||||||
} else if (!strncmp(lowerCmd, "id", 2) && command[2] >= '1' && command[2] <= '9') {
|
} else if (!strncmp(lowerCmd, "id", 2) && command[2] >= '1' && command[2] <= '9') {
|
||||||
id = command[2] - '0';
|
id = command[2] - '0';
|
||||||
command += 3;
|
command += 3;
|
||||||
|
} else if (!strncmp(lowerCmd, "ahs", 3) && command[2] >= '1' && command[2] <= '1') { // only ahs1 for now
|
||||||
|
id = command[2] - '1' + 19;
|
||||||
|
command += 4;
|
||||||
} else if (!strncmp(lowerCmd, "hs", 2) && command[2] == '1' && command[3] >= '0' && command[3] <= '6') {
|
} else if (!strncmp(lowerCmd, "hs", 2) && command[2] == '1' && command[3] >= '0' && command[3] <= '6') {
|
||||||
id = command[3] - '0' + 28;
|
id = command[3] - '0' + 29;
|
||||||
command += 4;
|
command += 4;
|
||||||
} else if (!strncmp(lowerCmd, "hs", 2) && command[2] >= '1' && command[2] <= '9') {
|
} else if (!strncmp(lowerCmd, "hs", 2) && command[2] >= '1' && command[2] <= '9') {
|
||||||
id = command[2] - '1' + 19;
|
id = command[2] - '1' + 20;
|
||||||
command += 3;
|
command += 3;
|
||||||
}
|
}
|
||||||
// remove separator
|
// remove separator
|
||||||
|
|||||||
@@ -27,28 +27,6 @@ uuid::log::Logger Boiler::logger_{F_(boiler), uuid::log::Facility::CONSOLE};
|
|||||||
Boiler::Boiler(uint8_t device_type, int8_t device_id, uint8_t product_id, const char * version, const char * name, uint8_t flags, uint8_t brand)
|
Boiler::Boiler(uint8_t device_type, int8_t device_id, uint8_t product_id, const char * version, const char * name, uint8_t flags, uint8_t brand)
|
||||||
: EMSdevice(device_type, device_id, product_id, version, name, flags, brand) {
|
: EMSdevice(device_type, device_id, product_id, version, name, flags, brand) {
|
||||||
|
|
||||||
// cascaded heating sources, only some values per individual heatsource (hs)
|
|
||||||
if (device_id >= EMSdevice::EMS_DEVICE_ID_BOILER_1) {
|
|
||||||
uint8_t hs = device_id - EMSdevice::EMS_DEVICE_ID_BOILER_1; // heating source id, count from 0
|
|
||||||
// Runtime of each heatingsource in 0x06DC, ff
|
|
||||||
register_telegram_type(0x6DC + hs, "CascadeMessage", false, MAKE_PF_CB(process_CascadeMessage));
|
|
||||||
register_device_value(DeviceValueTAG::TAG_HS1 + hs, &burnWorkMin_, DeviceValueType::TIME, FL_(burnWorkMin), DeviceValueUOM::MINUTES);
|
|
||||||
// selBurnpower in D2 and E4
|
|
||||||
// register_telegram_type(0xD2, "CascadePowerMessage", false, MAKE_PF_CB(process_CascadePowerMessage));
|
|
||||||
// individual Flowtemps and powervalues for each heatingsource in E4
|
|
||||||
register_telegram_type(0xE4, "UBAMonitorFastPlus", false, MAKE_PF_CB(process_UBAMonitorFastPlus));
|
|
||||||
register_device_value(DeviceValueTAG::TAG_HS1 + hs, &selFlowTemp_, DeviceValueType::UINT, FL_(selFlowTemp), DeviceValueUOM::DEGREES);
|
|
||||||
register_device_value(DeviceValueTAG::TAG_HS1 + hs, &selBurnPow_, DeviceValueType::UINT, FL_(selBurnPow), DeviceValueUOM::PERCENT);
|
|
||||||
register_device_value(DeviceValueTAG::TAG_HS1 + hs,
|
|
||||||
&curFlowTemp_,
|
|
||||||
DeviceValueType::USHORT,
|
|
||||||
DeviceValueNumOp::DV_NUMOP_DIV10,
|
|
||||||
FL_(curFlowTemp),
|
|
||||||
DeviceValueUOM::DEGREES);
|
|
||||||
register_device_value(DeviceValueTAG::TAG_HS1 + hs, &curBurnPow_, DeviceValueType::UINT, FL_(curBurnPow), DeviceValueUOM::PERCENT);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
// register values for master boiler/cascade module
|
// register values for master boiler/cascade module
|
||||||
// reserve_telegram_functions(25); // reserve some space for the telegram registries, to avoid memory fragmentation
|
// reserve_telegram_functions(25); // reserve some space for the telegram registries, to avoid memory fragmentation
|
||||||
|
|
||||||
@@ -1253,14 +1231,6 @@ void Boiler::process_UBASetPoints(std::shared_ptr<const Telegram> telegram) {
|
|||||||
has_update(telegram, wwSetPumpPower_, 2); // ww pump speed/power?
|
has_update(telegram, wwSetPumpPower_, 2); // ww pump speed/power?
|
||||||
}
|
}
|
||||||
|
|
||||||
// 0x6DC, ff for cascaded heatsources (hs)
|
|
||||||
void Boiler::process_CascadeMessage(std::shared_ptr<const Telegram> telegram) {
|
|
||||||
// uint8_t hsActivated;
|
|
||||||
// has_update(telegram, hsActivated, 0);
|
|
||||||
telegram->read_value(burnWorkMin_, 3); // this is in seconds
|
|
||||||
burnWorkMin_ /= 60;
|
|
||||||
}
|
|
||||||
|
|
||||||
#pragma GCC diagnostic push
|
#pragma GCC diagnostic push
|
||||||
#pragma GCC diagnostic ignored "-Wunused-parameter"
|
#pragma GCC diagnostic ignored "-Wunused-parameter"
|
||||||
|
|
||||||
|
|||||||
@@ -24,68 +24,111 @@ REGISTER_FACTORY(Heatsource, EMSdevice::DeviceType::HEATSOURCE);
|
|||||||
|
|
||||||
Heatsource::Heatsource(uint8_t device_type, uint8_t device_id, uint8_t product_id, const char * version, const char * name, uint8_t flags, uint8_t brand)
|
Heatsource::Heatsource(uint8_t device_type, uint8_t device_id, uint8_t product_id, const char * version, const char * name, uint8_t flags, uint8_t brand)
|
||||||
: EMSdevice(device_type, device_id, product_id, version, name, flags, brand) {
|
: EMSdevice(device_type, device_id, product_id, version, name, flags, brand) {
|
||||||
|
if (device_id >= EMSdevice::EMS_DEVICE_ID_AHS1 && device_id < EMSdevice::EMS_DEVICE_ID_HS1) {
|
||||||
|
uint8_t ahs = device_id - EMSdevice::EMS_DEVICE_ID_AHS1; // heating source id, count from 0
|
||||||
register_telegram_type(0x54D, "AmTemperatures", false, MAKE_PF_CB(process_amTempMessage));
|
register_telegram_type(0x54D, "AmTemperatures", false, MAKE_PF_CB(process_amTempMessage));
|
||||||
register_telegram_type(0x54E, "AmStatus", false, MAKE_PF_CB(process_amStatusMessage));
|
register_telegram_type(0x54E, "AmStatus", false, MAKE_PF_CB(process_amStatusMessage));
|
||||||
register_telegram_type(0x54F, "AmCommand", false, MAKE_PF_CB(process_amCommandMessage)); // not broadcasted, but actually not used
|
register_telegram_type(0x54F, "AmCommand", false, MAKE_PF_CB(process_amCommandMessage)); // not broadcasted, but actually not used
|
||||||
register_telegram_type(0x550, "AmExtra", false, MAKE_PF_CB(process_amExtraMessage));
|
register_telegram_type(0x550, "AmExtra", false, MAKE_PF_CB(process_amExtraMessage));
|
||||||
register_telegram_type(0x54C, "AmSettings", true, MAKE_PF_CB(process_amSettingMessage)); // not broadcasted
|
register_telegram_type(0x54C, "AmSettings", true, MAKE_PF_CB(process_amSettingMessage)); // not broadcasted
|
||||||
|
|
||||||
register_device_value(DeviceValueTAG::TAG_DEVICE_DATA,
|
register_device_value(DeviceValueTAG::TAG_AHS1 + ahs,
|
||||||
&curFlowTemp_,
|
&curFlowTemp_,
|
||||||
DeviceValueType::SHORT,
|
DeviceValueType::SHORT,
|
||||||
DeviceValueNumOp::DV_NUMOP_DIV10,
|
DeviceValueNumOp::DV_NUMOP_DIV10,
|
||||||
FL_(sysFlowTemp),
|
FL_(sysFlowTemp),
|
||||||
DeviceValueUOM::DEGREES);
|
DeviceValueUOM::DEGREES);
|
||||||
register_device_value(DeviceValueTAG::TAG_DEVICE_DATA, &retTemp_, DeviceValueType::SHORT, DeviceValueNumOp::DV_NUMOP_DIV10, FL_(sysRetTemp), DeviceValueUOM::DEGREES);
|
register_device_value(DeviceValueTAG::TAG_AHS1 + ahs,
|
||||||
register_device_value(DeviceValueTAG::TAG_DEVICE_DATA, &aFlowTemp_, DeviceValueType::SHORT, DeviceValueNumOp::DV_NUMOP_DIV10, FL_(aFlowTemp), DeviceValueUOM::DEGREES);
|
&retTemp_,
|
||||||
register_device_value(DeviceValueTAG::TAG_DEVICE_DATA, &aRetTemp_, DeviceValueType::SHORT, DeviceValueNumOp::DV_NUMOP_DIV10, FL_(aRetTemp), DeviceValueUOM::DEGREES);
|
DeviceValueType::SHORT,
|
||||||
register_device_value(DeviceValueTAG::TAG_DEVICE_DATA,
|
DeviceValueNumOp::DV_NUMOP_DIV10,
|
||||||
|
FL_(sysRetTemp),
|
||||||
|
DeviceValueUOM::DEGREES);
|
||||||
|
register_device_value(DeviceValueTAG::TAG_AHS1 + ahs,
|
||||||
|
&aFlowTemp_,
|
||||||
|
DeviceValueType::SHORT,
|
||||||
|
DeviceValueNumOp::DV_NUMOP_DIV10,
|
||||||
|
FL_(aFlowTemp),
|
||||||
|
DeviceValueUOM::DEGREES);
|
||||||
|
register_device_value(DeviceValueTAG::TAG_AHS1 + ahs,
|
||||||
|
&aRetTemp_,
|
||||||
|
DeviceValueType::SHORT,
|
||||||
|
DeviceValueNumOp::DV_NUMOP_DIV10,
|
||||||
|
FL_(aRetTemp),
|
||||||
|
DeviceValueUOM::DEGREES);
|
||||||
|
register_device_value(DeviceValueTAG::TAG_AHS1 + ahs,
|
||||||
&cylTopTemp_,
|
&cylTopTemp_,
|
||||||
DeviceValueType::SHORT,
|
DeviceValueType::SHORT,
|
||||||
DeviceValueNumOp::DV_NUMOP_DIV10,
|
DeviceValueNumOp::DV_NUMOP_DIV10,
|
||||||
FL_(aCylTopTemp),
|
FL_(aCylTopTemp),
|
||||||
DeviceValueUOM::DEGREES);
|
DeviceValueUOM::DEGREES);
|
||||||
register_device_value(DeviceValueTAG::TAG_DEVICE_DATA,
|
register_device_value(DeviceValueTAG::TAG_AHS1 + ahs,
|
||||||
&cylCenterTemp_,
|
&cylCenterTemp_,
|
||||||
DeviceValueType::SHORT,
|
DeviceValueType::SHORT,
|
||||||
DeviceValueNumOp::DV_NUMOP_DIV10,
|
DeviceValueNumOp::DV_NUMOP_DIV10,
|
||||||
FL_(aCylCenterTemp),
|
FL_(aCylCenterTemp),
|
||||||
DeviceValueUOM::DEGREES);
|
DeviceValueUOM::DEGREES);
|
||||||
register_device_value(DeviceValueTAG::TAG_DEVICE_DATA,
|
register_device_value(DeviceValueTAG::TAG_AHS1 + ahs,
|
||||||
&cylBottomTemp_,
|
&cylBottomTemp_,
|
||||||
DeviceValueType::SHORT,
|
DeviceValueType::SHORT,
|
||||||
DeviceValueNumOp::DV_NUMOP_DIV10,
|
DeviceValueNumOp::DV_NUMOP_DIV10,
|
||||||
FL_(aCylBottomTemp),
|
FL_(aCylBottomTemp),
|
||||||
DeviceValueUOM::DEGREES);
|
DeviceValueUOM::DEGREES);
|
||||||
// register_device_value(DeviceValueTAG::TAG_DEVICE_DATA, &valveByPass_, DeviceValueType::BOOL, nullptr, FL_(valveByPass), DeviceValueUOM::NONE);
|
// register_device_value(DeviceValueTAG::TAG_AHS1 + ahs, &valveByPass_, DeviceValueType::BOOL, nullptr, FL_(valveByPass), DeviceValueUOM::NONE);
|
||||||
register_device_value(DeviceValueTAG::TAG_DEVICE_DATA, &valveBuffer_, DeviceValueType::UINT, FL_(valveBuffer), DeviceValueUOM::PERCENT);
|
register_device_value(DeviceValueTAG::TAG_AHS1 + ahs, &valveBuffer_, DeviceValueType::UINT, FL_(valveBuffer), DeviceValueUOM::PERCENT);
|
||||||
register_device_value(DeviceValueTAG::TAG_DEVICE_DATA, &valveReturn_, DeviceValueType::UINT, FL_(valveReturn), DeviceValueUOM::PERCENT);
|
register_device_value(DeviceValueTAG::TAG_AHS1 + ahs, &valveReturn_, DeviceValueType::UINT, FL_(valveReturn), DeviceValueUOM::PERCENT);
|
||||||
register_device_value(DeviceValueTAG::TAG_DEVICE_DATA, &aPumpMod_, DeviceValueType::UINT, FL_(aPumpMod), DeviceValueUOM::PERCENT);
|
register_device_value(DeviceValueTAG::TAG_AHS1 + ahs, &aPumpMod_, DeviceValueType::UINT, FL_(aPumpMod), DeviceValueUOM::PERCENT);
|
||||||
// register_device_value(DeviceValueTAG::TAG_DEVICE_DATA, &heatSource_, DeviceValueType::BOOL, nullptr, FL_(heatSource), DeviceValueUOM::NONE);
|
// register_device_value(DeviceValueTAG::TAG_AHS1 + ahs, &heatSource_, DeviceValueType::BOOL, nullptr, FL_(heatSource), DeviceValueUOM::NONE);
|
||||||
// Settings:
|
// Settings:
|
||||||
register_device_value(
|
register_device_value(DeviceValueTAG::TAG_AHS1 + ahs,
|
||||||
DeviceValueTAG::TAG_DEVICE_DATA, &vr2Config_, DeviceValueType::ENUM, FL_(enum_vr2Config), FL_(vr2Config), DeviceValueUOM::NONE, MAKE_CF_CB(set_vr2Config));
|
&vr2Config_,
|
||||||
register_device_value(DeviceValueTAG::TAG_DEVICE_DATA, &ahsActivated_, DeviceValueType::BOOL, FL_(ahsActivated), DeviceValueUOM::NONE, MAKE_CF_CB(set_ahsActivated));
|
DeviceValueType::ENUM,
|
||||||
register_device_value(DeviceValueTAG::TAG_DEVICE_DATA, &aPumpConfig_, DeviceValueType::BOOL, FL_(aPumpConfig), DeviceValueUOM::NONE, MAKE_CF_CB(set_aPumpConfig));
|
FL_(enum_vr2Config),
|
||||||
register_device_value(DeviceValueTAG::TAG_DEVICE_DATA,
|
FL_(vr2Config),
|
||||||
|
DeviceValueUOM::NONE,
|
||||||
|
MAKE_CF_CB(set_vr2Config));
|
||||||
|
register_device_value(DeviceValueTAG::TAG_AHS1 + ahs,
|
||||||
|
&ahsActivated_,
|
||||||
|
DeviceValueType::BOOL,
|
||||||
|
FL_(ahsActivated),
|
||||||
|
DeviceValueUOM::NONE,
|
||||||
|
MAKE_CF_CB(set_ahsActivated));
|
||||||
|
register_device_value(DeviceValueTAG::TAG_AHS1 + ahs,
|
||||||
|
&aPumpConfig_,
|
||||||
|
DeviceValueType::BOOL,
|
||||||
|
FL_(aPumpConfig),
|
||||||
|
DeviceValueUOM::NONE,
|
||||||
|
MAKE_CF_CB(set_aPumpConfig));
|
||||||
|
register_device_value(DeviceValueTAG::TAG_AHS1 + ahs,
|
||||||
&aPumpSignal_,
|
&aPumpSignal_,
|
||||||
DeviceValueType::ENUM,
|
DeviceValueType::ENUM,
|
||||||
FL_(enum_aPumpSignal),
|
FL_(enum_aPumpSignal),
|
||||||
FL_(aPumpSignal),
|
FL_(aPumpSignal),
|
||||||
DeviceValueUOM::NONE,
|
DeviceValueUOM::NONE,
|
||||||
MAKE_CF_CB(set_aPumpSignal));
|
MAKE_CF_CB(set_aPumpSignal));
|
||||||
register_device_value(DeviceValueTAG::TAG_DEVICE_DATA, &aPumpMin_, DeviceValueType::UINT, FL_(aPumpMin), DeviceValueUOM::PERCENT, MAKE_CF_CB(set_aPumpMin), 12, 50);
|
|
||||||
register_device_value(DeviceValueTAG::TAG_DEVICE_DATA, &tempRise_, DeviceValueType::BOOL, FL_(tempRise), DeviceValueUOM::NONE, MAKE_CF_CB(set_tempRise));
|
|
||||||
register_device_value(
|
register_device_value(
|
||||||
DeviceValueTAG::TAG_DEVICE_DATA, &setReturnTemp_, DeviceValueType::UINT, FL_(setReturnTemp), DeviceValueUOM::DEGREES, MAKE_CF_CB(set_setReturnTemp), 40, 75);
|
DeviceValueTAG::TAG_AHS1 + ahs, &aPumpMin_, DeviceValueType::UINT, FL_(aPumpMin), DeviceValueUOM::PERCENT, MAKE_CF_CB(set_aPumpMin), 12, 50);
|
||||||
|
register_device_value(DeviceValueTAG::TAG_AHS1 + ahs, &tempRise_, DeviceValueType::BOOL, FL_(tempRise), DeviceValueUOM::NONE, MAKE_CF_CB(set_tempRise));
|
||||||
|
register_device_value(DeviceValueTAG::TAG_AHS1 + ahs,
|
||||||
|
&setReturnTemp_,
|
||||||
|
DeviceValueType::UINT,
|
||||||
|
FL_(setReturnTemp),
|
||||||
|
DeviceValueUOM::DEGREES,
|
||||||
|
MAKE_CF_CB(set_setReturnTemp),
|
||||||
|
40,
|
||||||
|
75);
|
||||||
register_device_value(
|
register_device_value(
|
||||||
DeviceValueTAG::TAG_DEVICE_DATA, &mixRuntime_, DeviceValueType::USHORT, FL_(mixRuntime), DeviceValueUOM::SECONDS, MAKE_CF_CB(set_mixRuntime), 0, 600);
|
DeviceValueTAG::TAG_AHS1 + ahs, &mixRuntime_, DeviceValueType::USHORT, FL_(mixRuntime), DeviceValueUOM::SECONDS, MAKE_CF_CB(set_mixRuntime), 0, 600);
|
||||||
register_device_value(
|
register_device_value(
|
||||||
DeviceValueTAG::TAG_DEVICE_DATA, &setFlowTemp_, DeviceValueType::UINT, FL_(setFlowTemp), DeviceValueUOM::DEGREES, MAKE_CF_CB(set_setFlowTemp), 40, 75);
|
DeviceValueTAG::TAG_AHS1 + ahs, &setFlowTemp_, DeviceValueType::UINT, FL_(setFlowTemp), DeviceValueUOM::DEGREES, MAKE_CF_CB(set_setFlowTemp), 40, 75);
|
||||||
register_device_value(
|
register_device_value(DeviceValueTAG::TAG_AHS1 + ahs,
|
||||||
DeviceValueTAG::TAG_DEVICE_DATA, &bufBypass_, DeviceValueType::ENUM, FL_(enum_bufBypass), FL_(bufBypass), DeviceValueUOM::NONE, MAKE_CF_CB(set_bufBypass));
|
&bufBypass_,
|
||||||
register_device_value(DeviceValueTAG::TAG_DEVICE_DATA,
|
DeviceValueType::ENUM,
|
||||||
|
FL_(enum_bufBypass),
|
||||||
|
FL_(bufBypass),
|
||||||
|
DeviceValueUOM::NONE,
|
||||||
|
MAKE_CF_CB(set_bufBypass));
|
||||||
|
register_device_value(DeviceValueTAG::TAG_AHS1 + ahs,
|
||||||
&bufMixRuntime_,
|
&bufMixRuntime_,
|
||||||
DeviceValueType::USHORT,
|
DeviceValueType::USHORT,
|
||||||
FL_(bufMixRuntime),
|
FL_(bufMixRuntime),
|
||||||
@@ -93,15 +136,73 @@ Heatsource::Heatsource(uint8_t device_type, uint8_t device_id, uint8_t product_i
|
|||||||
MAKE_CF_CB(set_bufMixRuntime),
|
MAKE_CF_CB(set_bufMixRuntime),
|
||||||
0,
|
0,
|
||||||
600);
|
600);
|
||||||
|
register_device_value(DeviceValueTAG::TAG_AHS1 + ahs,
|
||||||
|
&bufConfig_,
|
||||||
|
DeviceValueType::ENUM,
|
||||||
|
FL_(enum_bufConfig),
|
||||||
|
FL_(bufConfig),
|
||||||
|
DeviceValueUOM::NONE,
|
||||||
|
MAKE_CF_CB(set_bufConfig));
|
||||||
|
register_device_value(DeviceValueTAG::TAG_AHS1 + ahs,
|
||||||
|
&blockMode_,
|
||||||
|
DeviceValueType::ENUM,
|
||||||
|
FL_(enum_blockMode),
|
||||||
|
FL_(blockMode),
|
||||||
|
DeviceValueUOM::NONE,
|
||||||
|
MAKE_CF_CB(set_blockMode));
|
||||||
|
register_device_value(DeviceValueTAG::TAG_AHS1 + ahs,
|
||||||
|
&blockTerm_,
|
||||||
|
DeviceValueType::ENUM,
|
||||||
|
FL_(enum_blockTerm),
|
||||||
|
FL_(blockTerm),
|
||||||
|
DeviceValueUOM::NONE,
|
||||||
|
MAKE_CF_CB(set_blockTerm));
|
||||||
register_device_value(
|
register_device_value(
|
||||||
DeviceValueTAG::TAG_DEVICE_DATA, &bufConfig_, DeviceValueType::ENUM, FL_(enum_bufConfig), FL_(bufConfig), DeviceValueUOM::NONE, MAKE_CF_CB(set_bufConfig));
|
DeviceValueTAG::TAG_AHS1 + ahs, &blockHyst_, DeviceValueType::INT, FL_(blockHyst), DeviceValueUOM::DEGREES_R, MAKE_CF_CB(set_blockHyst), 0, 50);
|
||||||
register_device_value(
|
register_device_value(
|
||||||
DeviceValueTAG::TAG_DEVICE_DATA, &blockMode_, DeviceValueType::ENUM, FL_(enum_blockMode), FL_(blockMode), DeviceValueUOM::NONE, MAKE_CF_CB(set_blockMode));
|
DeviceValueTAG::TAG_AHS1 + ahs, &releaseWait_, DeviceValueType::UINT, FL_(releaseWait), DeviceValueUOM::MINUTES, MAKE_CF_CB(set_releaseWait), 0, 240);
|
||||||
register_device_value(
|
}
|
||||||
DeviceValueTAG::TAG_DEVICE_DATA, &blockTerm_, DeviceValueType::ENUM, FL_(enum_blockTerm), FL_(blockTerm), DeviceValueUOM::NONE, MAKE_CF_CB(set_blockTerm));
|
|
||||||
register_device_value(DeviceValueTAG::TAG_DEVICE_DATA, &blockHyst_, DeviceValueType::INT, FL_(blockHyst), DeviceValueUOM::DEGREES_R, MAKE_CF_CB(set_blockHyst), 0, 50);
|
// cascaded heating sources, only some values per individual heatsource (hs)
|
||||||
register_device_value(
|
if (device_id >= EMSdevice::EMS_DEVICE_ID_HS1) {
|
||||||
DeviceValueTAG::TAG_DEVICE_DATA, &releaseWait_, DeviceValueType::UINT, FL_(releaseWait), DeviceValueUOM::MINUTES, MAKE_CF_CB(set_releaseWait), 0, 240);
|
uint8_t hs = device_id - EMSdevice::EMS_DEVICE_ID_HS1; // heating source id, count from 0
|
||||||
|
// Runtime of each heatingsource in 0x06DC, ff
|
||||||
|
register_telegram_type(0x6DC + hs, "CascadeMessage", false, MAKE_PF_CB(process_CascadeMessage));
|
||||||
|
register_device_value(DeviceValueTAG::TAG_HS1 + hs, &burnWorkMin_, DeviceValueType::TIME, FL_(burnWorkMin), DeviceValueUOM::MINUTES);
|
||||||
|
// selBurnpower in D2 and E4
|
||||||
|
// register_telegram_type(0xD2, "CascadePowerMessage", false, MAKE_PF_CB(process_CascadePowerMessage));
|
||||||
|
// individual Flowtemps and powervalues for each heatingsource in E4
|
||||||
|
register_telegram_type(0xE4, "UBAMonitorFastPlus", false, MAKE_PF_CB(process_UBAMonitorFastPlus));
|
||||||
|
register_device_value(DeviceValueTAG::TAG_HS1 + hs, &setFlowTemp_, DeviceValueType::UINT, FL_(setFlowTemp), DeviceValueUOM::DEGREES);
|
||||||
|
register_device_value(DeviceValueTAG::TAG_HS1 + hs, &selBurnPow_, DeviceValueType::UINT, FL_(selBurnPow), DeviceValueUOM::PERCENT);
|
||||||
|
register_device_value(DeviceValueTAG::TAG_HS1 + hs,
|
||||||
|
&curFlowTemp_,
|
||||||
|
DeviceValueType::USHORT,
|
||||||
|
DeviceValueNumOp::DV_NUMOP_DIV10,
|
||||||
|
FL_(curFlowTemp),
|
||||||
|
DeviceValueUOM::DEGREES);
|
||||||
|
register_device_value(DeviceValueTAG::TAG_HS1 + hs, &curBurnPow_, DeviceValueType::UINT, FL_(curBurnPow), DeviceValueUOM::PERCENT);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* heatingsources (boilers)
|
||||||
|
*/
|
||||||
|
|
||||||
|
// 0x6DC, ff for cascaded heatsources (hs)
|
||||||
|
void Heatsource::process_CascadeMessage(std::shared_ptr<const Telegram> telegram) {
|
||||||
|
telegram->read_value(burnWorkMin_, 3); // this is in seconds
|
||||||
|
burnWorkMin_ /= 60;
|
||||||
|
has_update(burnWorkMin_);
|
||||||
|
}
|
||||||
|
|
||||||
|
// UBAMonitorFastPlus - type 0xE4 - central heating monitor EMS+
|
||||||
|
void Heatsource::process_UBAMonitorFastPlus(std::shared_ptr<const Telegram> telegram) {
|
||||||
|
has_update(telegram, setFlowTemp_, 6);
|
||||||
|
has_update(telegram, curBurnPow_, 10);
|
||||||
|
has_update(telegram, selBurnPow_, 9);
|
||||||
|
has_update(telegram, curFlowTemp_, 7);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|||||||
@@ -28,6 +28,12 @@ class Heatsource : public EMSdevice {
|
|||||||
Heatsource(uint8_t device_type, uint8_t device_id, uint8_t product_id, const char * version, const char * name, uint8_t flags, uint8_t brand);
|
Heatsource(uint8_t device_type, uint8_t device_id, uint8_t product_id, const char * version, const char * name, uint8_t flags, uint8_t brand);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
// hs1 .. hs16
|
||||||
|
uint32_t burnWorkMin_;
|
||||||
|
uint8_t selBurnPow_;
|
||||||
|
uint8_t curBurnPow_;
|
||||||
|
|
||||||
|
// ahs
|
||||||
uint16_t curFlowTemp_; // Current flow temperature
|
uint16_t curFlowTemp_; // Current flow temperature
|
||||||
uint16_t retTemp_; // Return temperature
|
uint16_t retTemp_; // Return temperature
|
||||||
int16_t cylTopTemp_; // TB1
|
int16_t cylTopTemp_; // TB1
|
||||||
@@ -59,6 +65,9 @@ class Heatsource : public EMSdevice {
|
|||||||
int8_t blockHyst_; // pos 14?: Hyst. for bolier block (K)
|
int8_t blockHyst_; // pos 14?: Hyst. for bolier block (K)
|
||||||
uint8_t releaseWait_; // pos 15: Boiler release wait time (min)
|
uint8_t releaseWait_; // pos 15: Boiler release wait time (min)
|
||||||
|
|
||||||
|
void process_CascadeMessage(std::shared_ptr<const Telegram> telegram);
|
||||||
|
void process_UBAMonitorFastPlus(std::shared_ptr<const Telegram> telegram);
|
||||||
|
|
||||||
void process_amTempMessage(std::shared_ptr<const Telegram> telegram);
|
void process_amTempMessage(std::shared_ptr<const Telegram> telegram);
|
||||||
void process_amStatusMessage(std::shared_ptr<const Telegram> telegram);
|
void process_amStatusMessage(std::shared_ptr<const Telegram> telegram);
|
||||||
void process_amSettingMessage(std::shared_ptr<const Telegram> telegram);
|
void process_amSettingMessage(std::shared_ptr<const Telegram> telegram);
|
||||||
|
|||||||
@@ -352,9 +352,9 @@ class EMSdevice {
|
|||||||
|
|
||||||
// static device IDs
|
// static device IDs
|
||||||
static constexpr uint8_t EMS_DEVICE_ID_BOILER = 0x08; // fixed device_id for Master Boiler/UBA
|
static constexpr uint8_t EMS_DEVICE_ID_BOILER = 0x08; // fixed device_id for Master Boiler/UBA
|
||||||
static constexpr uint8_t EMS_DEVICE_ID_BOILER_1 = 0x70; // fixed device_id for 1st. Cascade Boiler/UBA
|
static constexpr uint8_t EMS_DEVICE_ID_HS1 = 0x70; // fixed device_id for 1st. Cascade Boiler/UBA
|
||||||
static constexpr uint8_t EMS_DEVICE_ID_BOILER_F = 0x7F; // fixed device_id for last Cascade Boiler/UBA
|
static constexpr uint8_t EMS_DEVICE_ID_HS16 = 0x7F; // fixed device_id for last Cascade Boiler/UBA
|
||||||
static constexpr uint8_t EMS_DEVICE_ID_AM200 = 0x60; // fixed device_id for alternative Heating AM200
|
static constexpr uint8_t EMS_DEVICE_ID_AHS1 = 0x60; // fixed device_id for alternative Heating AM200
|
||||||
static constexpr uint8_t EMS_DEVICE_ID_CONTROLLER = 0x09;
|
static constexpr uint8_t EMS_DEVICE_ID_CONTROLLER = 0x09;
|
||||||
static constexpr uint8_t EMS_DEVICE_ID_RS232 = 0x04;
|
static constexpr uint8_t EMS_DEVICE_ID_RS232 = 0x04;
|
||||||
static constexpr uint8_t EMS_DEVICE_ID_TERMINAL = 0x0A;
|
static constexpr uint8_t EMS_DEVICE_ID_TERMINAL = 0x0A;
|
||||||
|
|||||||
@@ -140,6 +140,7 @@ const char * const * DeviceValue::DeviceValueTAG_s[] = {
|
|||||||
FL_(tag_wwc8), // "wwc8"
|
FL_(tag_wwc8), // "wwc8"
|
||||||
FL_(tag_wwc9), // "wwc9"
|
FL_(tag_wwc9), // "wwc9"
|
||||||
FL_(tag_wwc10), // "wwc10"
|
FL_(tag_wwc10), // "wwc10"
|
||||||
|
FL_(tag_ahs1), // "ahs1"
|
||||||
FL_(tag_hs1), // "hs1"
|
FL_(tag_hs1), // "hs1"
|
||||||
FL_(tag_hs2), // "hs2"
|
FL_(tag_hs2), // "hs2"
|
||||||
FL_(tag_hs3), // "hs3"
|
FL_(tag_hs3), // "hs3"
|
||||||
@@ -185,6 +186,7 @@ const char * const DeviceValue::DeviceValueTAG_mqtt[] = {
|
|||||||
FL_(tag_wwc8)[0], // "wwc8"
|
FL_(tag_wwc8)[0], // "wwc8"
|
||||||
FL_(tag_wwc9)[0], // "wwc9"
|
FL_(tag_wwc9)[0], // "wwc9"
|
||||||
FL_(tag_wwc10)[0], // "wwc10"
|
FL_(tag_wwc10)[0], // "wwc10"
|
||||||
|
FL_(tag_ahs1)[0], // "ahs1"
|
||||||
FL_(tag_hs1)[0], // "hs1"
|
FL_(tag_hs1)[0], // "hs1"
|
||||||
FL_(tag_hs2)[0], // "hs2"
|
FL_(tag_hs2)[0], // "hs2"
|
||||||
FL_(tag_hs3)[0], // "hs3"
|
FL_(tag_hs3)[0], // "hs3"
|
||||||
|
|||||||
@@ -98,6 +98,7 @@ class DeviceValue {
|
|||||||
TAG_WWC8,
|
TAG_WWC8,
|
||||||
TAG_WWC9,
|
TAG_WWC9,
|
||||||
TAG_WWC10,
|
TAG_WWC10,
|
||||||
|
TAG_AHS1,
|
||||||
TAG_HS1,
|
TAG_HS1,
|
||||||
TAG_HS2,
|
TAG_HS2,
|
||||||
TAG_HS3,
|
TAG_HS3,
|
||||||
|
|||||||
@@ -1006,13 +1006,24 @@ bool EMSESP::add_device(const uint8_t device_id, const uint8_t product_id, const
|
|||||||
for (auto & device : device_library_) {
|
for (auto & device : device_library_) {
|
||||||
if (device.product_id == product_id) {
|
if (device.product_id == product_id) {
|
||||||
// sometimes boilers share the same productID as controllers
|
// sometimes boilers share the same productID as controllers
|
||||||
// so only add boilers if the device_id is 0x08 or 0x70.., which is fixed for EMS
|
// so only add boilers if the device_id is 0x08
|
||||||
|
// cascaded boilers with 0x70.., map to heatsources
|
||||||
if (device.device_type == DeviceType::BOILER) {
|
if (device.device_type == DeviceType::BOILER) {
|
||||||
if (device_id == EMSdevice::EMS_DEVICE_ID_BOILER
|
if (device_id == EMSdevice::EMS_DEVICE_ID_BOILER) {
|
||||||
|| (device_id >= EMSdevice::EMS_DEVICE_ID_BOILER_1 && device_id <= EMSdevice::EMS_DEVICE_ID_BOILER_F)) {
|
|
||||||
device_p = &device;
|
device_p = &device;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
if ((device_id >= EMSdevice::EMS_DEVICE_ID_HS1 && device_id <= EMSdevice::EMS_DEVICE_ID_HS16)) {
|
||||||
|
device_p = &device;
|
||||||
|
device_p->device_type = DeviceType::HEATSOURCE;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
} else if (device.device_type == DeviceType::HEATSOURCE) {
|
||||||
|
device_p = &device;
|
||||||
|
if (device_id == EMSdevice::EMS_DEVICE_ID_BOILER) { // AHS as only heatsource on d 0x08
|
||||||
|
device_p->device_type = DeviceType::BOILER;
|
||||||
|
}
|
||||||
|
break;
|
||||||
} else {
|
} else {
|
||||||
// it's not a boiler, but we have a match
|
// it's not a boiler, but we have a match
|
||||||
device_p = &device;
|
device_p = &device;
|
||||||
|
|||||||
@@ -75,6 +75,7 @@ MAKE_PSTR_LIST(tag_wwc7, "wwc7", "WWK7", "wwc7", "wwc7", "CWU7", "wwc7", "wwc7")
|
|||||||
MAKE_PSTR_LIST(tag_wwc8, "wwc8", "WWK8", "wwc8", "wwc8", "CWU8", "wwc8", "wwc8")
|
MAKE_PSTR_LIST(tag_wwc8, "wwc8", "WWK8", "wwc8", "wwc8", "CWU8", "wwc8", "wwc8")
|
||||||
MAKE_PSTR_LIST(tag_wwc9, "wwc9", "WWK9", "wwc9", "wwc9", "CWU9", "wwc9", "wwc9")
|
MAKE_PSTR_LIST(tag_wwc9, "wwc9", "WWK9", "wwc9", "wwc9", "CWU9", "wwc9", "wwc9")
|
||||||
MAKE_PSTR_LIST(tag_wwc10, "wwc10", "WWK10", "wwc10", "wwc10", "CWU10", "wwc10", "wwc10")
|
MAKE_PSTR_LIST(tag_wwc10, "wwc10", "WWK10", "wwc10", "wwc10", "CWU10", "wwc10", "wwc10")
|
||||||
|
MAKE_PSTR_LIST(tag_ahs1, "ahs1", "ahs1", "ahs1", "ahs1", "AŹC1", "ahs1", "ahs1")
|
||||||
MAKE_PSTR_LIST(tag_hs1, "hs1", "hs1", "hs1", "hs1", "ŹC1", "hs1", "hs1")
|
MAKE_PSTR_LIST(tag_hs1, "hs1", "hs1", "hs1", "hs1", "ŹC1", "hs1", "hs1")
|
||||||
MAKE_PSTR_LIST(tag_hs2, "hs2", "hs2", "hs2", "hs2", "ŹC2", "hs2", "hs2")
|
MAKE_PSTR_LIST(tag_hs2, "hs2", "hs2", "hs2", "hs2", "ŹC2", "hs2", "hs2")
|
||||||
MAKE_PSTR_LIST(tag_hs3, "hs3", "hs3", "hs3", "hs3", "ŹC3", "hs3", "hs3")
|
MAKE_PSTR_LIST(tag_hs3, "hs3", "hs3", "hs3", "hs3", "ŹC3", "hs3", "hs3")
|
||||||
|
|||||||
Reference in New Issue
Block a user