Compare commits
19 Commits
user186_3
...
MSA-2476-1
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
341943f342 | ||
|
|
ecd7bf2a82 | ||
|
|
ee3f125bca | ||
|
|
c93435b14d | ||
|
|
134b108df5 | ||
|
|
b850e772d7 | ||
|
|
0d617ab5a8 | ||
|
|
e8ef2d052f | ||
|
|
001ba48b5c | ||
|
|
1e088b1655 | ||
|
|
6a91660719 | ||
|
|
b007d59220 | ||
|
|
5043ccef9a | ||
|
|
2129c6c5d3 | ||
|
|
fd9d4fe283 | ||
|
|
a241804190 | ||
|
|
22de1551fe | ||
|
|
2bcf1de354 | ||
|
|
92d6d13f62 |
@@ -24,7 +24,10 @@ metadata {
|
||||
capability "Temperature Measurement"
|
||||
capability "Health Check"
|
||||
|
||||
fingerprint deviceId: "0x0701", inClusters: "0x5E, 0x20, 0x86, 0x72, 0x5A, 0x59, 0x85, 0x73, 0x84, 0x80, 0x71, 0x56, 0x70, 0x31, 0x8E, 0x22, 0x30, 0x9C, 0x98, 0x7A", outClusters: ""
|
||||
fingerprint deviceId: "0x0701", inClusters: "0x5E, 0x20, 0x86, 0x72, 0x5A, 0x59, 0x85, 0x73, 0x84, 0x80, 0x71, 0x56, 0x70, 0x31, 0x8E, 0x22, 0x30, 0x9C, 0x98, 0x7A", outClusters: ""
|
||||
fingerprint mfr:"010F", prod:"0801", model:"2001"
|
||||
fingerprint mfr:"010F", prod:"0801", model:"1001"
|
||||
|
||||
}
|
||||
|
||||
simulator {
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
*/
|
||||
|
||||
metadata {
|
||||
definition (name: "Aeon Multisensor 6", namespace: "smartthings", author: "SmartThings") {
|
||||
definition (name: "Aeon Multisensor 6", namespace: "smartthings", author: "SmartThings", runLocally: true, minHubCoreVersion: '000.020.00008', executeCommandsLocally: true) {
|
||||
capability "Motion Sensor"
|
||||
capability "Temperature Measurement"
|
||||
capability "Relative Humidity Measurement"
|
||||
|
||||
@@ -25,7 +25,6 @@ metadata {
|
||||
fingerprint mfr:"0063", prod:"4457", deviceJoinName: "GE In-Wall Smart Dimmer"
|
||||
fingerprint mfr:"0063", prod:"4944", deviceJoinName: "GE In-Wall Smart Dimmer"
|
||||
fingerprint mfr:"0063", prod:"5044", deviceJoinName: "GE Plug-In Smart Dimmer"
|
||||
fingerprint mfr:"0063", prod:"4944", model:"3034", deviceJoinName: "GE In-Wall Smart Fan Control"
|
||||
}
|
||||
|
||||
simulator {
|
||||
|
||||
@@ -46,15 +46,16 @@
|
||||
capability "Illuminance Measurement"
|
||||
capability "Sensor"
|
||||
capability "Battery"
|
||||
capability "Health Check"
|
||||
capability "Health Check"
|
||||
|
||||
command "resetParams2StDefaults"
|
||||
command "listCurrentParams"
|
||||
command "updateZwaveParam"
|
||||
command "test"
|
||||
command "configure"
|
||||
command "resetParams2StDefaults"
|
||||
command "listCurrentParams"
|
||||
command "updateZwaveParam"
|
||||
command "test"
|
||||
command "configure"
|
||||
|
||||
fingerprint deviceId: "0x2001", inClusters: "0x30,0x84,0x85,0x80,0x8F,0x56,0x72,0x86,0x70,0x8E,0x31,0x9C,0xEF,0x30,0x31,0x9C"
|
||||
fingerprint mfr:"010F", prod:"0800", model:"2001"
|
||||
fingerprint mfr:"010F", prod:"0800", model:"1001"
|
||||
}
|
||||
|
||||
simulator {
|
||||
|
||||
@@ -171,8 +171,9 @@ private Map getBatteryResult(rawValue) {
|
||||
def pct = batteryMap[volts]
|
||||
result.value = pct
|
||||
} else {
|
||||
def minVolts = 2.4
|
||||
def maxVolts = 2.7
|
||||
def useOldBatt = shouldUseOldBatteryReporting()
|
||||
def minVolts = useOldBatt ? 2.1 : 2.4
|
||||
def maxVolts = useOldBatt ? 3.0 : 2.7
|
||||
// Get the current battery percentage as a multiplier 0 - 1
|
||||
def curValVolts = Integer.parseInt(device.currentState("battery")?.value ?: "100") / 100.0
|
||||
// Find the corresponding voltage from our range
|
||||
@@ -183,15 +184,16 @@ private Map getBatteryResult(rawValue) {
|
||||
// OR we have received the same reading twice in a row
|
||||
// OR we don't currently have a battery reading
|
||||
// OR the value we just received is at least 2 steps off from the last reported value
|
||||
if(state?.lastVolts == null || state?.lastVolts == volts || device.currentState("battery")?.value == null || Math.abs(curValVolts - volts) > 0.1) {
|
||||
// OR the device's firmware is older than 1.15.7
|
||||
if(useOldBatt || state?.lastVolts == null || state?.lastVolts == volts || device.currentState("battery")?.value == null || Math.abs(curValVolts - volts) > 0.1) {
|
||||
def pct = (volts - minVolts) / (maxVolts - minVolts)
|
||||
def roundedPct = Math.round(pct * 100)
|
||||
if (roundedPct <= 0)
|
||||
roundedPct = 1
|
||||
result.value = Math.min(100, roundedPct)
|
||||
} else {
|
||||
// Don't update as we want to smooth the battery values
|
||||
result = null
|
||||
// Don't update as we want to smooth the battery values, but do report the last battery state for record keeping purposes
|
||||
result.value = device.currentState("battery").value
|
||||
}
|
||||
state.lastVolts = volts
|
||||
}
|
||||
@@ -237,3 +239,22 @@ def configure() {
|
||||
// battery minReport 30 seconds, maxReportTime 6 hrs by default
|
||||
return refresh() + zigbee.batteryConfig() + zigbee.temperatureConfig(30, 300) // send refresh cmds as part of config
|
||||
}
|
||||
|
||||
private shouldUseOldBatteryReporting() {
|
||||
def isFwVersionLess = true // By default use the old battery reporting
|
||||
def deviceFwVer = "${device.getFirmwareVersion()}"
|
||||
def deviceVersion = deviceFwVer.tokenize('.') // We expect the format ###.###.### where ### is some integer
|
||||
|
||||
if (deviceVersion.size() == 3) {
|
||||
def targetVersion = [1, 15, 7] // Centralite Firmware 1.15.7 contains battery smoothing fixes, so versions before that should NOT be smoothed
|
||||
def devMajor = deviceVersion[0] as int
|
||||
def devMinor = deviceVersion[1] as int
|
||||
def devBuild = deviceVersion[2] as int
|
||||
|
||||
isFwVersionLess = ((devMajor < targetVersion[0]) ||
|
||||
(devMajor == targetVersion[0] && devMinor < targetVersion[1]) ||
|
||||
(devMajor == targetVersion[0] && devMinor == targetVersion[1] && devBuild < targetVersion[2]))
|
||||
}
|
||||
|
||||
return isFwVersionLess // If f/w version is less than 1.15.7 then do NOT smooth battery reports and use the old reporting
|
||||
}
|
||||
|
||||
@@ -273,8 +273,10 @@ private Map getBatteryResult(rawValue) {
|
||||
def pct = batteryMap[volts]
|
||||
result.value = pct
|
||||
} else {
|
||||
def useOldBatt = shouldUseOldBatteryReporting()
|
||||
def minVolts = 2.1
|
||||
def maxVolts = 2.7
|
||||
def maxVolts = useOldBatt ? 3.0 : 2.7
|
||||
|
||||
// Get the current battery percentage as a multiplier 0 - 1
|
||||
def curValVolts = Integer.parseInt(device.currentState("battery")?.value ?: "100") / 100.0
|
||||
// Find the corresponding voltage from our range
|
||||
@@ -285,15 +287,16 @@ private Map getBatteryResult(rawValue) {
|
||||
// OR we have received the same reading twice in a row
|
||||
// OR we don't currently have a battery reading
|
||||
// OR the value we just received is at least 2 steps off from the last reported value
|
||||
if(state?.lastVolts == null || state?.lastVolts == volts || device.currentState("battery")?.value == null || Math.abs(curValVolts - volts) > 0.1) {
|
||||
// OR the device's firmware is older than 1.15.7
|
||||
if(useOldBatt || state?.lastVolts == null || state?.lastVolts == volts || device.currentState("battery")?.value == null || Math.abs(curValVolts - volts) > 0.1) {
|
||||
def pct = (volts - minVolts) / (maxVolts - minVolts)
|
||||
def roundedPct = Math.round(pct * 100)
|
||||
if (roundedPct <= 0)
|
||||
roundedPct = 1
|
||||
result.value = Math.min(100, roundedPct)
|
||||
} else {
|
||||
// Don't update as we want to smooth the battery values
|
||||
result = null
|
||||
// Don't update as we want to smooth the battery values, but do report the last battery state for record keeping purposes
|
||||
result.value = device.currentState("battery").value
|
||||
}
|
||||
state.lastVolts = volts
|
||||
}
|
||||
@@ -413,6 +416,25 @@ private getManufacturerCode() {
|
||||
}
|
||||
}
|
||||
|
||||
private shouldUseOldBatteryReporting() {
|
||||
def isFwVersionLess = true // By default use the old battery reporting
|
||||
def deviceFwVer = "${device.getFirmwareVersion()}"
|
||||
def deviceVersion = deviceFwVer.tokenize('.') // We expect the format ###.###.### where ### is some integer
|
||||
|
||||
if (deviceVersion.size() == 3) {
|
||||
def targetVersion = [1, 15, 7] // Centralite Firmware 1.15.7 contains battery smoothing fixes, so versions before that should NOT be smoothed
|
||||
def devMajor = deviceVersion[0] as int
|
||||
def devMinor = deviceVersion[1] as int
|
||||
def devBuild = deviceVersion[2] as int
|
||||
|
||||
isFwVersionLess = ((devMajor < targetVersion[0]) ||
|
||||
(devMajor == targetVersion[0] && devMinor < targetVersion[1]) ||
|
||||
(devMajor == targetVersion[0] && devMinor == targetVersion[1] && devBuild < targetVersion[2]))
|
||||
}
|
||||
|
||||
return isFwVersionLess // If f/w version is less than 1.15.7 then do NOT smooth battery reports and use the old reporting
|
||||
}
|
||||
|
||||
private hexToInt(value) {
|
||||
new BigInteger(value, 16)
|
||||
}
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
*
|
||||
*/
|
||||
metadata {
|
||||
definition (name: "Simulated Dimmer Switch", namespace: "smartthings/testing", author: "SmartThings") {
|
||||
definition (name: "Simulated Dimmer Switch", namespace: "smartthings/testing", author: "SmartThings", runLocally: true, minHubCoreVersion: '000.020.00008', executeCommandsLocally: true) {
|
||||
capability "Actuator"
|
||||
capability "Sensor"
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
*/
|
||||
metadata {
|
||||
|
||||
definition (name: "Simulated Switch", namespace: "smartthings/testing", author: "bob") {
|
||||
definition (name: "Simulated Switch", namespace: "smartthings/testing", author: "bob", runLocally: true, minHubCoreVersion: '000.020.00008', executeCommandsLocally: true) {
|
||||
capability "Switch"
|
||||
capability "Relay Switch"
|
||||
capability "Sensor"
|
||||
|
||||
@@ -30,8 +30,13 @@ metadata {
|
||||
fingerprint profileId: "0104", inClusters: "0000, 0003, 0004, 0005, 0006, 0008, 0B05", outClusters: "0019", manufacturer: "OSRAM SYLVANIA", model: "iQBR30", deviceJoinName: "Sylvania Ultra iQ"
|
||||
fingerprint profileId: "0104", inClusters: "0000, 0003, 0004, 0005, 0006, 0008, FC0F", outClusters: "0019", manufacturer: "OSRAM", model: "LIGHTIFY PAR38 ON/OFF/DIM", deviceJoinName: "SYLVANIA Smart PAR38 Soft White"
|
||||
fingerprint profileId: "0104", inClusters: "0000, 0003, 0004, 0005, 0006, 0008, 0B04, FC0F", outClusters: "0019", manufacturer: "OSRAM", model: "LIGHTIFY BR ON/OFF/DIM", deviceJoinName: "SYLVANIA Smart BR30 Soft White"
|
||||
fingerprint profileId: "0104", inClusters: "0000, 0003, 0004, 0005, 0006, 0008, 0702, 0B05", outClusters: "0019", manufacturer: "sengled", model: "E11-G13", deviceJoinName: "Sengled Element Classic A19"
|
||||
fingerprint profileId: "0104", inClusters: "0000, 0003, 0004, 0005, 0006, 0008, 0702, 0B05", outClusters: "0019", manufacturer: "sengled", model: "E12-N14", deviceJoinName: "Sengled Element Classic BR30"
|
||||
fingerprint profileId: "0104", inClusters: "0000, 0003, 0004, 0005, 0006, 0008, 0702, 0B05", outClusters: "0019", manufacturer: "sengled", model: "E11-G13", deviceJoinName: "Sengled Element Classic"
|
||||
fingerprint profileId: "0104", inClusters: "0000, 0003, 0004, 0005, 0006, 0008, 0702, 0B05", outClusters: "0019", manufacturer: "sengled", model: "E11-G14", deviceJoinName: "Sengled Element Classic"
|
||||
fingerprint profileId: "0104", inClusters: "0000, 0003, 0004, 0005, 0006, 0008, 0702, 0B05", outClusters: "0019", manufacturer: "sengled", model: "E11-G23", deviceJoinName: "Sengled Element Classic"
|
||||
fingerprint profileId: "0104", inClusters: "0000, 0003, 0004, 0005, 0006, 0008, 0702, 0B05", outClusters: "0019", manufacturer: "sengled", model: "E11-G33", deviceJoinName: "Sengled Element Classic"
|
||||
fingerprint profileId: "0104", inClusters: "0000, 0003, 0004, 0005, 0006, 0008, 0702, 0B05", outClusters: "0019", manufacturer: "sengled", model: "E12-N13", deviceJoinName: "Sengled Element Classic"
|
||||
fingerprint profileId: "0104", inClusters: "0000, 0003, 0004, 0005, 0006, 0008, 0702, 0B05", outClusters: "0019", manufacturer: "sengled", model: "E12-N14", deviceJoinName: "Sengled Element Classic"
|
||||
fingerprint profileId: "0104", inClusters: "0000, 0003, 0004, 0005, 0006, 0008, 0702, 0B05", outClusters: "0019", manufacturer: "sengled", model: "E12-N15", deviceJoinName: "Sengled Element Classic"
|
||||
fingerprint profileId: "0104", inClusters: "0000, 0003, 0004, 0005, 0006, 0008", outClusters: "0003, 0006, 0008, 0019, 0406", manufacturer: "Leviton", model: "DL6HD", deviceJoinName: "Leviton Dimmer Switch"
|
||||
fingerprint profileId: "0104", inClusters: "0000, 0003, 0004, 0005, 0006, 0008", outClusters: "0003, 0006, 0008, 0019, 0406", manufacturer: "Leviton", model: "DL3HL", deviceJoinName: "Leviton Lumina RF Plug-In Dimmer"
|
||||
fingerprint profileId: "0104", inClusters: "0000, 0003, 0004, 0005, 0006, 0008", outClusters: "0003, 0006, 0008, 0019, 0406", manufacturer: "Leviton", model: "DL1KD", deviceJoinName: "Leviton Lumina RF Dimmer Switch"
|
||||
|
||||
@@ -32,7 +32,7 @@ metadata {
|
||||
fingerprint profileId: "0104", inClusters: "0000,0001,0003,0009,000A,0101,0020", outClusters: "000A,0019", manufacturer: "Yale", model: "YRD210 PB DB", deviceJoinName: "Yale Push Button Deadbolt Lock"
|
||||
fingerprint profileId: "0104", inClusters: "0000,0001,0003,0009,000A,0101,0020", outClusters: "000A,0019", manufacturer: "Yale", model: "YRD220/240 TSDB", deviceJoinName: "Yale Touch Screen Deadbolt Lock"
|
||||
fingerprint profileId: "0104", inClusters: "0000,0001,0003,0009,000A,0101,0020", outClusters: "000A,0019", manufacturer: "Yale", model: "YRL210 PB LL", deviceJoinName: "Yale Push Button Lever Lock"
|
||||
fingerprint profileId: "0104", inClusters: "0000,0001,0003,0009,000A,0101,0020", outClusters: "000A,0019", manufacturer: "Yale", model: "YRD226/246 TSDB", deviceJoinName: "Yale Touch Screen Deadbolt Lock"
|
||||
fingerprint profileId: "0104", inClusters: "0000,0001,0003,0009,000A,0101,0020", outClusters: "000A,0019", manufacturer: "Yale", model: "YRD226/246 TSDB", deviceJoinName: "Yale Assure Lock"
|
||||
fingerprint profileId: "0104", inClusters: "0000,0001,0003,0004,0005,0009,0020,0101,0402,0B05,FDBD", outClusters: "000A,0019", manufacturer: "Kwikset", model: "SMARTCODE_DEADBOLT_5", deviceJoinName: "Kwikset 5-Button Deadbolt"
|
||||
fingerprint profileId: "0104", inClusters: "0000,0001,0003,0004,0005,0009,0020,0101,0402,0B05,FDBD", outClusters: "000A,0019", manufacturer: "Kwikset", model: "SMARTCODE_LEVER_5", deviceJoinName: "Kwikset 5-Button Lever"
|
||||
fingerprint profileId: "0104", inClusters: "0000,0001,0003,0004,0005,0009,0020,0101,0402,0B05,FDBD", outClusters: "000A,0019", manufacturer: "Kwikset", model: "SMARTCODE_DEADBOLT_10", deviceJoinName: "Kwikset 10-Button Deadbolt"
|
||||
|
||||
@@ -38,7 +38,10 @@ metadata {
|
||||
fingerprint profileId: "0104", inClusters: "0000, 0003, 0004, 0005, 0006, 0008, 0300, 0B04, FC0F", outClusters: "0019", manufacturer: "OSRAM", model: "Classic A60 TW", deviceJoinName: "OSRAM LIGHTIFY LED Classic A60 Tunable White"
|
||||
fingerprint profileId: "0104", inClusters: "0000, 0003, 0004, 0005, 0006, 0008, 0300, 0B04, FC0F", outClusters: "0019", manufacturer: "OSRAM", model: "LIGHTIFY A19 Tunable White", deviceJoinName: "SYLVANIA Smart A19 Tunable White"
|
||||
fingerprint profileId: "0104", inClusters: "0000, 0003, 0004, 0005, 0006, 0008, 0300, 0B04, FC0F", outClusters: "0019", manufacturer: "OSRAM", model: "Classic B40 TW - LIGHTIFY", deviceJoinName: "OSRAM LIGHTIFY Classic B40 Tunable White"
|
||||
fingerprint profileId: "0104", inClusters: "0000, 0003, 0004, 0005, 0006, 0008, 0300, 0702, 0B05", outClusters: "0019", manufacturer: "sengled", model: "Z01-A19NAE26", deviceJoinName: "Sengled Element plus"
|
||||
fingerprint profileId: "0104", inClusters: "0000, 0003, 0004, 0005, 0006, 0008, 0300, 0702, 0B05", outClusters: "0019", manufacturer: "sengled", model: "Z01-A19NAE26", deviceJoinName: "Sengled Element Plus"
|
||||
fingerprint profileId: "0104", inClusters: "0000, 0003, 0004, 0005, 0006, 0008, 0300, 0702, 0B05", outClusters: "0019", manufacturer: "sengled", model: "Z01-A191AE26W", deviceJoinName: "Sengled Element Plus"
|
||||
fingerprint profileId: "0104", inClusters: "0000, 0003, 0004, 0005, 0006, 0008, 0300, 0702, 0B05", outClusters: "0019", manufacturer: "sengled", model: "Z01-A60EAB22", deviceJoinName: "Sengled Element Plus"
|
||||
fingerprint profileId: "0104", inClusters: "0000, 0003, 0004, 0005, 0006, 0008, 0300, 0702, 0B05", outClusters: "0019", manufacturer: "sengled", model: "Z01-A60EAE27", deviceJoinName: "Sengled Element Plus"
|
||||
fingerprint profileId: "0104", inClusters: "0000, 0003, 0004, 0005, 0006, 0008, 0300, 0B04, 0B05, FC01, FC08", outClusters: "0003, 0019", manufacturer: "LEDVANCE", model: "A19 TW 10 year", deviceJoinName: "SYLVANIA Smart 10Y A19 TW"
|
||||
fingerprint profileId: "0104", inClusters: "0000, 0003, 0004, 0005, 0006, 0008, 0300, 0B04, FC0F", outClusters: "0019", manufacturer: "OSRAM", model: "LIGHTIFY Conv Under Cabinet TW", deviceJoinName: "SYLVANIA Smart Convertible Under Cabinet"
|
||||
fingerprint profileId: "0104", inClusters: "0000, 0003, 0004, 0005, 0006, 0008, 0300, 0B04, FC0F", outClusters: "0019", manufacturer: "OSRAM", model: "ColorstripRGBW", deviceJoinName: "SYLVANIA Smart Convertible Under Cabinet"
|
||||
|
||||
@@ -31,6 +31,13 @@ metadata {
|
||||
fingerprint mfr:"001D", prod:"0401", model:"0334", deviceJoinName: "Leviton 600W Incandescent Dimmer"
|
||||
fingerprint mfr:"0111", prod:"8200", model:"0200", deviceJoinName: "Remotec Technology Plug-In Dimmer"
|
||||
fingerprint mfr:"1104", prod:"001D", model:"0501", deviceJoinName: "Leviton 1000W Incandescant Dimmer"
|
||||
fingerprint mfr:"0039", prod:"5044", model:"3033", deviceJoinName: "Honeywell Z-Wave Plug-in Dimmer (Dual Outlet)"
|
||||
fingerprint mfr:"0039", prod:"5044", model:"3038", deviceJoinName: "Honeywell Z-Wave Plug-in Dimmer"
|
||||
fingerprint mfr:"0039", prod:"4944", model:"3038", deviceJoinName: "Honeywell Z-Wave In-Wall Smart Dimmer"
|
||||
fingerprint mfr:"0039", prod:"4944", model:"3130", deviceJoinName: "Honeywell Z-Wave In-Wall Smart Toggle Dimmer"
|
||||
fingerprint mfr:"0063", prod:"4944", model:"3034", deviceJoinName: "GE In-Wall Smart Fan Control"
|
||||
fingerprint mfr:"0063", prod:"4944", model:"3131", deviceJoinName: "GE In-Wall Smart Fan Control"
|
||||
fingerprint mfr:"0039", prod:"4944", model:"3131", deviceJoinName: "Honeywell Z-Wave Plus In-Wall Fan Speed Control"
|
||||
}
|
||||
|
||||
simulator {
|
||||
@@ -81,6 +88,7 @@ metadata {
|
||||
def installed(){
|
||||
// Device-Watch simply pings if no device events received for 32min(checkInterval)
|
||||
sendEvent(name: "checkInterval", value: 2 * 15 * 60 + 2 * 60, displayed: false, data: [protocol: "zwave", hubHardwareId: device.hub.hardwareID, offlinePingable: "1"])
|
||||
response(refresh())
|
||||
}
|
||||
|
||||
def updated(){
|
||||
|
||||
@@ -48,7 +48,7 @@ metadata {
|
||||
fingerprint mfr:"0129", prod:"0004", model:"0800", deviceJoinName: "Yale Push Button Deadbolt Door Lock" // YRD110
|
||||
fingerprint mfr:"0129", prod:"0004", model:"0000", deviceJoinName: "Yale Push Button Deadbolt Door Lock" // YRD210
|
||||
fingerprint mfr:"0129", prod:"0001", model:"0000", deviceJoinName: "Yale Push Button Lever Door Lock" // YRD210
|
||||
fingerprint mfr:"0129", prod:"8002", model:"0600", deviceJoinName: "Yale Assure Lock with Bluetooth" //YRD416, YRD426, YRD446
|
||||
fingerprint mfr:"0129", prod:"8002", model:"0600", deviceJoinName: "Yale Assure Lock" //YRD416, YRD426, YRD446
|
||||
fingerprint mfr:"0129", prod:"0007", model:"0001", deviceJoinName: "Yale Keyless Connected Smart Door Lock"
|
||||
fingerprint mfr:"0129", prod:"8004", model:"0600", deviceJoinName: "Yale Assure Lock Push Button Deadbolt" //YRD216
|
||||
// Samsung
|
||||
@@ -387,7 +387,7 @@ private def handleAccessAlarmReport(cmd) {
|
||||
break
|
||||
case 5: // Locked with keypad
|
||||
if (cmd.eventParameter || cmd.alarmLevel) {
|
||||
codeID = cmd.eventParameter[2] ?: cmd.alarmLevel
|
||||
codeID = readCodeSlotId(cmd)
|
||||
codeName = getCodeName(lockCodes, codeID)
|
||||
map.descriptionText = "Locked by \"$codeName\""
|
||||
map.data = [ usedCode: codeID, codeName: codeName, method: "keypad" ]
|
||||
@@ -398,7 +398,7 @@ private def handleAccessAlarmReport(cmd) {
|
||||
break
|
||||
case 6: // Unlocked with keypad
|
||||
if (cmd.eventParameter || cmd.alarmLevel) {
|
||||
codeID = cmd.eventParameter[2] ?: cmd.alarmLevel
|
||||
codeID = readCodeSlotId(cmd)
|
||||
codeName = getCodeName(lockCodes, codeID)
|
||||
map.descriptionText = "Unlocked by \"$codeName\""
|
||||
map.data = [ usedCode: codeID, codeName: codeName, method: "keypad" ]
|
||||
@@ -431,7 +431,7 @@ private def handleAccessAlarmReport(cmd) {
|
||||
break
|
||||
case 0xD: // User code deleted
|
||||
if (cmd.eventParameter || cmd.alarmLevel) {
|
||||
codeID = cmd.eventParameter[2] ?: cmd.alarmLevel
|
||||
codeID = readCodeSlotId(cmd)
|
||||
if (lockCodes[codeID.toString()]) {
|
||||
codeName = getCodeName(lockCodes, codeID)
|
||||
map = [ name: "codeChanged", value: "$codeID deleted", isStateChange: true ]
|
||||
@@ -443,7 +443,7 @@ private def handleAccessAlarmReport(cmd) {
|
||||
break
|
||||
case 0xE: // Master or user code changed/set
|
||||
if (cmd.eventParameter || cmd.alarmLevel) {
|
||||
codeID = cmd.eventParameter[2] ?: cmd.alarmLevel
|
||||
codeID = readCodeSlotId(cmd)
|
||||
if(codeID == 0 && isKwiksetLock()) {
|
||||
//Ignoring this AlarmReport as Kwikset reports codeID 0 when all slots are full and user tries to set another lock code manually
|
||||
//Kwikset locks don't send AlarmReport when Master code is set
|
||||
@@ -464,7 +464,7 @@ private def handleAccessAlarmReport(cmd) {
|
||||
break
|
||||
case 0xF: // Duplicate Pin-code error
|
||||
if (cmd.eventParameter || cmd.alarmLevel) {
|
||||
codeID = cmd.eventParameter[2] ?: cmd.alarmLevel
|
||||
codeID = readCodeSlotId(cmd)
|
||||
clearStateForSlot(codeID)
|
||||
map = [ name: "codeChanged", value: "$codeID failed", descriptionText: "User code is duplicate and not added",
|
||||
isStateChange: true, data: [isCodeDuplicate: true] ]
|
||||
@@ -592,14 +592,14 @@ private def handleAlarmReportUsingAlarmType(cmd) {
|
||||
case 19: // Unlocked with keypad
|
||||
map = [ name: "lock", value: "unlocked" ]
|
||||
if (cmd.alarmLevel != null) {
|
||||
codeID = cmd.alarmLevel
|
||||
codeID = readCodeSlotId(cmd)
|
||||
codeName = getCodeName(lockCodes, codeID)
|
||||
map.descriptionText = "Unlocked by \"$codeName\""
|
||||
map.data = [ usedCode: codeID, codeName: codeName, method: "keypad" ]
|
||||
}
|
||||
break
|
||||
case 18: // Locked with keypad
|
||||
codeID = cmd.alarmLevel
|
||||
codeID = readCodeSlotId(cmd)
|
||||
map = [ name: "lock", value: "locked" ]
|
||||
// Kwikset lock reporting code id as 0 when locked using the lock keypad button
|
||||
if (isKwiksetLock() && codeID == 0) {
|
||||
@@ -646,7 +646,7 @@ private def handleAlarmReportUsingAlarmType(cmd) {
|
||||
result << createEvent(name: "lockCodes", value: util.toJson([:]), displayed: false, descriptionText: "'lockCodes' attribute updated")
|
||||
break
|
||||
case 33: // User code deleted
|
||||
codeID = cmd.alarmLevel
|
||||
codeID = readCodeSlotId(cmd)
|
||||
if (lockCodes[codeID.toString()]) {
|
||||
codeName = getCodeName(lockCodes, codeID)
|
||||
map = [ name: "codeChanged", value: "$codeID deleted", isStateChange: true ]
|
||||
@@ -660,7 +660,7 @@ private def handleAlarmReportUsingAlarmType(cmd) {
|
||||
break
|
||||
case 13:
|
||||
case 112: // Master or user code changed/set
|
||||
codeID = cmd.alarmLevel
|
||||
codeID = readCodeSlotId(cmd)
|
||||
if(codeID == 0 && isKwiksetLock()) {
|
||||
//Ignoring this AlarmReport as Kwikset reports codeID 0 when all slots are full and user tries to set another lock code manually
|
||||
//Kwikset locks don't send AlarmReport when Master code is set
|
||||
@@ -681,7 +681,7 @@ private def handleAlarmReportUsingAlarmType(cmd) {
|
||||
break
|
||||
case 34:
|
||||
case 113: // Duplicate Pin-code error
|
||||
codeID = cmd.alarmLevel
|
||||
codeID = readCodeSlotId(cmd)
|
||||
clearStateForSlot(codeID)
|
||||
map = [ name: "codeChanged", value: "$codeID failed", descriptionText: "User code is duplicate and not added",
|
||||
isStateChange: true, data: [isCodeDuplicate: true] ]
|
||||
@@ -1657,3 +1657,17 @@ def isYaleLock() {
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
/**
|
||||
* Generic function for reading code Slot ID from AlarmReport command
|
||||
* @param cmd: The AlarmReport command
|
||||
* @return user code slot id
|
||||
*/
|
||||
def readCodeSlotId(physicalgraph.zwave.commands.alarmv2.AlarmReport cmd) {
|
||||
if(cmd.numberOfEventParameters == 1) {
|
||||
return cmd.eventParameter[0]
|
||||
} else if(cmd.numberOfEventParameters >= 3) {
|
||||
return cmd.eventParameter[2]
|
||||
}
|
||||
return cmd.alarmLevel
|
||||
}
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
*/
|
||||
|
||||
metadata {
|
||||
definition (name: "Z-Wave Plus Door/Window Sensor", namespace: "smartthings", author: "SmartThings", ocfDeviceType: "x.com.st.d.sensor.contact") {
|
||||
definition (name: "Z-Wave Plus Door/Window Sensor", namespace: "smartthings", author: "SmartThings", ocfDeviceType: "x.com.st.d.sensor.contact", runLocally: true, minHubCoreVersion: '000.020.00008', executeCommandsLocally: true) {
|
||||
capability "Contact Sensor"
|
||||
capability "Configuration"
|
||||
capability "Battery"
|
||||
|
||||
@@ -25,6 +25,12 @@ metadata {
|
||||
fingerprint mfr:"0063", prod:"5257", deviceJoinName: "GE Wall Switch"
|
||||
fingerprint mfr:"0063", prod:"5052", deviceJoinName: "GE Plug-In Switch"
|
||||
fingerprint mfr:"0113", prod:"5257", deviceJoinName: "Z-Wave Wall Switch"
|
||||
fingerprint mfr:"0039", prod:"5052", model:"3038", deviceJoinName: "Honeywell Z-Wave Plug-in Switch"
|
||||
fingerprint mfr:"0039", prod:"5052", model:"3033", deviceJoinName: "Honeywell Z-Wave Plug-in Switch (Dual Outlet)"
|
||||
fingerprint mfr:"0039", prod:"4F50", model:"3032", deviceJoinName: "Honeywell Z-Wave Plug-in Outdoor Smart Switch"
|
||||
fingerprint mfr:"0039", prod:"4952", model:"3036", deviceJoinName: "Honeywell Z-Wave In-Wall Smart Switch"
|
||||
fingerprint mfr:"0039", prod:"4952", model:"3037", deviceJoinName: "Honeywell Z-Wave In-Wall Smart Toggle Switch"
|
||||
fingerprint mfr:"0039", prod:"4952", model:"3133", deviceJoinName: "Honeywell Z-Wave In-Wall Tamper Resistant Duplex Receptacle"
|
||||
}
|
||||
|
||||
// simulator metadata
|
||||
|
||||
Reference in New Issue
Block a user