Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enhancements and fixes #3317

Merged
merged 5 commits into from
Oct 1, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
55 changes: 54 additions & 1 deletion bindings.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1141,7 +1141,7 @@ bool DeRestPluginPrivate::sendConfigureReportingRequest(BindingTask &bt)
return sendConfigureReportingRequest(bt, {rq, rq2, rq3, rq4});
}

else if ( (sensor && sensor->modelId() == QLatin1String("eTRV0100")) || // Danfoss Ally
else if ( (sensor && sensor->modelId() == QLatin1String("eTRV0100")) || // Danfoss Ally
(sensor && sensor->modelId() == QLatin1String("TRV001")) ) // Hive TRV
{
rq.dataType = deCONZ::Zcl16BitInt;
Expand Down Expand Up @@ -1183,7 +1183,54 @@ bool DeRestPluginPrivate::sendConfigureReportingRequest(BindingTask &bt)
return sendConfigureReportingRequest(bt, {rq, rq2, rq3}) || // Use OR because of manuf. specific attributes
sendConfigureReportingRequest(bt, {rq4, rq5});
}
else if (sensor && sensor->modelId() == QLatin1String("902010/32")) // Bitron thermostat
{
rq.dataType = deCONZ::Zcl16BitInt;
rq.attributeId = 0x0000; // local temperature
rq.minInterval = 0;
rq.maxInterval = 300;
rq.reportableChange16bit = 10;

ConfigureReportingRequest rq2;
rq2.dataType = deCONZ::Zcl8BitUint;
rq2.attributeId = 0x0012; // Occupied heating setpoint
rq2.minInterval = 1;
rq2.maxInterval = 600;
rq2.reportableChange8bit = 1;

return sendConfigureReportingRequest(bt, {rq, rq2});
}
else if (sensor && sensor->modelId().startsWith(QLatin1String("TH112"))) // Sinope Thermostat TH1123ZB & TH1124ZB
{
rq.dataType = deCONZ::Zcl16BitInt;
rq.attributeId = 0x0000; // Local Temperature
rq.minInterval = 1;
rq.maxInterval = 600;
rq.reportableChange16bit = 10;

ConfigureReportingRequest rq2;
rq2.dataType = deCONZ::Zcl16BitInt;
rq2.attributeId = 0x0001; // Outdoor temperature
rq2.minInterval = 1;
rq2.maxInterval = 600;
rq2.reportableChange8bit = 10;

ConfigureReportingRequest rq3;
rq3.dataType = deCONZ::Zcl8BitUint;
rq3.attributeId = 0x0008; // Pi heating demand
rq3.minInterval = 60;
rq3.maxInterval = 3600;
rq3.reportableChange8bit = 1;

ConfigureReportingRequest rq4;
rq4.dataType = deCONZ::Zcl16BitInt;
rq4.attributeId = 0x0012; // Occupied heating setpoint
rq4.minInterval = 1;
rq4.maxInterval = 600;
rq4.reportableChange16bit = 50;

return sendConfigureReportingRequest(bt, {rq, rq2, rq3, rq4});
}
else
{
rq.dataType = deCONZ::Zcl16BitInt;
Expand Down Expand Up @@ -1960,6 +2007,12 @@ void DeRestPluginPrivate::checkLightBindingsForAttributeReporting(LightNode *lig
else if (lightNode->manufacturer() == QLatin1String("Immax"))
{
}
else if (lightNode->manufacturer().startsWith(QLatin1String("EcoDim")))
{
}
else if (lightNode->manufacturer().startsWith(QLatin1String("ROBB smarrt")))
{
}
else if (lightNode->manufacturer() == QLatin1String("sengled"))
{
}
Expand Down
1 change: 1 addition & 0 deletions database.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3346,6 +3346,7 @@ static int sqliteLoadAllSensorsCallback(void *user, int ncols, char **colval , c
(sensor.modelId() != QLatin1String("TS0121")) &&
(!sensor.modelId().startsWith(QLatin1String("BQZ10-AU"))) &&
(!sensor.modelId().startsWith(QLatin1String("ROB_200"))) &&
(!sensor.modelId().startsWith(QLatin1String("lumi.plug.ma"))) &&
(sensor.modelId() != QLatin1String("Plug-230V-ZB3.0")) &&
(sensor.modelId() != QLatin1String("lumi.switch.b1naus01")) &&
(sensor.modelId() != QLatin1String("Connected socket outlet")) &&
Expand Down
1 change: 1 addition & 0 deletions de_web_plugin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5750,6 +5750,7 @@ void DeRestPluginPrivate::addSensorNode(const deCONZ::Node *node, const SensorFi
(modelId != QLatin1String("TS0121")) &&
(!modelId.startsWith(QLatin1String("BQZ10-AU"))) &&
(!modelId.startsWith(QLatin1String("ROB_200"))) &&
(!modelId.startsWith(QLatin1String("lumi.plug.ma"))) &&
(modelId != QLatin1String("Plug-230V-ZB3.0")) &&
(modelId != QLatin1String("lumi.switch.b1naus01")) &&
(modelId != QLatin1String("Connected socket outlet")) &&
Expand Down
1 change: 1 addition & 0 deletions de_web_plugin_private.h
Original file line number Diff line number Diff line change
Expand Up @@ -342,6 +342,7 @@
#define VENDOR_DANFOSS 0x1246
#define VENDOR_NIKO_NV 0x125F
#define VENDOR_KONKE 0x1268
#define VENDOR_SHYUGJ_TECHNOLOGY 0x126A
#define VENDOR_OSRAM_STACK 0xBBAA
#define VENDOR_C2DF 0xC2DF
#define VENDOR_PHILIO 0xFFA0
Expand Down
46 changes: 46 additions & 0 deletions rest_lights.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1985,6 +1985,52 @@ int DeRestPluginPrivate::setWarningDeviceState(const ApiRequest &req, ApiRespons
{
task.options = 0x00; // Warning mode 0 (no warning), No strobe, Low sound
task.duration = 0;

// Quickfix for clearing the alarm bit of Develco smoke, heat and water leak sensor
if (taskRef.lightNode->modelId() == QLatin1String("SMSZB-120") ||
taskRef.lightNode->modelId() == QLatin1String("HESZB-120") ||
taskRef.lightNode->modelId() == QLatin1String("FLSZB-110"))
{
deCONZ::ApsDataRequest apsReq;

// ZDP Header
apsReq.dstAddress() = taskRef.lightNode->node()->address();
apsReq.setDstAddressMode(deCONZ::ApsNwkAddress);
apsReq.setDstEndpoint(0x23);
apsReq.setSrcEndpoint(0x01);
apsReq.setProfileId(HA_PROFILE_ID);
apsReq.setRadius(0);
apsReq.setClusterId(IAS_ZONE_CLUSTER_ID);

deCONZ::ZclFrame outZclFrame;
outZclFrame.setSequenceNumber(zclSeq++);
outZclFrame.setCommandId(deCONZ::ZclDefaultResponseId);
outZclFrame.setFrameControl(deCONZ::ZclFCProfileCommand |
deCONZ::ZclFCDirectionClientToServer |
deCONZ::ZclFCDisableDefaultResponse);

{ // ZCL payload
QDataStream stream(&outZclFrame.payload(), QIODevice::WriteOnly);
stream.setByteOrder(QDataStream::LittleEndian);

quint8 cmd = 0x00; // Zone Status Change notification
quint8 status = 0x00; // Success

stream << cmd;
stream << status;
}

{ // ZCL frame
QDataStream stream(&apsReq.asdu(), QIODevice::WriteOnly);
stream.setByteOrder(QDataStream::LittleEndian);
outZclFrame.writeToStream(stream);
}

if (apsCtrl && apsCtrl->apsdeDataRequest(apsReq) == deCONZ::Success)
{
queryTime = queryTime.addSecs(1);
}
}
}
else if (alert == "select")
{
Expand Down