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

Device enhancements and additions #2959

Merged
merged 29 commits into from
Jul 10, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
b3d62a8
Added initial support for Plugwise smart plug 160-01
SwoopX Jun 16, 2020
37b6648
Corrected power measurement unit for lumi.plug.maeu01
SwoopX Jun 16, 2020
f62d83b
Update for Xiaomi Smoke/Gas sensors to general.xml
SwoopX Jun 21, 2020
8da3f53
Corrected manufacturer code
SwoopX Jun 21, 2020
fcd9796
Added initial support for Xiaomi Mija (HonneyWell) gas detector
SwoopX Jun 21, 2020
04778f9
Remove battery for Xiaomi Aqara relay controller lumi.relay.c2acn01
SwoopX Jun 21, 2020
def2b98
Updates for Xiaomi special data reporting
SwoopX Jun 21, 2020
6e45dec
Update for Xiaomi special data reporting
SwoopX Jun 22, 2020
171594f
Revert prevention of power sensor creation, correction of interlock m…
SwoopX Jun 23, 2020
89b30f9
Manufacturer specific cluster updates for ZNCZ04LM (lumi.plug.mmeu01)
SwoopX Jun 24, 2020
fb0eb25
Added support for Niko smart socket 170-33505
SwoopX Jun 24, 2020
0eb62e3
Prevent Aqara relay (lumi.relay.c2acn01) to report -1 for power
SwoopX Jun 25, 2020
0531a9a
Update for Tuya/Blitzwolf smart plug (TS0121)
SwoopX Jun 27, 2020
903ee5a
Added "alert" action for groups via GET
SwoopX Jun 27, 2020
5614811
Fix release dim down button for RGBgenie ZB-5121
SwoopX Jun 27, 2020
0bcdcf5
Corrected mac prefix for ROBB smarrt ROB_200-011-0
SwoopX Jul 1, 2020
8fb71e6
Added support for Sunricher SR-ZG9040A (Micro Smart Dimmer)
SwoopX Jul 1, 2020
69a032a
Mac prefix correction
SwoopX Jul 1, 2020
110f796
Added Niko specific cluster to general.xml
SwoopX Jul 3, 2020
9ef21b5
Added initial support for Sinope TH1123ZB & TH1124ZB part 1
SwoopX Jul 3, 2020
1e1f043
Updated measurement unit of current for Ubisys devices
SwoopX Jul 3, 2020
be11fe3
Added initial support for Tuya/Jinvoo curtain switch SM-SW101-ZC (TS0…
SwoopX Jul 4, 2020
22657c6
Added initial support for Namron switch 1CH K4 (4512702)
SwoopX Jul 5, 2020
7860442
Added initial support for EcoDim ZB30 wireless switches (ED-1001*)
SwoopX Jul 7, 2020
cc95e7c
Added initial support for Heiman remote (RC-EM)
SwoopX Jul 8, 2020
a4b620f
Added support for Climax EMD-1ZBS power meter
SwoopX Jul 8, 2020
1fba63d
Added initial support for Sage doorbell sensor
SwoopX Jul 9, 2020
d0235b3
Update for Sage doorbell button map
SwoopX Jul 9, 2020
f5fbe53
Issue 2nd active endpoint request while 1st got MIA
SwoopX Jul 10, 2020
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
63 changes: 54 additions & 9 deletions bindings.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1163,6 +1163,7 @@ bool DeRestPluginPrivate::sendConfigureReportingRequest(BindingTask &bt)
sensor->modelId() == QLatin1String("multiv4") ||
sensor->modelId() == QLatin1String("RFDL-ZB-MS") ||
sensor->modelId() == QLatin1String("Zen-01") ||
sensor->modelId() == QLatin1String("Bell") ||
sensor->modelId().startsWith(QLatin1String("3315"))))
{
rq.attributeId = 0x0020; // battery voltage
Expand Down Expand Up @@ -1244,15 +1245,17 @@ bool DeRestPluginPrivate::sendConfigureReportingRequest(BindingTask &bt)
rq.maxInterval = 300;
if (sensor && (sensor->modelId() == QLatin1String("SmartPlug") || // Heiman
sensor->modelId() == QLatin1String("SKHMP30-I1") || // GS smart plug
sensor->modelId().startsWith(QLatin1String("E13-")))) // Sengled PAR38 Bulbs
sensor->modelId().startsWith(QLatin1String("E13-")) || // Sengled PAR38 Bulbs
sensor->modelId().startsWith(QLatin1String("Connected s")))) // Niko smart socket
{
rq.reportableChange48bit = 10; // 0.001 kWh (1 Wh)
}
else if (sensor && (sensor->modelId() == QLatin1String("SZ-ESW01-AU"))) // Sercomm / Telstra smart plug
{
rq.reportableChange48bit = 1000; // 0.001 kWh (1 Wh)
}
else if (sensor && (sensor->modelId().startsWith(QLatin1String("ROB_200")))) // ROBB Smarrt micro dimmer
else if (sensor && (sensor->modelId().startsWith(QLatin1String("ROB_200")) || // ROBB Smarrt micro dimmer
sensor->modelId().startsWith(QLatin1String("Micro Smart Dimmer")))) // Sunricher Micro Smart Dimmer
{
rq.reportableChange48bit = 3600; // 0.001 kWh (1 Wh)
}
Expand All @@ -1268,7 +1271,8 @@ bool DeRestPluginPrivate::sendConfigureReportingRequest(BindingTask &bt)
rq2.maxInterval = 300;
if (sensor && (sensor->modelId() == QLatin1String("SmartPlug") || // Heiman
sensor->modelId() == QLatin1String("902010/25") || // Bitron
sensor->modelId() == QLatin1String("SKHMP30-I1"))) // GS smart plug
sensor->modelId() == QLatin1String("SKHMP30-I1") ||// GS smart plug
sensor->modelId() == QLatin1String("160-01"))) // Plugwise smart plug
{
rq2.reportableChange24bit = 10; // 1 W
}
Expand All @@ -1294,7 +1298,9 @@ bool DeRestPluginPrivate::sendConfigureReportingRequest(BindingTask &bt)
if (sensor && (sensor->modelId() == QLatin1String("SmartPlug") || // Heiman
sensor->modelId() == QLatin1String("SKHMP30-I1") || // GS smart plug
sensor->modelId() == QLatin1String("SZ-ESW01-AU") || // Sercomm / Telstra smart plug
sensor->modelId().startsWith(QLatin1String("ROB_200")))) // ROBB Smarrt micro dimmer
sensor->modelId().startsWith(QLatin1String("ROB_200")) || // ROBB Smarrt micro dimmer
sensor->modelId().startsWith(QLatin1String("Micro Smart Dimmer")) || // Sunricher Micro Smart Dimmer
sensor->modelId().startsWith(QLatin1String("lumi.plug.maeu")))) // Xiaomi Aqara ZB3.0 smart plug
{
rq.reportableChange16bit = 10; // 1 W
}
Expand All @@ -1317,7 +1323,10 @@ bool DeRestPluginPrivate::sendConfigureReportingRequest(BindingTask &bt)
{
rq2.reportableChange16bit = 125; // 1 V
}
else if (sensor && sensor->modelId().startsWith(QLatin1String("ROB_200"))) // ROBB Smarrt micro dimmer
else if (sensor && (sensor->modelId().startsWith(QLatin1String("ROB_200")) || // ROBB Smarrt micro dimmer
sensor->modelId().startsWith(QLatin1String("Micro Smart Dimmer")) || // Sunricher Micro Smart Dimmer
sensor->modelId().startsWith(QLatin1String("Connected s")) || // Niko smart socket
sensor->modelId().startsWith(QLatin1String("TH112")))) // Sinope Thermostats
{
rq2.reportableChange16bit = 10; // 1 V
}
Expand All @@ -1333,7 +1342,9 @@ bool DeRestPluginPrivate::sendConfigureReportingRequest(BindingTask &bt)
rq3.maxInterval = 300;
if (sensor && (sensor->modelId() == QLatin1String("SP 120") || // innr
sensor->modelId() == QLatin1String("DoubleSocket50AU") || // Aurora
sensor->modelId() == QLatin1String("SZ-ESW01-AU"))) // Sercomm / Telstra smart plug
sensor->modelId() == QLatin1String("SZ-ESW01-AU") || // Sercomm / Telstra smart plug
sensor->modelId().startsWith(QLatin1String("Connected s")) || // Niko smart socket
sensor->modelId() == QLatin1String("TS0121"))) // Tuya / Blitzwolf
{
rq3.reportableChange16bit = 100; // 0.1 A
}
Expand Down Expand Up @@ -1915,6 +1926,7 @@ bool DeRestPluginPrivate::checkSensorBindingsForAttributeReporting(Sensor *senso
sensor->modelId().startsWith(QLatin1String("DC_")) ||
sensor->modelId().startsWith(QLatin1String("PSMD_")) ||
sensor->modelId().startsWith(QLatin1String("PSMP5_")) ||
sensor->modelId().startsWith(QLatin1String("PCM_")) ||
// CentraLite
sensor->modelId().startsWith(QLatin1String("Motion Sensor-A")) ||
sensor->modelId().startsWith(QLatin1String("332")) ||
Expand Down Expand Up @@ -1980,6 +1992,7 @@ bool DeRestPluginPrivate::checkSensorBindingsForAttributeReporting(Sensor *senso
sensor->modelId().startsWith(QLatin1String("PIRS")) ||
sensor->modelId().startsWith(QLatin1String("SKHMP30")) || // GS smart plug
sensor->modelId().startsWith(QLatin1String("RC_V14")) ||
sensor->modelId().startsWith(QLatin1String("RC-EM")) ||
// Konke
sensor->modelId() == QLatin1String("3AFE140103020000") ||
sensor->modelId() == QLatin1String("3AFE130104020015") ||
Expand Down Expand Up @@ -2010,6 +2023,7 @@ bool DeRestPluginPrivate::checkSensorBindingsForAttributeReporting(Sensor *senso
sensor->modelId() == QLatin1String("LG IP65 HMS") ||
// Sinope
sensor->modelId() == QLatin1String("WL4200S") ||
sensor->modelId().startsWith(QLatin1String("TH112")) ||
//LifeControl smart plug
sensor->modelId() == QLatin1String("RICI01") ||
//LifeControl enviroment sensor
Expand Down Expand Up @@ -2052,6 +2066,7 @@ bool DeRestPluginPrivate::checkSensorBindingsForAttributeReporting(Sensor *senso
// Tuya
sensor->modelId().startsWith(QLatin1String("TS01")) ||
sensor->modelId().startsWith(QLatin1String("TS02")) ||
sensor->modelId().startsWith(QLatin1String("TS03")) ||
// Tuyatec
sensor->modelId().startsWith(QLatin1String("RH3040")) ||
sensor->modelId().startsWith(QLatin1String("RH3001")) ||
Expand Down Expand Up @@ -2081,7 +2096,18 @@ bool DeRestPluginPrivate::checkSensorBindingsForAttributeReporting(Sensor *senso
// Embertec
sensor->modelId().startsWith(QLatin1String("BQZ10-AU")) ||
// ROBB Smarrt
sensor->modelId().startsWith(QLatin1String("ROB_200")))
sensor->modelId().startsWith(QLatin1String("ROB_200")) ||
// Sunricher
sensor->modelId().startsWith(QLatin1String("Micro Smart Dimmer")) ||
sensor->modelId().startsWith(QLatin1String("451270")) ||
// EcoDim
sensor->modelId().startsWith(QLatin1String("ED-1001")) ||
// Plugwise
sensor->modelId().startsWith(QLatin1String("160-01")) ||
// Niko
sensor->modelId() == QLatin1String("Connected socket outlet") ||
// Sage
sensor->modelId() == QLatin1String("Bell"))
{
deviceSupported = true;
if (!sensor->node()->nodeDescriptor().receiverOnWhenIdle() ||
Expand Down Expand Up @@ -2576,6 +2602,16 @@ bool DeRestPluginPrivate::checkSensorBindingsForClientClusters(Sensor *sensor)
srcEndpoints.push_back(0x03);
srcEndpoints.push_back(0x04);
}
else if (sensor->modelId().startsWith(QLatin1String("ED-1001")))
{
clusters.push_back(ONOFF_CLUSTER_ID);
clusters.push_back(LEVEL_CLUSTER_ID);
clusters.push_back(SCENE_CLUSTER_ID);
srcEndpoints.push_back(0x01);
srcEndpoints.push_back(0x02);
srcEndpoints.push_back(0x03);
srcEndpoints.push_back(0x04);
}
else if (sensor->modelId().startsWith(QLatin1String("D1")))
{
clusters.push_back(ONOFF_CLUSTER_ID);
Expand Down Expand Up @@ -2621,7 +2657,8 @@ bool DeRestPluginPrivate::checkSensorBindingsForClientClusters(Sensor *sensor)
srcEndpoints.push_back(sensor->fingerPrint().endpoint);
}
// Heiman remote control
else if (sensor->modelId().startsWith(QLatin1String("RC_V14")))
else if (sensor->modelId().startsWith(QLatin1String("RC_V14")) ||
sensor->modelId().startsWith(QLatin1String("RC-EM")))
{
clusters.push_back(IAS_ACE_CLUSTER_ID);
srcEndpoints.push_back(sensor->fingerPrint().endpoint);
Expand All @@ -2642,6 +2679,13 @@ bool DeRestPluginPrivate::checkSensorBindingsForClientClusters(Sensor *sensor)
srcEndpoints.push_back(0x01);
srcEndpoints.push_back(0x02);
}
// Sage doorbell sensor
else if (sensor->modelId().startsWith(QLatin1String("Bell")))
{
clusters.push_back(ONOFF_CLUSTER_ID);
clusters.push_back(LEVEL_CLUSTER_ID);
srcEndpoints.push_back(sensor->fingerPrint().endpoint);
}
else
{
return false;
Expand Down Expand Up @@ -2764,7 +2808,8 @@ void DeRestPluginPrivate::checkSensorGroup(Sensor *sensor)
sensor->modelId().startsWith(QLatin1String("TRADFRI remote control")) ||
sensor->modelId().startsWith(QLatin1String("TRADFRI wireless dimmer")) ||
// sensor->modelId().startsWith(QLatin1String("SYMFONISK")) ||
sensor->modelId().startsWith(QLatin1String("902010/23"))) // bitron remote
sensor->modelId().startsWith(QLatin1String("902010/23")) || // bitron remote
sensor->modelId().startsWith(QLatin1String("Bell")) // Sage doorbell sensor
{

}
Expand Down
9 changes: 7 additions & 2 deletions database.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3186,8 +3186,11 @@ static int sqliteLoadAllSensorsCallback(void *user, int ncols, char **colval , c
{
clusterId = clusterId ? clusterId : ANALOG_INPUT_CLUSTER_ID;
}
item = sensor.addItem(DataTypeUInt64, RStateConsumption);
item->setValue(0);
if (modelId != QLatin1String("160-01"))
{
item = sensor.addItem(DataTypeUInt64, RStateConsumption);
item->setValue(0);
}
}
else if (sensor.type().endsWith(QLatin1String("Power")))
{
Expand Down Expand Up @@ -3370,6 +3373,8 @@ static int sqliteLoadAllSensorsCallback(void *user, int ncols, char **colval , c
if (!sensor.modelId().startsWith(QLatin1String("lumi.ctrl_")) &&
!sensor.modelId().startsWith(QLatin1String("lumi.plug")) &&
sensor.modelId() != QLatin1String("lumi.curtain") &&
sensor.modelId() != QLatin1String("lumi.sensor_natgas") &&
!sensor.modelId().startsWith(QLatin1String("lumi.relay.c")) &&
!sensor.type().endsWith(QLatin1String("Battery")))
{
item = sensor.addItem(DataTypeUInt8, RConfigBattery);
Expand Down
Loading