diff --git a/src/emsdevice.h b/src/emsdevice.h index 43bad299a..d9bf4af37 100644 --- a/src/emsdevice.h +++ b/src/emsdevice.h @@ -358,10 +358,21 @@ class EMSdevice { }; // 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_1 = 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_AM200 = 0x60; // fixed device_id for alternative Heating AM200 + 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_BOILER_F = 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_RS232 = 0x04; + static constexpr uint8_t EMS_DEVICE_ID_TERMINAL = 0x0A; + static constexpr uint8_t EMS_DEVICE_ID_SERVICEKEY = 0x0B; + static constexpr uint8_t EMS_DEVICE_ID_CASCADE = 0x0C; + static constexpr uint8_t EMS_DEVICE_ID_EASYCOM = 0x0D; + static constexpr uint8_t EMS_DEVICE_ID_CONVERTER = 0x0E; + static constexpr uint8_t EMS_DEVICE_ID_CLOCK = 0x0F; + static constexpr uint8_t EMS_DEVICE_ID_SWITCH = 0x11; // Switch WM10 + static constexpr uint8_t EMS_DEVICE_ID_ERROR = 0x12; // Error module WM10 + static constexpr uint8_t EMS_DEVICE_ID_PUMP = 0x15; // pump module PM10 + static constexpr uint8_t EMS_DEVICE_ID_MODEM = 0x48; // generic type IDs static constexpr uint16_t EMS_TYPE_VERSION = 0x02; // type ID for Version information. Generic across all EMS devices. diff --git a/src/emsesp.cpp b/src/emsesp.cpp index 847c0fd36..5d5ced4fc 100644 --- a/src/emsesp.cpp +++ b/src/emsesp.cpp @@ -994,27 +994,27 @@ bool EMSESP::add_device(const uint8_t device_id, const uint8_t product_id, const name = "generic thermostat"; device_type = DeviceType::THERMOSTAT; flags = DeviceFlags::EMS_DEVICE_FLAG_RC10 | DeviceFlags::EMS_DEVICE_FLAG_NO_WRITE; - } else if (device_id == 0x04) { + } else if (device_id == EMSdevice::EMS_DEVICE_ID_RS232) { name = "RS232"; device_type = DeviceType::CONNECT; - } else if (device_id == 0x0A) { + } else if (device_id == EMSdevice::EMS_DEVICE_ID_TERMINAL) { name = "terminal"; device_type = DeviceType::CONNECT; - } else if (device_id == 0x0B) { + } else if (device_id == EMSdevice::EMS_DEVICE_ID_SERVICEKEY) { name = "service key"; device_type = DeviceType::CONNECT; - } else if (device_id == 0x0C) { + } else if (device_id == EMSdevice::EMS_DEVICE_ID_CASCADE) { name = "cascade"; device_type = DeviceType::CONNECT; - } else if (device_id == 0x0D) { + } else if (device_id == EMSdevice::EMS_DEVICE_ID_EASYCOM) { // see https://github.com/emsesp/EMS-ESP/issues/460#issuecomment-709553012 name = "modem"; device_type = DeviceType::CONNECT; - } else if (device_id == 0x0E) { + } else if (device_id == EMSdevice::EMS_DEVICE_ID_CONVERTER) { name = "converter"; // generic - } else if (device_id == 0x0F) { + } else if (device_id == EMSdevice::EMS_DEVICE_ID_CLOCK) { name = "clock"; // generic - } else if (device_id == 0x08) { + } else if (device_id == EMSdevice::EMS_DEVICE_ID_BOILER) { name = "generic boiler"; device_type = DeviceType::BOILER; flags = DeviceFlags::EMS_DEVICE_FLAG_HEATPUMP;