Skip to content

Commit

Permalink
Merge remote-tracking branch 'swoopx/popp'
Browse files Browse the repository at this point in the history
  • Loading branch information
manup committed Jan 22, 2022
2 parents f42329c + d82ac30 commit 2298403
Show file tree
Hide file tree
Showing 7 changed files with 37 additions and 17 deletions.
15 changes: 11 additions & 4 deletions bindings.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1457,7 +1457,8 @@ bool DeRestPluginPrivate::sendConfigureReportingRequest(BindingTask &bt)
return sendConfigureReportingRequest(bt, {rq, rq2, rq3, rq4, rq5});
}
else if (modelId == QLatin1String("eTRV0100") || // Danfoss Ally
modelId == QLatin1String("TRV001")) // Hive TRV
modelId == QLatin1String("TRV001") || // Hive TRV
modelId == QLatin1String("eT093WRO")) // POPP smart thermostat
{
rq.dataType = deCONZ::Zcl16BitInt;
rq.attributeId = 0x0000; // local temperature
Expand Down Expand Up @@ -1687,7 +1688,8 @@ bool DeRestPluginPrivate::sendConfigureReportingRequest(BindingTask &bt)
else if (bt.binding.clusterId == THERMOSTAT_UI_CONFIGURATION_CLUSTER_ID)
{
if (modelId == QLatin1String("eTRV0100") || // Danfoss Ally
modelId == QLatin1String("TRV001")) // Hive TRV
modelId == QLatin1String("TRV001") || // Hive TRV
modelId == QLatin1String("eT093WRO")) // POPP smart thermostat
{
rq.dataType = deCONZ::Zcl8BitEnum;
rq.attributeId = 0x0001; // Keypad Lockout
Expand Down Expand Up @@ -1725,7 +1727,8 @@ bool DeRestPluginPrivate::sendConfigureReportingRequest(BindingTask &bt)
else if (bt.binding.clusterId == DIAGNOSTICS_CLUSTER_ID)
{
if (modelId == QLatin1String("eTRV0100") || // Danfoss Ally
modelId == QLatin1String("TRV001")) // Hive TRV
modelId == QLatin1String("TRV001") || // Hive TRV
modelId == QLatin1String("eT093WRO")) // POPP smart thermostat
{
rq.dataType = deCONZ::Zcl16BitBitMap;
rq.attributeId = 0x4000; // SW error code
Expand Down Expand Up @@ -1830,6 +1833,7 @@ bool DeRestPluginPrivate::sendConfigureReportingRequest(BindingTask &bt)
rq.reportableChange8bit = 4; // value used by Hue bridge
}
else if (modelId == QLatin1String("eTRV0100") || // Danfoss Ally
modelId == QLatin1String("eT093WRO") || // POPP smart thermostat
modelId == QLatin1String("TRV001") || // Hive TRV
modelId == QLatin1String("0x8020") || // Danfoss RT24V Display thermostat
modelId == QLatin1String("0x8021") || // Danfoss RT24V Display thermostat with floor sensor
Expand Down Expand Up @@ -3188,6 +3192,8 @@ bool DeRestPluginPrivate::checkSensorBindingsForAttributeReporting(Sensor *senso
sensor->modelId() == QLatin1String("0x8031") ||
sensor->modelId() == QLatin1String("0x8034") ||
sensor->modelId() == QLatin1String("0x8035") ||
// POPP
sensor->modelId() == QLatin1String("eT093WRO") ||
// Swann
sensor->modelId() == QLatin1String("SWO-MOS1PA") ||
// LIDL
Expand Down Expand Up @@ -3503,7 +3509,8 @@ bool DeRestPluginPrivate::checkSensorBindingsForAttributeReporting(Sensor *senso
else if (*i == DIAGNOSTICS_CLUSTER_ID)
{
if (sensor->modelId() == QLatin1String("eTRV0100") || // Danfoss Ally
sensor->modelId() == QLatin1String("TRV001")) // Hive TRV
sensor->modelId() == QLatin1String("TRV001") || // Hive TRV
sensor->modelId() == QLatin1String("eT093WRO")) // POPP smart thermostat
{
val = sensor->getZclValue(*i, 0x4000); // SW error code
}
Expand Down
3 changes: 2 additions & 1 deletion database.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3919,7 +3919,8 @@ static int sqliteLoadAllSensorsCallback(void *user, int ncols, char **colval , c
sensor.addItem(DataTypeString, RConfigFanMode);
}
else if (sensor.modelId() == QLatin1String("eTRV0100") || // Danfoss Ally
sensor.modelId() == QLatin1String("TRV001")) // Hive TRV
sensor.modelId() == QLatin1String("TRV001") || // Hive TRV
sensor.modelId() == QLatin1String("eT093WRO")) // POPP smart thermostat
{
sensor.addItem(DataTypeUInt8, RStateValve);
sensor.addItem(DataTypeString, RStateWindowOpen);
Expand Down
10 changes: 7 additions & 3 deletions de_web_plugin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -532,6 +532,7 @@ static const SupportedDevice supportedDevices[] = {
{ VENDOR_SCHNEIDER, "iTRV", silabs3MacPrefix }, // Drayton Wiser Radiator Thermostat
{ VENDOR_SCHNEIDER, "CCT593011_AS", emberMacPrefix }, // LK Wiser Temperature and Humidity Sensor
{ VENDOR_SCHNEIDER, "CCT595011_AS", emberMacPrefix }, // LK Wiser Motion Sensor
{ VENDOR_DANFOSS, "eT093WRO", silabs5MacPrefix }, // POPP Smart Thermostat
{ VENDOR_DANFOSS, "eTRV0100", silabs2MacPrefix }, // Danfoss Ally thermostat
{ VENDOR_DANFOSS, "0x8020", silabs6MacPrefix }, // Danfoss RT24V Display thermostat
{ VENDOR_DANFOSS, "0x8021", silabs6MacPrefix }, // Danfoss RT24V Display thermostat with floor sensor
Expand Down Expand Up @@ -6395,7 +6396,8 @@ void DeRestPluginPrivate::addSensorNode(const deCONZ::Node *node, const deCONZ::
{
// Many Xiaomi devices advertise non-functional Time cluster, so better use whitelist.
if (modelId == QLatin1String("Thermostat") || // eCozy
modelId == QLatin1String("eTRV0100")) // Danfoss
modelId == QLatin1String("eTRV0100") || // Danfoss
modelId == QLatin1String("eT093WRO")) // POPP smart thermostat
{
fpTimeSensor.inClusters.push_back(ci->id());
}
Expand Down Expand Up @@ -7708,8 +7710,9 @@ void DeRestPluginPrivate::addSensorNode(const deCONZ::Node *node, const SensorFi
sensorNode.addItem(DataTypeString, RConfigMode);
sensorNode.addItem(DataTypeString, RConfigFanMode);
}
else if ((modelId == QLatin1String("eTRV0100")) || // Danfoss Ally
(modelId == QLatin1String("TRV001")) ) // Hive TRV
else if (modelId == QLatin1String("eTRV0100") || // Danfoss Ally
modelId == QLatin1String("TRV001") || // Hive TRV
modelId == QLatin1String("eT093WRO")) // POPP smart thermostat
{
sensorNode.addItem(DataTypeUInt8, RStateValve);
sensorNode.addItem(DataTypeString, RStateWindowOpen);
Expand Down Expand Up @@ -16808,6 +16811,7 @@ void DeRestPlugin::idleTimerFired()
sensorNode->modelId().startsWith(QLatin1String("TH112")) || // Sinope devices
sensorNode->modelId().startsWith(QLatin1String("TH1300ZB")) || // Sinope devices
sensorNode->modelId().startsWith(QLatin1String("eTRV0100")) || // Danfoss Ally
sensorNode->modelId().startsWith(QLatin1String("eT093WRO")) || // POPP smart thermostat
sensorNode->modelId().startsWith(QLatin1String("0x8020")) || // Danfoss RT24V Display thermostat
sensorNode->modelId().startsWith(QLatin1String("0x8021")) || // Danfoss RT24V Display thermostat with floor sensor
sensorNode->modelId().startsWith(QLatin1String("0x8030")) || // Danfoss RTbattery Display thermostat
Expand Down
2 changes: 1 addition & 1 deletion diagnostics.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ void DeRestPluginPrivate::handleDiagnosticsClusterIndication(const deCONZ::ApsDa
{
case 0x4000: // SW error code
{
if (sensor->modelId() == QLatin1String("eTRV0100") || sensor->modelId() == QLatin1String("TRV001"))
if (sensor->modelId() == QLatin1String("eTRV0100") || sensor->modelId() == QLatin1String("TRV001") || sensor->modelId() == QLatin1String("eT093WRO"))
{
quint16 value = attr.numericValue().u16;
QString errorCode = QString("%1").arg(value, 4, 16, QLatin1Char('0')).toUpper();
Expand Down
9 changes: 6 additions & 3 deletions rest_sensors.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -966,7 +966,8 @@ int DeRestPluginPrivate::changeSensorConfig(const ApiRequest &req, ApiResponse &
}
}
}
else if (sensor->modelId() == QLatin1String("eTRV0100") || sensor->modelId() == QLatin1String("TRV001"))
else if (sensor->modelId() == QLatin1String("eTRV0100") || sensor->modelId() == QLatin1String("TRV001") ||
sensor->modelId() == QLatin1String("eT093WRO"))
{
if (data.integer < -25) { data.integer = -25; }
if (data.integer > 25) { data.integer = 25; }
Expand Down Expand Up @@ -1032,7 +1033,8 @@ int DeRestPluginPrivate::changeSensorConfig(const ApiRequest &req, ApiResponse &
updated = true;
}
}
else if (sensor->modelId() == QLatin1String("eTRV0100") || sensor->modelId() == QLatin1String("TRV001"))
else if (sensor->modelId() == QLatin1String("eTRV0100") || sensor->modelId() == QLatin1String("TRV001") ||
sensor->modelId() == QLatin1String("eT093WRO"))
{
if (addTaskThermostatCmd(task, VENDOR_DANFOSS, 0x40, data.integer, 0))
{
Expand Down Expand Up @@ -1520,7 +1522,8 @@ int DeRestPluginPrivate::changeSensorConfig(const ApiRequest &req, ApiResponse &
}
else if (rid.suffix == RConfigDisplayFlipped) // Boolean
{
if (sensor->modelId() == QLatin1String("eTRV0100") || sensor->modelId() == QLatin1String("TRV001"))
if (sensor->modelId() == QLatin1String("eTRV0100") || sensor->modelId() == QLatin1String("TRV001") ||
sensor->modelId() == QLatin1String("eT093WRO"))
{
data.uinteger = data.boolean; // Use integer representation

Expand Down
13 changes: 9 additions & 4 deletions thermostat.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -433,6 +433,7 @@ void DeRestPluginPrivate::handleThermostatClusterIndication(const deCONZ::ApsDat
{
if (sensor->modelId().startsWith(QLatin1String("SPZB")) || // Eurotronic Spirit
sensor->modelId() == QLatin1String("eTRV0100") || // Danfoss Ally
sensor->modelId() == QLatin1String("eT093WRO") || // POPP smart thermostat
sensor->modelId() == QLatin1String("TRV001") || // Hive TRV
sensor->modelId() == QLatin1String("Thermostat")) // eCozy
{
Expand Down Expand Up @@ -885,7 +886,8 @@ void DeRestPluginPrivate::handleThermostatClusterIndication(const deCONZ::ApsDat

// External Window Open signal
if (zclFrame.manufacturerCode() == VENDOR_DANFOSS && (sensor->modelId() == QLatin1String("eTRV0100") ||
sensor->modelId() == QLatin1String("TRV001")))
sensor->modelId() == QLatin1String("TRV001") ||
sensor->modelId() == QLatin1String("eT093WRO")))
{
bool enabled = attr.numericValue().u8 > 0 ? true : false;
item = sensor->item(RConfigExternalWindowOpen);
Expand Down Expand Up @@ -946,7 +948,8 @@ void DeRestPluginPrivate::handleThermostatClusterIndication(const deCONZ::ApsDat
case 0x4012: // Mounting mode active
{
if (zclFrame.manufacturerCode() == VENDOR_DANFOSS && (sensor->modelId() == QLatin1String("eTRV0100") ||
sensor->modelId() == QLatin1String("TRV001")))
sensor->modelId() == QLatin1String("TRV001") ||
sensor->modelId() == QLatin1String("eT093WRO")))
{
bool enabled = attr.numericValue().u8 > 0 ? true : false;
item = sensor->item(RStateMountingModeActive);
Expand All @@ -964,7 +967,8 @@ void DeRestPluginPrivate::handleThermostatClusterIndication(const deCONZ::ApsDat
case 0x4013: // Mounting mode control
{
if (zclFrame.manufacturerCode() == VENDOR_DANFOSS && (sensor->modelId() == QLatin1String("eTRV0100") ||
sensor->modelId() == QLatin1String("TRV001")))
sensor->modelId() == QLatin1String("TRV001") ||
sensor->modelId() == QLatin1String("eT093WRO")))
{
bool enabled = attr.numericValue().u8 > 0 ? true : false;
item = sensor->item(RConfigMountingMode);
Expand All @@ -982,7 +986,8 @@ void DeRestPluginPrivate::handleThermostatClusterIndication(const deCONZ::ApsDat
case 0x4015: // External Measured Room Sensor
{
if (zclFrame.manufacturerCode() == VENDOR_DANFOSS && (sensor->modelId() == QLatin1String("eTRV0100") ||
sensor->modelId() == QLatin1String("TRV001")))
sensor->modelId() == QLatin1String("TRV001") ||
sensor->modelId() == QLatin1String("eT093WRO")))
{
qint16 externalMeasurement = attr.numericValue().s16;
item = sensor->item(RConfigExternalTemperatureSensor);
Expand Down
2 changes: 1 addition & 1 deletion thermostat_ui_configuration.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ void DeRestPluginPrivate::handleThermostatUiConfigurationClusterIndication(const

case THERM_UI_ATTRID_VIEWING_DIRECTION:
{
if (sensor->modelId() == QLatin1String("eTRV0100") || sensor->modelId() == QLatin1String("TRV001"))
if (sensor->modelId() == QLatin1String("eTRV0100") || sensor->modelId() == QLatin1String("TRV001") || sensor->modelId() == QLatin1String("eT093WRO"))
{
bool displayflipped = attr.numericValue().u8 > 0 ? true : false;
item = sensor->item(RConfigDisplayFlipped);
Expand Down

0 comments on commit 2298403

Please sign in to comment.