csv and modbus water devices #2229

This commit is contained in:
MichaelDvP
2024-11-21 08:56:01 +01:00
parent de7bd38850
commit ca5d631dfc
3 changed files with 27 additions and 20 deletions

View File

@@ -26,6 +26,7 @@ For more details go to [docs.emsesp.org](https://docs.emsesp.org/).
- heatpump cost UOMs [#2188](https://github.com/emsesp/EMS-ESP32/issues/2188)
- analog dac output and inputs on dac pins [#2201](https://github.com/emsesp/EMS-ESP32/discussions/2201)
- api memory leak [#2216](https://github.com/emsesp/EMS-ESP32/issues/2216)
- modbus multiple mixers [#2229](https://github.com/emsesp/EMS-ESP32/issues/2229)
## Changed

View File

@@ -187,4 +187,16 @@
// Generic - 0x40 or other with no product-id and no version
{0, DeviceType::GENERIC, "unknown", DeviceFlags::EMS_DEVICE_FLAG_NONE}
#if defined(EMSESP_STANDALONE)
,
{100, DeviceType::WATER, "IPM", DeviceFlags::EMS_DEVICE_FLAG_IPM},
{102, DeviceType::WATER, "IPM", DeviceFlags::EMS_DEVICE_FLAG_IPM},
{160, DeviceType::WATER, "MM100", DeviceFlags::EMS_DEVICE_FLAG_MMPLUS},
{161, DeviceType::WATER, "MM200", DeviceFlags::EMS_DEVICE_FLAG_MMPLUS},
{163, DeviceType::WATER, "SM100, MS100", DeviceFlags::EMS_DEVICE_FLAG_SM100},
{164, DeviceType::WATER, "SM200, MS200", DeviceFlags::EMS_DEVICE_FLAG_SM100},
{248, DeviceType::MIXER, "HM210", DeviceFlags::EMS_DEVICE_FLAG_MMPLUS},
{157, DeviceType::THERMOSTAT, "RC120", DeviceFlags::EMS_DEVICE_FLAG_CR120}
#endif
// clang-format on

View File

@@ -343,17 +343,14 @@ void EMSESP::dump_all_entities(uuid::console::Shell & shell) {
for (const auto & device : device_library_) {
if (device_class.first == device.device_type) {
uint8_t device_id = 0;
// Mixer class looks at device_id to determine type and the tag
// so fixing to 0x28 which will give all the settings except flowSetTemp
if (device.device_type == DeviceType::MIXER) {
// Water class looks at device_id to determine type and the tag
if (device.device_type == DeviceType::WATER) {
if (device.flags == EMSdevice::EMS_DEVICE_FLAG_MMPLUS) {
if (device.product_id == 160) { // MM100
device_id = 0x28; // dhw
} else {
device_id = 0x20; // hc
}
} else {
device_id = 0x20; // should cover all the other device types
device_id = 0x28; // dhw 1/2
} else if (device.flags == EMSdevice::EMS_DEVICE_FLAG_SM100) {
device_id = 0x2A; // dhw 3
} else if (device.flags == EMSdevice::EMS_DEVICE_FLAG_IPM) {
device_id = 0x40; // dhw 1
}
}
@@ -385,17 +382,14 @@ void EMSESP::dump_all_telegrams(uuid::console::Shell & shell) {
for (const auto & device : device_library_) {
if (device_class.first == device.device_type) {
uint8_t device_id = 0;
// Mixer class looks at device_id to determine type and the tag
// so fixing to 0x28 which will give all the settings except flowSetTemp
if (device.device_type == DeviceType::MIXER) {
// Water class looks at device_id to determine type and the tag
if (device.device_type == DeviceType::WATER) {
if (device.flags == EMSdevice::EMS_DEVICE_FLAG_MMPLUS) {
if (device.product_id == 160) { // MM100
device_id = 0x28; // dhw
} else {
device_id = 0x20; // hc
}
} else {
device_id = 0x20; // should cover all the other device types
device_id = 0x28; // dhw 1/2
} else if (device.flags == EMSdevice::EMS_DEVICE_FLAG_SM100) {
device_id = 0x2A; // dhw 3
} else if (device.flags == EMSdevice::EMS_DEVICE_FLAG_IPM) {
device_id = 0x40; // dhw 1
}
}