From c4f4a440ac471c0634fbb8c1baffe849e2fa6bee Mon Sep 17 00:00:00 2001 From: MichaelDvP Date: Fri, 22 Jul 2022 16:16:55 +0200 Subject: [PATCH] EM10 as gateway --- src/device_library.h | 6 +++--- src/devices/switch.cpp | 4 ---- 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/src/device_library.h b/src/device_library.h index 4f3ca8db3..695d9bebf 100644 --- a/src/device_library.h +++ b/src/device_library.h @@ -143,12 +143,12 @@ {236, DeviceType::CONNECT, F("Wireless sensor base"), DeviceFlags::EMS_DEVICE_FLAG_NONE}, {238, DeviceType::CONNECT, F("Wireless sensor base"), DeviceFlags::EMS_DEVICE_FLAG_NONE}, -// EM10 error detection - 0x12 -{ 74, DeviceType::SWITCH, F("Error Module EM10"), DeviceFlags::EMS_DEVICE_FLAG_NONE}, - // Switches - 0x11 { 71, DeviceType::SWITCH, F("WM10"), DeviceFlags::EMS_DEVICE_FLAG_NONE}, +// EM10 error contact and analog flowtemp control- 0x12 +{ 74, DeviceType::GATEWAY, F("Error Module EM10"), DeviceFlags::EMS_DEVICE_FLAG_NONE}, + // Gateways - 0x48 {189, DeviceType::GATEWAY, F("KM200/MB LAN 2"), DeviceFlags::EMS_DEVICE_FLAG_NONE}, diff --git a/src/devices/switch.cpp b/src/devices/switch.cpp index 243869355..29fc78490 100644 --- a/src/devices/switch.cpp +++ b/src/devices/switch.cpp @@ -24,10 +24,6 @@ REGISTER_FACTORY(Switch, EMSdevice::DeviceType::SWITCH); Switch::Switch(uint8_t device_type, uint8_t device_id, uint8_t product_id, const char * version, const std::string & name, uint8_t flags, uint8_t brand) : EMSdevice(device_type, device_id, product_id, version, name, flags, brand) { - // check for EM10 module - if (device_id == 0x12) { - return; - } // WM10 module, device_id 0x11 register_telegram_type(0x9C, F("WM10MonitorMessage"), false, MAKE_PF_CB(process_WM10MonitorMessage)); register_telegram_type(0x9D, F("WM10SetMessage"), false, MAKE_PF_CB(process_WM10SetMessage));