Skip to content

Commit 29eb366

Browse files
authored
Merge pull request SmartThingsCommunity#52117 from SmartThingsCommunity/acceptance
Rolling up acceptance to production for deploy
2 parents ea55c2c + 96d3525 commit 29eb366

File tree

8 files changed

+69
-24
lines changed

8 files changed

+69
-24
lines changed

devicetypes/smartthings/aeon-key-fob.src/aeon-key-fob.groovy

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -197,15 +197,14 @@ def initialize() {
197197
def buttons = 1
198198

199199
if (zwaveInfo && zwaveInfo.mfr == "0086" && zwaveInfo.prod == "0001" && zwaveInfo.model == "0026") {
200-
sendEvent(name: "checkInterval", value: 8 * 60 * 60 + 2 * 60, displayed: false, data: [protocol: "zwave", hubHardwareId: device.hub.hardwareID])
201200
buttons = 1 // Only one button for Aeon Panic Button
202201
results << response(zwave.batteryV1.batteryGet().format())
203202
} else {
204-
// Device only goes OFFLINE when Hub is off
205-
sendEvent(name: "DeviceWatch-Enroll", value: JsonOutput.toJson([protocol: "zwave", scheme:"untracked"]), displayed: false)
206203
buttons = 4 // Default for Key Fob
207204
}
208205

206+
// These devices only go OFFLINE when Hub is off
207+
sendEvent(name: "DeviceWatch-Enroll", value: JsonOutput.toJson([protocol: "zwave", scheme:"untracked"]), displayed: false)
209208
sendEvent(name: "numberOfButtons", value: buttons, displayed: false)
210209
sendEvent(name: "supportedButtonValues", value: JsonOutput.toJson(["pushed", "held"]), displayed: false)
211210

devicetypes/smartthings/smartsense-motion-sensor.src/smartsense-motion-sensor.groovy

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ metadata {
4444
fingerprint profileId: "0104", deviceId: "0402", inClusters: "0000,0003,0500,0001,FFFF", manufacturer: "ADUROLIGHT", model: "VMS_ADUROLIGHT", deviceJoinName: "ERIA Motion Sensor", mnmn: "SmartThings", vid: "generic-motion-2" //ERIA Motion Sensor V2.0
4545
fingerprint profileId: "0104", deviceId: "0402", inClusters: "0000,0003,0500,0001,FFFF", manufacturer: "AduroSmart Eria", model: "VMS_ADUROLIGHT", deviceJoinName: "ERIA Motion Sensor", mnmn: "SmartThings", vid: "generic-motion-2" //ERIA Motion Sensor V2.1
4646
fingerprint profileId: "0104", deviceId: "0402", inClusters: "0000,0001,0003,000F,0020,0500", outClusters: "000A,0019", manufacturer: "frient A/S", model :"MOSZB-140", deviceJoinName: "frient Motion Sensor"
47+
fingerprint manufacturer: "frient A/S", model :"MOSZB-141", deviceJoinName: "frient Motion Sensor", mnmn: "SmartThingsCommunity", vid: "87753fce-8cd6-3b91-8bde-2483e564252d" // Raw description: 22 0104 0107 00 03 0000 0003 0406 00
4748
}
4849

4950
simulator {

devicetypes/smartthings/smartsense-open-closed-sensor.src/smartsense-open-closed-sensor.groovy

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ metadata {
4444
//Dawon
4545
fingerprint inClusters: "0000, 0003, 0006, 0500", outClusters: "0003, 0019", manufacturer: "DAWON_DNS", model: "SS-B100-ZB", deviceJoinName: "Dawon Signal Interlock", mnmn: "0AIg", vid: "dawon-zigbee-signal-interlock2"
4646
fingerprint profileId: "0104", deviceId: "0402", inClusters: "0000,0001,0003,000F,0020,0500", outClusters: "000A,0019", manufacturer: "frient A/S", model :"WISZB-120", deviceJoinName: "frient Open/Closed Sensor"
47+
fingerprint manufacturer: "frient A/S", model :"WISZB-121", deviceJoinName: "frient Open/Closed Sensor", mnmn: "SmartThingsCommunity", vid: "aaca16c3-fade-3cb3-b742-e2237f4ffd76" // Raw description: 23 0104 0402 00 06 0000 0001 0003 000F 0020 0500 02 000A 0019
4748
}
4849

4950
simulator {

devicetypes/smartthings/zigbee-metering-plug.src/zigbee-metering-plug.groovy

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ metadata {
4040
fingerprint profileId: "0104", manufacturer: "frient A/S", model: "SPLZB-131", deviceJoinName: "frient Outlet" // frient smart plug mini, raw description: 02 0104 0051 10 09 0000 0702 0003 0009 0B04 0006 0004 0005 0002 05 0000 0019 000A 0003 0406
4141
fingerprint profileId: "0104", manufacturer: "frient A/S", model: "SPLZB-132", deviceJoinName: "frient Outlet" // frient smart plug mini, raw description: 02 0104 0051 10 09 0000 0702 0003 0009 0B04 0006 0004 0005 0002 05 0000 0019 000A 0003 0406
4242
fingerprint profileId: "0104", manufacturer: "frient A/S", model: "SPLZB-134", deviceJoinName: "frient Outlet" // frient smart plug mini, raw description: 02 0104 0051 10 09 0000 0702 0003 0009 0B04 0006 0004 0005 0002 05 0000 0019 000A 0003 0406
43+
fingerprint profileId: "0104", manufacturer: "frient A/S", model: "SPLZB-137", deviceJoinName: "frient Outlet" // frient smart plug mini, raw description: 02 0104 0051 10 09 0000 0702 0003 0009 0B04 0006 0004 0005 0002 05 0000 0019 000A 0003 0406
4344
fingerprint profileId: "0104", manufacturer: "frient A/S", model: "SMRZB-143", deviceJoinName: "frient Outlet" // frient smart cable, raw description: 02 0104 0051 10 09 0000 0702 0003 0009 0B04 0006 0004 0005 0002 05 0000 0019 000A 0003 0406
4445
}
4546

devicetypes/smartthings/zwave-lock-without-codes.src/zwave-lock-without-codes.groovy

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@ metadata {
3030
fingerprint mfr: "021D", prod: "0003", model: "0001", deviceJoinName: "Alfred Door Lock" // DB2 //Alfred Smart Home Touchscreen Deadbolt
3131
//zw:Fs type:4001 mfr:0154 prod:0005 model:0001 ver:1.05 zwv:4.38 lib:03 cc:7A,73,80,5A,98 sec:5E,86,72,30,71,70,59,85,62
3232
fingerprint mfr: "0154", prod: "0005", model: "0001", deviceJoinName: "POPP Door Lock" // POPP Strike Lock Control POPE012501
33-
fingerprint mfr: "003B", prod: "0001", model: "0469", deviceJoinName: "Schlage Door Lock" //BE469ZP //Schlage Connect Smart Deadbolt Door Lock
3433
}
3534

3635
simulator {

devicetypes/smartthings/zwave-lock.src/zwave-lock.groovy

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ metadata {
4747
fingerprint mfr:"003B", prod:"6341", model:"5044", deviceJoinName: "Schlage Door Lock" //Schlage Touchscreen Deadbolt Door Lock
4848
fingerprint mfr:"003B", prod:"634B", model:"504C", deviceJoinName: "Schlage Door Lock" //Schlage Connected Keypad Lever Door Lock
4949
fingerprint mfr:"003B", prod:"0001", model:"0468", deviceJoinName: "Schlage Door Lock" //BE468ZP //Schlage Connect Smart Deadbolt Door Lock
50+
fingerprint mfr:"003B", prod:"0001", model:"0469", deviceJoinName: "Schlage Door Lock" //BE469ZP //Schlage Connect Smart Deadbolt Door Lock
5051
fingerprint mfr:"003B", prod:"0004", model:"2109", deviceJoinName: "Schlage Door Lock" //Schlage Keypad Deadbolt JBE109
5152
fingerprint mfr:"003B", prod:"0004", model:"6109", deviceJoinName: "Schlage Door Lock" //Schlage Keypad Lever JFE109
5253
// Yale

devicetypes/smartthings/zwave-metering-dimmer.src/zwave-metering-dimmer.groovy

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ metadata {
3737
fingerprint mfr:"0086", prod:"0003", model:"0063", deviceJoinName: "Aeotec Dimmer Switch" //EU //Aeotec Smart Dimmer 6
3838
fingerprint mfr:"0086", prod:"0103", model:"006F", deviceJoinName: "Aeotec Dimmer Switch", mnmn: "SmartThings", vid: "SmartThings-smartthings-Aeotec_Nano_Dimmer" //Aeotec Nano Dimmer
3939
fingerprint mfr:"0086", prod:"0003", model:"006F", deviceJoinName: "Aeotec Dimmer Switch", mnmn: "SmartThings", vid: "SmartThings-smartthings-Aeotec_Nano_Dimmer" //Aeotec Nano Dimmer
40-
fingerprint mfr:"0086", prod:"0203", model:"006F", deviceJoinName: "Aeotec Dimmer Switch" //AU //Aeotec Nano Dimmer
40+
fingerprint mfr:"0086", prod:"0203", model:"006F", deviceJoinName: "Aeotec Dimmer Switch", mnmn: "SmartThings", vid: "SmartThings-smartthings-Aeotec_Nano_Dimmer" //Aeotec Nano Dimmer, AU
4141
fingerprint mfr:"014F", prod:"5044", model:"3533", deviceJoinName: "GoControl Dimmer Switch" //GoControl Plug-in Dimmer
4242
}
4343

devicetypes/smartthings/zwave-multi-metering-switch.src/zwave-multi-metering-switch.groovy

Lines changed: 62 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,18 @@ metadata {
3030
fingerprint mfr: "0000", cc: "0x5E,0x25,0x27,0x32,0x81,0x71,0x60,0x8E,0x2C,0x2B,0x70,0x86,0x72,0x73,0x85,0x59,0x98,0x7A,0x5A", ccOut:"0x82", ui:"0x8700", deviceJoinName: "Aeotec Switch 1" //Aeotec Nano Switch 1
3131
fingerprint mfr: "027A", prod: "A000", model: "A004", deviceJoinName: "Zooz Switch" //Zooz ZEN Power Strip
3232
fingerprint mfr: "027A", prod: "A000", model: "A003", deviceJoinName: "Zooz Switch" //Zooz Double Plug
33+
// Raw Description zw:L type:1001 mfr:015F prod:3102 model:0201 ver:5.10 zwv:4.62 lib:03 cc:5E,85,59,8E,60,55,86,72,5A,73,25,27,70,2C,2B,5B,20,7A ccOut:5B,20,26 epc:1
34+
fingerprint mfr: "015F", prod: "3102", model: "0201", deviceJoinName: "WYFY Switch 1", mnmn: "SmartThings", vid: "generic-switch" //WYFY Touch 1-button Switch
35+
// Raw Description zw:L type:1001 mfr:015F prod:3102 model:0202 ver:5.10 zwv:4.62 lib:03 cc:5E,85,59,8E,60,55,86,72,5A,73,25,27,70,2C,2B,5B,20,7A ccOut:5B,20,26 epc:2
36+
fingerprint mfr: "015F", prod: "3102", model: "0202", deviceJoinName: "WYFY Switch 1", mnmn: "SmartThings", vid: "generic-switch" //WYFY Touch 2-button Switch
37+
// Raw Description zw:L type:1001 mfr:015F prod:3102 model:0204 ver:5.10 zwv:4.62 lib:03 cc:5E,85,59,8E,60,55,86,72,5A,73,25,27,70,2C,2B,5B,20,7A ccOut:5B,20,26 epc:4
38+
fingerprint mfr: "015F", prod: "3102", model: "0204", deviceJoinName: "WYFY Switch 1", mnmn: "SmartThings", vid: "generic-switch" //WYFY Touch 4-button Switch
39+
// Raw Description zw:L type:1001 mfr:015F prod:3111 model:5102 ver:5.10 zwv:4.62 lib:03 cc:5E,85,59,8E,60,55,86,72,5A,73,25,27,70,2C,2B,5B,20,7A ccOut:5B,20,26 epc:1
40+
fingerprint mfr: "015F", prod: "3111", model: "5102", deviceJoinName: "WYFY Switch 1", mnmn: "SmartThings", vid: "generic-switch" //WYFY Touch 1-button Switch
41+
// Raw Description zw:L type:1001 mfr:015F prod:3121 model:5102 ver:5.10 zwv:4.62 lib:03 cc:5E,85,59,8E,60,55,86,72,5A,73,25,27,70,2C,2B,5B,20,7A ccOut:5B,20,26 epc:2
42+
fingerprint mfr: "015F", prod: "3121", model: "5102", deviceJoinName: "WYFY Switch 1", mnmn: "SmartThings", vid: "generic-switch" //WYFY Touch 2-button Switch
43+
// Raw Description zw:L type:1001 mfr:015F prod:3141 model:5102 ver:5.10 zwv:4.62 lib:03 cc:5E,85,59,8E,60,55,86,72,5A,73,25,27,70,2C,2B,5B,20,7A ccOut:5B,20,26 epc:4
44+
fingerprint mfr: "015F", prod: "3141", model: "5102", deviceJoinName: "WYFY Switch 1", mnmn: "SmartThings", vid: "generic-switch" //WYFY Touch 4-button Switch
3345
}
3446

3547
tiles(scale: 2){
@@ -137,6 +149,11 @@ private lateConfigure() {
137149
encap(zwave.configurationV1.configurationSet(parameterNumber: 4, size: 4, scaledConfigurationValue: 600)) // enabling kWh energy reports every 10 minutes
138150
]
139151
break
152+
case "WYFY Touch":
153+
cmds = [
154+
encap(zwave.configurationV1.configurationSet(parameterNumber: 2, size: 1, scaledConfigurationValue: 1)) // Remebers state before power failure
155+
]
156+
break
140157
default:
141158
cmds = [encap(zwave.configurationV1.configurationSet(parameterNumber: 255, size: 1, scaledConfigurationValue: 0))]
142159
break
@@ -181,7 +198,6 @@ def zwaveEvent(physicalgraph.zwave.commands.switchbinaryv1.SwitchBinaryReport cm
181198

182199
private handleSwitchReport(endpoint, cmd) {
183200
def value = cmd.value ? "on" : "off"
184-
185201
if (isZoozZenStripV2()) {
186202
// device also sends reports without any endpoint specified, therefore all endpoints must be queried
187203
// sometimes it also reports 0.0 Wattage only until it's queried for it, then it starts reporting real values
@@ -195,7 +211,7 @@ private changeSwitch(endpoint, value) {
195211
if (endpoint == 1) {
196212
createEvent(name: "switch", value: value, isStateChange: true, descriptionText: "Switch ${endpoint} is ${value}")
197213
} else {
198-
String childDni = "${device.deviceNetworkId}:$endpoint"
214+
String childDni = "${device.deviceNetworkId}:${endpoint}"
199215
def child = childDevices.find { it.deviceNetworkId == childDni }
200216
child?.sendEvent(name: "switch", value: value, isStateChange: true, descriptionText: "Switch ${endpoint} is ${value}")
201217
}
@@ -231,8 +247,10 @@ private createMeterEventMap(cmd) {
231247
eventMap
232248
}
233249

250+
// This method handles unexpected commands
234251
def zwaveEvent(physicalgraph.zwave.Command cmd, ep) {
235-
log.warn "Unhandled ${cmd}" + (ep ? " from endpoint $ep" : "")
252+
// Handles all Z-Wave commands we aren't interested in
253+
log.warn "${device.displayName} - Unhandled ${cmd}" + (ep ? " from endpoint $ep" : "")
236254
}
237255

238256
def on() {
@@ -243,6 +261,9 @@ def off() {
243261
onOffCmd(0x00)
244262
}
245263

264+
// The Health Check capability uses the “checkInterval” attribute to determine the maximum number of seconds the device can go without generating new events.
265+
// If the device hasn’t created any events within that amount of time, SmartThings executes the “ping()” command.
266+
// If ping() does not generate any events, SmartThings marks the device as offline.
246267
def ping() {
247268
refresh()
248269
}
@@ -252,20 +273,31 @@ def childOnOff(deviceNetworkId, value) {
252273
if (switchId != null) sendHubCommand onOffCmd(value, switchId)
253274
}
254275

255-
private onOffCmd(value, endpoint = 1) {
256-
delayBetween([
257-
encap(zwave.basicV1.basicSet(value: value), endpoint),
258-
encap(zwave.basicV1.basicGet(), endpoint),
259-
"delay 3000",
260-
encap(zwave.meterV3.meterGet(scale: 0), endpoint),
261-
encap(zwave.meterV3.meterGet(scale: 2), endpoint)
262-
])
276+
def childOn(deviceNetworkId) {
277+
childOnOff(deviceNetworkId, 0xFF)
263278
}
264279

265-
private refreshAll(includeMeterGet = true) {
280+
def childOff(deviceNetworkId) {
281+
childOnOff(deviceNetworkId, 0x00)
282+
}
266283

267-
def endpoints = [1]
284+
private onOffCmd(value, endpoint = 1) {
285+
def cmds = []
286+
287+
cmds += encap(zwave.basicV1.basicSet(value: value), endpoint)
288+
cmds += encap(zwave.basicV1.basicGet(), endpoint)
289+
290+
if (deviceIncludesMeter()) {
291+
cmds += "delay 3000"
292+
cmds += encap(zwave.meterV3.meterGet(scale: 0), endpoint)
293+
cmds += encap(zwave.meterV3.meterGet(scale: 2), endpoint)
294+
}
295+
296+
delayBetween(cmds)
297+
}
268298

299+
private refreshAll(includeMeterGet = deviceIncludesMeter()) {
300+
def endpoints = [1]
269301
childDevices.each {
270302
def switchId = getSwitchId(it.deviceNetworkId)
271303
if (switchId != null) {
@@ -275,25 +307,22 @@ private refreshAll(includeMeterGet = true) {
275307
sendHubCommand refresh(endpoints,includeMeterGet)
276308
}
277309

278-
def childRefresh(deviceNetworkId, includeMeterGet = true) {
310+
def childRefresh(deviceNetworkId, includeMeterGet = deviceIncludesMeter()) {
279311
def switchId = getSwitchId(deviceNetworkId)
280312
if (switchId != null) {
281313
sendHubCommand refresh([switchId],includeMeterGet)
282314
}
283315
}
284316

285-
def refresh(endpoints = [1], includeMeterGet = true) {
286-
317+
def refresh(endpoints = [1], includeMeterGet = deviceIncludesMeter()) {
287318
def cmds = []
288-
289319
endpoints.each {
290320
cmds << [encap(zwave.basicV1.basicGet(), it)]
291321
if (includeMeterGet) {
292322
cmds << encap(zwave.meterV3.meterGet(scale: 0), it)
293323
cmds << encap(zwave.meterV3.meterGet(scale: 2), it)
294324
}
295325
}
296-
297326
delayBetween(cmds, 200)
298327
}
299328

@@ -339,11 +368,13 @@ private encap(cmd, endpoint = null) {
339368
}
340369

341370
private addChildSwitches(numberOfSwitches) {
371+
log.debug "${device.displayName} - Executing addChildSwitches()"
342372
for (def endpoint : 2..numberOfSwitches) {
343373
try {
344374
String childDni = "${device.deviceNetworkId}:$endpoint"
345375
def componentLabel = device.displayName[0..-2] + "${endpoint}"
346-
addChildDevice("Child Metering Switch", childDni, device.getHub().getId(), [
376+
def childDthName = deviceIncludesMeter() ? "Child Metering Switch" : "Child Switch"
377+
addChildDevice(childDthName, childDni, device.getHub().getId(), [
347378
completedSetup : true,
348379
label : componentLabel,
349380
isComponent : false
@@ -357,19 +388,31 @@ private addChildSwitches(numberOfSwitches) {
357388
def isAeotec() {
358389
getDeviceModel() == "Aeotec Nano Switch"
359390
}
391+
360392
def isZoozZenStripV2() {
361393
zwaveInfo.mfr.equals("027A") && zwaveInfo.model.equals("A004")
362394
}
395+
363396
def isZoozDoublePlug() {
364397
zwaveInfo.mfr.equals("027A") && zwaveInfo.model.equals("A003")
365398
}
366399

400+
def isWYFYTouch() {
401+
getDeviceModel() == "WYFY Touch"
402+
}
403+
367404
private getDeviceModel() {
368405
if ((zwaveInfo.mfr?.contains("0086") && zwaveInfo.model?.contains("0084")) || (getDataValue("mfr") == "86") && (getDataValue("model") == "84")) {
369406
"Aeotec Nano Switch"
370407
} else if(zwaveInfo.mfr?.contains("027A")) {
371408
"Zooz Switch"
409+
} else if(zwaveInfo.mfr?.contains("015F")) {
410+
"WYFY Touch"
372411
} else {
373412
""
374413
}
375414
}
415+
416+
private deviceIncludesMeter() {
417+
return !isWYFYTouch()
418+
}

0 commit comments

Comments
 (0)