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

@@ -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
if (product_id == 0) {
// 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
name = "rf room temperature sensor";
device_type = DeviceType::THERMOSTAT;
} else if (device_id == 0x17) {
} else if (device_id == EMSdevice::EMS_DEVICE_ID_ROOMTHERMOSTAT) {
name = "generic thermostat";
device_type = DeviceType::THERMOSTAT;
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
} else if (device_id == EMSdevice::EMS_DEVICE_ID_CLOCK) {
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) {
name = "generic boiler";
device_type = DeviceType::BOILER;