Skip to content

Commit 4e65254

Browse files
authored
Remove deprecated Danfoss code (dresden-elektronik#7472)
1 parent 8d644a5 commit 4e65254

12 files changed

+7
-454
lines changed

Diff for: CMakeLists.txt

-1
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,6 @@ add_library(${PROJECT_NAME} SHARED
161161
device_tick.cpp
162162
de_web_plugin.cpp
163163
de_web_widget.cpp
164-
diagnostics.cpp
165164
discovery.cpp
166165
electrical_measurement.cpp
167166
event.cpp

Diff for: bindings.cpp

+2-95
Original file line numberDiff line numberDiff line change
@@ -1368,48 +1368,6 @@ bool DeRestPluginPrivate::sendConfigureReportingRequest(BindingTask &bt)
13681368

13691369
return sendConfigureReportingRequest(bt, {rq, rq2, rq3, rq4, rq5});
13701370
}
1371-
else if (modelId == QLatin1String("TRV001") || // Hive TRV
1372-
modelId == QLatin1String("eT093WRO")) // POPP smart thermostat
1373-
{
1374-
rq.dataType = deCONZ::Zcl16BitInt;
1375-
rq.attributeId = 0x0000; // local temperature
1376-
rq.minInterval = 60;
1377-
rq.maxInterval = 3600;
1378-
rq.reportableChange16bit = 50;
1379-
1380-
ConfigureReportingRequest rq2;
1381-
rq2.dataType = deCONZ::Zcl8BitUint;
1382-
rq2.attributeId = 0x0008; // Pi heating demand
1383-
rq2.minInterval = 60;
1384-
rq2.maxInterval = 43200;
1385-
rq2.reportableChange8bit = 1;
1386-
1387-
ConfigureReportingRequest rq3;
1388-
rq3.dataType = deCONZ::Zcl16BitInt;
1389-
rq3.attributeId = 0x0012; // Occupied heating setpoint
1390-
rq3.minInterval = 1;
1391-
rq3.maxInterval = 43200;
1392-
rq3.reportableChange16bit = 1;
1393-
1394-
ConfigureReportingRequest rq4;
1395-
rq4.dataType = deCONZ::Zcl8BitEnum;
1396-
rq4.attributeId = 0x4000; // eTRV Open Window detection
1397-
rq4.minInterval = 1;
1398-
rq4.maxInterval = 43200;
1399-
rq4.reportableChange8bit = 0xff;
1400-
rq4.manufacturerCode = VENDOR_DANFOSS;
1401-
1402-
ConfigureReportingRequest rq5;
1403-
rq5.dataType = deCONZ::ZclBoolean;
1404-
rq5.attributeId = 0x4012; // Mounting mode active
1405-
rq5.minInterval = 1;
1406-
rq5.maxInterval = 43200;
1407-
rq5.reportableChange8bit = 0xff;
1408-
rq5.manufacturerCode = VENDOR_DANFOSS;
1409-
1410-
return sendConfigureReportingRequest(bt, {rq, rq2, rq3}) || // Use OR because of manuf. specific attributes
1411-
sendConfigureReportingRequest(bt, {rq4, rq5});
1412-
}
14131371
else if (sensor && (modelId == QLatin1String("0x8020") || // Danfoss RT24V Display thermostat
14141372
modelId == QLatin1String("0x8021") || // Danfoss RT24V Display thermostat with floor sensor
14151373
modelId == QLatin1String("0x8030") || // Danfoss RTbattery Display thermostat
@@ -1598,27 +1556,7 @@ bool DeRestPluginPrivate::sendConfigureReportingRequest(BindingTask &bt)
15981556
}
15991557
else if (bt.binding.clusterId == THERMOSTAT_UI_CONFIGURATION_CLUSTER_ID)
16001558
{
1601-
if (modelId == QLatin1String("TRV001") || // Hive TRV
1602-
modelId == QLatin1String("eT093WRO")) // POPP smart thermostat
1603-
{
1604-
rq.dataType = deCONZ::Zcl8BitEnum;
1605-
rq.attributeId = 0x0001; // Keypad Lockout
1606-
rq.minInterval = 1;
1607-
rq.maxInterval = 43200;
1608-
rq.reportableChange8bit = 0xff;
1609-
1610-
ConfigureReportingRequest rq2;
1611-
rq2.dataType = deCONZ::Zcl8BitEnum;
1612-
rq2.attributeId = 0x4000; // Viewing Direction
1613-
rq2.minInterval = 1;
1614-
rq2.maxInterval = 43200;
1615-
rq2.reportableChange8bit = 0xff;
1616-
rq2.manufacturerCode = VENDOR_DANFOSS;
1617-
1618-
return sendConfigureReportingRequest(bt, {rq}) || // Use OR because of manuf. specific attributes
1619-
sendConfigureReportingRequest(bt, {rq2});
1620-
}
1621-
else if (modelId == QLatin1String("SORB") || // Stelpro Orleans Fan
1559+
if (modelId == QLatin1String("SORB") || // Stelpro Orleans Fan
16221560
modelId == QLatin1String("TH1300ZB") || // Sinope thermostat
16231561
modelId == QLatin1String("PR412C") || // Owon thermostat
16241562
modelId == QLatin1String("iTRV") || // Drayton Wiser Radiator Thermostat
@@ -1634,20 +1572,6 @@ bool DeRestPluginPrivate::sendConfigureReportingRequest(BindingTask &bt)
16341572
return sendConfigureReportingRequest(bt, {rq});
16351573
}
16361574
}
1637-
else if (bt.binding.clusterId == DIAGNOSTICS_CLUSTER_ID)
1638-
{
1639-
if (modelId == QLatin1String("TRV001") || // Hive TRV
1640-
modelId == QLatin1String("eT093WRO")) // POPP smart thermostat
1641-
{
1642-
rq.dataType = deCONZ::Zcl16BitBitMap;
1643-
rq.attributeId = 0x4000; // SW error code
1644-
rq.minInterval = 1;
1645-
rq.maxInterval = 43200;
1646-
rq.reportableChange16bit = 0xffff;
1647-
rq.manufacturerCode = VENDOR_DANFOSS;
1648-
return sendConfigureReportingRequest(bt, {rq});
1649-
}
1650-
}
16511575
else if (bt.binding.clusterId == FAN_CONTROL_CLUSTER_ID)
16521576
{
16531577
if (modelId.startsWith(QLatin1String("3157100"))) // Centralite pearl
@@ -1713,9 +1637,7 @@ bool DeRestPluginPrivate::sendConfigureReportingRequest(BindingTask &bt)
17131637
rq.maxInterval = 7200; // value used by Hue bridge
17141638
rq.reportableChange8bit = 0; // value used by Hue bridge
17151639
}
1716-
else if (modelId == QLatin1String("eT093WRO") || // POPP smart thermostat
1717-
modelId == QLatin1String("TRV001") || // Hive TRV
1718-
modelId == QLatin1String("0x8020") || // Danfoss RT24V Display thermostat
1640+
else if (modelId == QLatin1String("0x8020") || // Danfoss RT24V Display thermostat
17191641
modelId == QLatin1String("0x8021") || // Danfoss RT24V Display thermostat with floor sensor
17201642
modelId == QLatin1String("0x8030") || // Danfoss RTbattery Display thermostat
17211643
modelId == QLatin1String("0x8031") || // Danfoss RTbattery Display thermostat with infrared
@@ -2784,7 +2706,6 @@ bool DeRestPluginPrivate::checkSensorBindingsForAttributeReporting(Sensor *senso
27842706
sensor->modelId() == QLatin1String("SLR1b") ||
27852707
sensor->modelId() == QLatin1String("SLT2") ||
27862708
sensor->modelId() == QLatin1String("SLT3") ||
2787-
sensor->modelId() == QLatin1String("TRV001") ||
27882709
// Sengled
27892710
sensor->modelId().startsWith(QLatin1String("E13-")) ||
27902711
sensor->modelId().startsWith(QLatin1String("E1D-")) ||
@@ -2862,8 +2783,6 @@ bool DeRestPluginPrivate::checkSensorBindingsForAttributeReporting(Sensor *senso
28622783
sensor->modelId() == QLatin1String("0x8031") ||
28632784
sensor->modelId() == QLatin1String("0x8034") ||
28642785
sensor->modelId() == QLatin1String("0x8035") ||
2865-
// POPP
2866-
sensor->modelId() == QLatin1String("eT093WRO") ||
28672786
// Swann
28682787
sensor->modelId() == QLatin1String("SWO-MOS1PA") ||
28692788
// LIDL
@@ -3105,18 +3024,6 @@ bool DeRestPluginPrivate::checkSensorBindingsForAttributeReporting(Sensor *senso
31053024
{
31063025
val = sensor->getZclValue(*i, 0x0001); // Keypad lockout
31073026
}
3108-
else if (*i == DIAGNOSTICS_CLUSTER_ID)
3109-
{
3110-
if (sensor->modelId() == QLatin1String("TRV001") || // Hive TRV
3111-
sensor->modelId() == QLatin1String("eT093WRO")) // POPP smart thermostat
3112-
{
3113-
val = sensor->getZclValue(*i, 0x4000); // SW error code
3114-
}
3115-
else
3116-
{
3117-
continue;
3118-
}
3119-
}
31203027
else if (*i == SAMJIN_CLUSTER_ID)
31213028
{
31223029
val = sensor->getZclValue(*i, 0x0012); // Acceleration X

Diff for: database.cpp

-16
Original file line numberDiff line numberDiff line change
@@ -3959,22 +3959,6 @@ static int sqliteLoadAllSensorsCallback(void *user, int ncols, char **colval , c
39593959
sensor.addItem(DataTypeString, RConfigMode);
39603960
sensor.addItem(DataTypeString, RConfigFanMode);
39613961
}
3962-
else if (sensor.modelId() == QLatin1String("TRV001") || // Hive TRV
3963-
sensor.modelId() == QLatin1String("eT093WRO")) // POPP smart thermostat
3964-
{
3965-
sensor.addItem(DataTypeUInt8, RStateValve);
3966-
sensor.addItem(DataTypeString, RStateWindowOpen);
3967-
sensor.addItem(DataTypeBool, RStateMountingModeActive)->setValue(false);
3968-
sensor.addItem(DataTypeString, RStateErrorCode);
3969-
sensor.addItem(DataTypeBool, RConfigDisplayFlipped)->setValue(false);
3970-
sensor.addItem(DataTypeBool, RConfigLocked)->setValue(false);
3971-
sensor.addItem(DataTypeBool, RConfigMountingMode)->setValue(false);
3972-
// Supported with Danfoss firmware version 1.08
3973-
sensor.addItem(DataTypeBool, RConfigScheduleOn)->setValue(false);
3974-
sensor.addItem(DataTypeString, RConfigSchedule);
3975-
sensor.addItem(DataTypeInt16, RConfigExternalTemperatureSensor)->setValue(0);
3976-
sensor.addItem(DataTypeBool, RConfigExternalWindowOpen)->setValue(false);
3977-
}
39783962
else if (sensor.modelId() == QLatin1String("iTRV")) // Drayton Wiser Radiator Thermostat
39793963
{
39803964
sensor.addItem(DataTypeUInt8, RStateValve);

Diff for: de_web.pro

-1
Original file line numberDiff line numberDiff line change
@@ -209,7 +209,6 @@ SOURCES = air_quality.cpp \
209209
device_js/device_js_wrappers.cpp \
210210
device_js/duktape.c \
211211
device_tick.cpp \
212-
diagnostics.cpp \
213212
discovery.cpp \
214213
de_web_plugin.cpp \
215214
de_web_widget.cpp \

Diff for: de_web_plugin.cpp

+1-26
Original file line numberDiff line numberDiff line change
@@ -451,7 +451,6 @@ static const SupportedDevice supportedDevices[] = {
451451
{ VENDOR_ALERTME, "SLR2b", computimeMacPrefix }, // Hive Heating Receiver 2 channel second version
452452
{ VENDOR_ALERTME, "SLT2", computimeMacPrefix }, // Hive thermostat
453453
{ VENDOR_ALERTME, "SLT3", computimeMacPrefix }, // Hive thermostat
454-
{ VENDOR_DANFOSS, "TRV001", silabs2MacPrefix }, // Hive thermostat (From Danfoss)
455454
{ VENDOR_SUNRICHER, "4512705", silabs2MacPrefix }, // Namron remote control
456455
{ VENDOR_SUNRICHER, "4512726", silabs2MacPrefix }, // Namron rotary switch
457456
{ VENDOR_SUNRICHER, "S57003", silabs2MacPrefix }, // SLC 4-ch remote controller
@@ -484,7 +483,6 @@ static const SupportedDevice supportedDevices[] = {
484483
{ VENDOR_SCHNEIDER, "iTRV", silabs3MacPrefix }, // Drayton Wiser Radiator Thermostat
485484
{ VENDOR_SCHNEIDER, "CCT593011_AS", emberMacPrefix }, // LK Wiser Temperature and Humidity Sensor
486485
{ VENDOR_SCHNEIDER, "CCT595011_AS", emberMacPrefix }, // LK Wiser Motion Sensor
487-
{ VENDOR_DANFOSS, "eT093WRO", silabs5MacPrefix }, // POPP Smart Thermostat
488486
{ VENDOR_DANFOSS, "0x8020", silabs6MacPrefix }, // Danfoss RT24V Display thermostat
489487
{ VENDOR_DANFOSS, "0x8021", silabs6MacPrefix }, // Danfoss RT24V Display thermostat with floor sensor
490488
{ VENDOR_DANFOSS, "0x8030", silabs6MacPrefix }, // Danfoss RTbattery Display thermostat
@@ -1313,10 +1311,6 @@ void DeRestPluginPrivate::apsdeDataIndication(const deCONZ::ApsDataIndication &i
13131311
if (!DEV_TestStrict() && !devManaged) { handleThermostatUiConfigurationClusterIndication(ind, zclFrame); }
13141312
break;
13151313

1316-
case DIAGNOSTICS_CLUSTER_ID:
1317-
if (!DEV_TestStrict() && !devManaged) { handleDiagnosticsClusterIndication(ind, zclFrame); }
1318-
break;
1319-
13201314
case IDENTIFY_CLUSTER_ID:
13211315
handleIdentifyClusterIndication(ind, zclFrame);
13221316
break;
@@ -6294,8 +6288,7 @@ void DeRestPluginPrivate::addSensorNode(const deCONZ::Node *node, const deCONZ::
62946288
case TIME_CLUSTER_ID:
62956289
{
62966290
// Many Xiaomi devices advertise non-functional Time cluster, so better use whitelist.
6297-
if (modelId == QLatin1String("Thermostat") || // eCozy
6298-
modelId == QLatin1String("eT093WRO")) // POPP smart thermostat
6291+
if (modelId == QLatin1String("Thermostat")) // eCozy
62996292
{
63006293
fpTimeSensor.inClusters.push_back(ci->id());
63016294
}
@@ -7541,22 +7534,6 @@ void DeRestPluginPrivate::addSensorNode(const deCONZ::Node *node, const SensorFi
75417534
sensorNode.addItem(DataTypeString, RConfigMode);
75427535
sensorNode.addItem(DataTypeString, RConfigFanMode);
75437536
}
7544-
else if (modelId == QLatin1String("TRV001") || // Hive TRV
7545-
modelId == QLatin1String("eT093WRO")) // POPP smart thermostat
7546-
{
7547-
sensorNode.addItem(DataTypeUInt8, RStateValve);
7548-
sensorNode.addItem(DataTypeString, RStateWindowOpen);
7549-
sensorNode.addItem(DataTypeBool, RStateMountingModeActive)->setValue(false);
7550-
sensorNode.addItem(DataTypeString, RStateErrorCode);
7551-
sensorNode.addItem(DataTypeBool, RConfigDisplayFlipped)->setValue(false);
7552-
sensorNode.addItem(DataTypeBool, RConfigLocked)->setValue(false);
7553-
sensorNode.addItem(DataTypeBool, RConfigMountingMode)->setValue(false);
7554-
// Supported with Danfoss firmware version 1.08
7555-
sensorNode.addItem(DataTypeBool, RConfigScheduleOn)->setValue(false);
7556-
sensorNode.addItem(DataTypeString, RConfigSchedule);
7557-
sensorNode.addItem(DataTypeInt16, RConfigExternalTemperatureSensor)->setValue(0);
7558-
sensorNode.addItem(DataTypeBool, RConfigExternalWindowOpen)->setValue(false);
7559-
}
75607537
else if (modelId == QLatin1String("PR412C")) // OWON PCT502 Thermostat
75617538
{
75627539
sensorNode.addItem(DataTypeBool, RConfigLocked)->setValue(false);
@@ -15583,10 +15560,8 @@ void DeRestPlugin::idleTimerFired()
1558315560
sensorNode->modelId().startsWith(QLatin1String("SLT3")) || // Hive Active Heating Thermostat
1558415561
sensorNode->modelId().startsWith(QLatin1String("SLR2")) || // Hive Active Heating Receiver 2 channel
1558515562
sensorNode->modelId().startsWith(QLatin1String("SLR1b")) || // Hive Active Heating Receiver 1 channel
15586-
sensorNode->modelId().startsWith(QLatin1String("TRV001")) || // Hive TRV
1558715563
sensorNode->modelId().startsWith(QLatin1String("TH112")) || // Sinope devices
1558815564
sensorNode->modelId().startsWith(QLatin1String("TH1300ZB")) || // Sinope devices
15589-
sensorNode->modelId().startsWith(QLatin1String("eT093WRO")) || // POPP smart thermostat
1559015565
sensorNode->modelId().startsWith(QLatin1String("0x8020")) || // Danfoss RT24V Display thermostat
1559115566
sensorNode->modelId().startsWith(QLatin1String("0x8021")) || // Danfoss RT24V Display thermostat with floor sensor
1559215567
sensorNode->modelId().startsWith(QLatin1String("0x8030")) || // Danfoss RTbattery Display thermostat

Diff for: de_web_plugin_private.h

-1
Original file line numberDiff line numberDiff line change
@@ -1596,7 +1596,6 @@ public Q_SLOTS:
15961596
void handleThermostatUiConfigurationClusterIndication(const deCONZ::ApsDataIndication &ind, deCONZ::ZclFrame &zclFrame);
15971597
void handleAirQualityClusterIndication(const deCONZ::ApsDataIndication &ind, deCONZ::ZclFrame &zclFrame);
15981598
void handleTimeClusterIndication(const deCONZ::ApsDataIndication &ind, deCONZ::ZclFrame &zclFrame);
1599-
void handleDiagnosticsClusterIndication(const deCONZ::ApsDataIndication &ind, deCONZ::ZclFrame &zclFrame);
16001599
void handleFanControlClusterIndication(const deCONZ::ApsDataIndication &ind, deCONZ::ZclFrame &zclFrame);
16011600
void handleIdentifyClusterIndication(const deCONZ::ApsDataIndication &ind, const deCONZ::ZclFrame &zclFrame);
16021601
void sendTimeClusterResponse(const deCONZ::ApsDataIndication &ind, deCONZ::ZclFrame &zclFrame);

Diff for: diagnostics.cpp

-111
This file was deleted.

0 commit comments

Comments
 (0)