Skip to content

Commit

Permalink
Merge branch 'sunricher_4button'
Browse files Browse the repository at this point in the history
  • Loading branch information
manup committed Apr 11, 2022
2 parents fac937a + 3c0129d commit 607e02a
Show file tree
Hide file tree
Showing 11 changed files with 1,060 additions and 57 deletions.
15 changes: 6 additions & 9 deletions bindings.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1830,8 +1830,8 @@ bool DeRestPluginPrivate::sendConfigureReportingRequest(BindingTask &bt)
rq.maxInterval = 43200; // Vendor defaults
rq.reportableChange8bit = 2; // Vendor defaults
}
else if (modelId.startsWith(QLatin1String("ED-1001")) || // EcoDim switches
modelId.startsWith(QLatin1String("45127")) || // Namron switches
else if (modelId == QLatin1String("4512705") || // Namron remote control
modelId == QLatin1String("4512726") || // Namron rotary switch
modelId == QLatin1String("CCT591011_AS") || // LK Wiser Door / Window Sensor
modelId == QLatin1String("CCT592011_AS") || // LK Wiser Water Leak Sensor
modelId.startsWith(QLatin1String("S57003")) || // SLC switches
Expand Down Expand Up @@ -3099,14 +3099,11 @@ bool DeRestPluginPrivate::checkSensorBindingsForAttributeReporting(Sensor *senso
sensor->modelId().startsWith(QLatin1String("ROB_200")) ||
// Sunricher
sensor->modelId().startsWith(QLatin1String("Micro Smart Dimmer")) ||
sensor->modelId().startsWith(QLatin1String("45127")) ||
sensor->modelId() == QLatin1String("4512705") || // Namron remote control
sensor->modelId() == QLatin1String("4512726") || // Namron rotary switch
sensor->modelId().startsWith(QLatin1String("ZG2835")) ||
// EcoDim
sensor->modelId().startsWith(QLatin1String("ED-1001")) ||
// RT-RK
sensor->modelId().startsWith(QLatin1String("SPW35Z")) ||
// Namron
sensor->modelId().startsWith(QLatin1String("45127")) ||
// SLC
sensor->modelId().startsWith(QLatin1String("S57003")) ||
// Plugwise
Expand Down Expand Up @@ -3844,8 +3841,8 @@ bool DeRestPluginPrivate::checkSensorBindingsForClientClusters(Sensor *sensor)
srcEndpoints.push_back(0x03);
srcEndpoints.push_back(0x04);
}
else if (sensor->modelId().startsWith(QLatin1String("ED-1001")) ||
sensor->modelId().startsWith(QLatin1String("45127")) ||
else if (sensor->modelId() == QLatin1String("4512705") || // Namron remote control
sensor->modelId() == QLatin1String("4512726") || // Namron rotary switch
sensor->modelId().startsWith(QLatin1String("S57003")))
{
clusters.push_back(ONOFF_CLUSTER_ID);
Expand Down
12 changes: 11 additions & 1 deletion button_maps.json
Original file line number Diff line number Diff line change
Expand Up @@ -1122,7 +1122,17 @@
"sunricherMap": {
"vendor": "Sunricher",
"doc": "Wireless switches from Sunricher, Namron, SLC and EcoDim",
"modelids": ["ED-10010", "ED-10011", "ED-10012", "ED-10013", "ED-10014", "ED-10015", "ZG2833K8_EU05", "ZG2833K4_EU06", "ZG2835", "4512700", "4512701", "4512702", "4512703", "4512705", "4512714", "4512719", "4512720", "4512721", "4512722", "4512729", "S57003", "ROB_200-008", "ROB_200-009-0", "ROB_200-008-0", "ROB_200-007-0"],
"modelids": ["ED-10010", "ED-10011", "ED-10012", "ED-10013", "ED-10014", "ED-10015", "ZG2833K2_EU07", "ZG2833K8_EU05", "ZG2833K4_EU06", "ZG2835", "4512701", "4512702", "4512703", "4512705", "4512719", "4512721", "4512729", "S57003", "ROB_200-008", "ROB_200-009-0", "ROB_200-008-0", "ROB_200-007-0"],
"buttons": [
{"S_BUTTON_1": "On 1"},
{"S_BUTTON_2": "Off 1"},
{"S_BUTTON_3": "On 2"},
{"S_BUTTON_4": "Off 2"},
{"S_BUTTON_5": "On 3"},
{"S_BUTTON_6": "Off 3"},
{"S_BUTTON_7": "On 4"},
{"S_BUTTON_8": "Off 4"}
],
"map": [
[1, "0x01", "ONOFF", "ON", "0", "S_BUTTON_1", "S_BUTTON_ACTION_SHORT_RELEASED", "On"],
[1, "0x01", "LEVEL_CONTROL", "MOVE_WITH_ON_OFF", "0", "S_BUTTON_1", "S_BUTTON_ACTION_HOLD", "Move up (with on/off)"],
Expand Down
Loading

0 comments on commit 607e02a

Please sign in to comment.