Bypass nodeDescriptor checks by modelId
Develco smoke detector has an empty nodeDescriptor for unknown reason. However, it is capable of binding and reporting. To bypass the check and allow for binding and reporting, whitelisting based on modelId is introduced. This may also be applicable for other devices where attribute reporting may fail.
@@ -592,9 +592,17 @@ bool DeRestPluginPrivate::sendBindRequest(BindingTask &bt)
}
if (!s.node() || s.node()->nodeDescriptor().isNull())
+ {
+ //whitelist sensors which don't seem to have a valid node descriptor
+ //This is a workaround currently only required for Develco smoke sensor
+ if (s.modelId().startsWith(QLatin1String("SMSZB-120")))
+ {
+ }
+ else
{
return false; // needs to be known
}
+ }
if (s.node()->nodeDescriptor().receiverOnWhenIdle())
{
@@ -1694,9 +1702,17 @@ bool DeRestPluginPrivate::checkSensorBindingsForAttributeReporting(Sensor *senso
}
if (sensor->node()->nodeDescriptor().isNull())
+ {
+ //whitelist sensors which don't seem to have a valid node descriptor
+ //This is a workaround currently only required for Develco smoke sensor
+ if (sensor->modelId().startsWith(QLatin1String("SMSZB-120")))
+ {
+ }
+ else
{
return false;
}
+ }
if (sensor->deletedState() != Sensor::StateNormal)
{
