add generic controller without product id #835

This commit is contained in:
MichaelDvP
2022-12-24 15:45:11 +01:00
parent a7f7959f91
commit 9d80c2cea7
2 changed files with 25 additions and 17 deletions

View File

@@ -346,21 +346,25 @@ 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_CONTROLLER = 0x09;
static constexpr uint8_t EMS_DEVICE_ID_TERMINAL = 0x0A; static constexpr uint8_t EMS_DEVICE_ID_RS232 = 0x04;
static constexpr uint8_t EMS_DEVICE_ID_SERVICEKEY = 0x0B; static constexpr uint8_t EMS_DEVICE_ID_TERMINAL = 0x0A;
static constexpr uint8_t EMS_DEVICE_ID_CASCADE = 0x0C; static constexpr uint8_t EMS_DEVICE_ID_SERVICEKEY = 0x0B;
static constexpr uint8_t EMS_DEVICE_ID_EASYCOM = 0x0D; static constexpr uint8_t EMS_DEVICE_ID_CASCADE = 0x0C;
static constexpr uint8_t EMS_DEVICE_ID_CONVERTER = 0x0E; static constexpr uint8_t EMS_DEVICE_ID_EASYCOM = 0x0D;
static constexpr uint8_t EMS_DEVICE_ID_CLOCK = 0x0F; static constexpr uint8_t EMS_DEVICE_ID_CONVERTER = 0x0E;
static constexpr uint8_t EMS_DEVICE_ID_SWITCH = 0x11; // Switch WM10 static constexpr uint8_t EMS_DEVICE_ID_CLOCK = 0x0F;
static constexpr uint8_t EMS_DEVICE_ID_ERROR = 0x12; // Error module WM10 static constexpr uint8_t EMS_DEVICE_ID_SWITCH = 0x11; // Switch WM10
static constexpr uint8_t EMS_DEVICE_ID_PUMP = 0x15; // pump module PM10 static constexpr uint8_t EMS_DEVICE_ID_ALERT = 0x12; // Error module EM10
static constexpr uint8_t EMS_DEVICE_ID_MODEM = 0x48; static constexpr uint8_t EMS_DEVICE_ID_PUMP = 0x15; // Pump module PM10
static constexpr uint8_t EMS_DEVICE_ID_MODEM = 0x48;
static constexpr uint8_t EMS_DEVICE_ID_RFSENSOR = 0x40; // RF sensor only sending, no reply
static constexpr uint8_t EMS_DEVICE_ID_RFBASE = 0x50;
static constexpr uint8_t EMS_DEVICE_ID_ROOMTHERMOSTAT = 0x17; //TADO using this with no version reply
// 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

@@ -992,11 +992,11 @@ bool EMSESP::add_device(const uint8_t device_id, const uint8_t product_id, const
// empty reply to version, read a generic device from database // empty reply to version, read a generic device from database
if (product_id == 0) { if (product_id == 0) {
// check for known device IDs // check for known device IDs
if (device_id == 0x40) { if (device_id == EMSdevice::EMS_DEVICE_ID_RFSENSOR) {
// see: https://github.com/emsesp/EMS-ESP32/issues/103#issuecomment-911717342 and https://github.com/emsesp/EMS-ESP32/issues/624 // see: https://github.com/emsesp/EMS-ESP32/issues/103#issuecomment-911717342 and https://github.com/emsesp/EMS-ESP32/issues/624
name = "rf room temperature sensor"; name = "rf room temperature sensor";
device_type = DeviceType::THERMOSTAT; device_type = DeviceType::THERMOSTAT;
} else if (device_id == 0x17) { } else if (device_id == EMSdevice::EMS_DEVICE_ID_ROOMTHERMOSTAT) {
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;
@@ -1020,6 +1020,10 @@ bool EMSESP::add_device(const uint8_t device_id, const uint8_t product_id, const
name = "converter"; // generic name = "converter"; // generic
} else if (device_id == EMSdevice::EMS_DEVICE_ID_CLOCK) { } else if (device_id == EMSdevice::EMS_DEVICE_ID_CLOCK) {
name = "clock"; // generic name = "clock"; // generic
device_type = DeviceType::CONTROLLER;
} else if (device_id == EMSdevice::EMS_DEVICE_ID_CONTROLLER) {
name = "generic controller";
device_type = DeviceType::CONTROLLER;
} else if (device_id == EMSdevice::EMS_DEVICE_ID_BOILER) { } else if (device_id == EMSdevice::EMS_DEVICE_ID_BOILER) {
name = "generic boiler"; name = "generic boiler";
device_type = DeviceType::BOILER; device_type = DeviceType::BOILER;