name known device_ids

This commit is contained in:
MichaelDvP
2022-08-30 17:34:50 +02:00
parent 6b24a71ad7
commit be4f49e96d
2 changed files with 23 additions and 12 deletions

View File

@@ -358,10 +358,21 @@ 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_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_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_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 // generic type IDs
static constexpr uint16_t EMS_TYPE_VERSION = 0x02; // type ID for Version information. Generic across all EMS devices. static constexpr uint16_t EMS_TYPE_VERSION = 0x02; // type ID for Version information. Generic across all EMS devices.

View File

@@ -994,27 +994,27 @@ bool EMSESP::add_device(const uint8_t device_id, const uint8_t product_id, const
name = "generic thermostat"; name = "generic thermostat";
device_type = DeviceType::THERMOSTAT; device_type = DeviceType::THERMOSTAT;
flags = DeviceFlags::EMS_DEVICE_FLAG_RC10 | DeviceFlags::EMS_DEVICE_FLAG_NO_WRITE; 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"; name = "RS232";
device_type = DeviceType::CONNECT; device_type = DeviceType::CONNECT;
} else if (device_id == 0x0A) { } else if (device_id == EMSdevice::EMS_DEVICE_ID_TERMINAL) {
name = "terminal"; name = "terminal";
device_type = DeviceType::CONNECT; device_type = DeviceType::CONNECT;
} else if (device_id == 0x0B) { } else if (device_id == EMSdevice::EMS_DEVICE_ID_SERVICEKEY) {
name = "service key"; name = "service key";
device_type = DeviceType::CONNECT; device_type = DeviceType::CONNECT;
} else if (device_id == 0x0C) { } else if (device_id == EMSdevice::EMS_DEVICE_ID_CASCADE) {
name = "cascade"; name = "cascade";
device_type = DeviceType::CONNECT; 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 // see https://github.com/emsesp/EMS-ESP/issues/460#issuecomment-709553012
name = "modem"; name = "modem";
device_type = DeviceType::CONNECT; device_type = DeviceType::CONNECT;
} else if (device_id == 0x0E) { } else if (device_id == EMSdevice::EMS_DEVICE_ID_CONVERTER) {
name = "converter"; // generic name = "converter"; // generic
} else if (device_id == 0x0F) { } else if (device_id == EMSdevice::EMS_DEVICE_ID_CLOCK) {
name = "clock"; // generic name = "clock"; // generic
} else if (device_id == 0x08) { } else if (device_id == EMSdevice::EMS_DEVICE_ID_BOILER) {
name = "generic boiler"; name = "generic boiler";
device_type = DeviceType::BOILER; device_type = DeviceType::BOILER;
flags = DeviceFlags::EMS_DEVICE_FLAG_HEATPUMP; flags = DeviceFlags::EMS_DEVICE_FLAG_HEATPUMP;