Compare commits

...

20 Commits

Author SHA1 Message Date
Vinay Rao
4bba6f267a Merge pull request #2674 from SmartThingsCommunity/staging
Rolling down staging to master
2018-01-05 12:58:05 -08:00
greens
9d6cc16c16 ICP-2367 Yale Locks send lock operations before notification events (#2627)
* ICP-2367 Yale Locks send lock operations before notification events

We need to enforce the order of notification and lock in order to get the most information possible for the lock/unlock events. This attempts to delay the lock command event until after the notification event. Because if isStateChange, the lock event will actually essentially get ignored as long as the notification event comes.

This should delay the calling of createEvent on the doorLockOperation data so that the isStateChange flag should be set how we expect it to be.

Cleaning up some of the code and adding a debug log for this rare event.
2018-01-04 14:16:59 -08:00
greens
16d89e61fd WWST-159 WWST-155 WWST-164 WWST-157 WWST-166 WWST-158 WWST-156 WWST-165 WWST-160 WWST-167 (#2643)
Honeywell binary switched were put in the wrong DTH. Should go in the generic one instead of the one meant for GE devices.
2018-01-04 10:41:57 -08:00
Rahul Vaish
341943f342 [ICP-1827] YALE 256 - Device pairing name is wrong. (#2640) 2017-12-21 11:18:42 -08:00
greens
ecd7bf2a82 DVCSMP-1437 GE Fan switch does not support configuration (#2638)
Fixes typo in model number.
2017-12-18 16:15:38 -08:00
Vinay Rao
1983484032 Merge pull request #2633 from marstorp/prob1940ecobeeDualSetpointFix
PROB-1940 Ecobee Thermostat Automation Setpoint off by 1 Degree
2017-12-18 14:15:28 -08:00
marstorp
35b63b3289 PROB-1940 Ecobee Thermostat Automation Setpoint off by 1 Degree
When an automation sends a setpoint to an ecobee thermostat that matches
the current setpoint, the setpoint changes by 1 degree.

This issue was caused by the need of forcing the new setpoint +-1° when rounding
issues between °F and °C caused the setpoint to remain the same when
changing it manually one step at a time.
Added fix to check if setpoints are set manually or by automation before applying
the +-1° adjustment.

Also added possibility to change the deadband used in device settings.
2017-12-15 16:49:06 -08:00
Vinay Rao
ee3f125bca Merge pull request #2628 from vaish-rahul/master
[DVCSMP-3494] Some schlage locks read "Unlocked by Master Code" when
2017-12-15 13:23:09 -08:00
Vinay Rao
c93435b14d Merge pull request #2632 from munds/DVCSMP-3504
[DVCSMP-3504] Add Sengled Element Plus to zigbee-white-color-temperature-bulb
2017-12-15 13:20:27 -08:00
greens
134b108df5 Honeywell dimmer and switch fingerprints (#2631)
WWST-159 WWST-155 WWST-164 WWST-157 WWST-166 WWST-158 WWST-156 WWST-165 WWST-160 WWST-167 WWST-170

Add fingerprints for Honeywell dimmers and switches.

WWST-162 Dimmer switches also not polling for initial status

This adds an initial poll on install like we have for (non-dimmer) zwave switches.
2017-12-15 13:00:26 -08:00
Amol Mundayoor
b850e772d7 Add Sengled Element Plus to zigbee-white-color-temperature-bulb 2017-12-15 08:19:19 -08:00
greens
0d617ab5a8 ICP-1827 Yale Assure Lock device join name fix (#2630)
The two models of Yale Assure Lock (w/ and w/o BT) are indistinguishable based on ZWave info. This makes the name applicable to both models.
2017-12-14 15:48:08 -08:00
greens
e8ef2d052f Dvcsmp-1437 GE Fan switches don't support configuration (#2626)
* DVCSMP-1437 GE Fan switches don't support indicator LED control

Move the GE Fan switch to the generic dimmer handler, since they don't support the configuration options of the other GE dimmers.
2017-12-14 13:51:53 -08:00
Rahul Vaish
001ba48b5c [DVCSMP-3494] Some schlage locks read "Unlocked by Master Code" when
unlocked with a user code.
2017-12-14 15:51:59 +05:30
Duncan McKee
1e088b1655 Merge pull request #1765 from mckeed/fibaro-motion-mfr
Add mfr fingerprints to Fibaro Motion
2017-12-12 22:50:27 -05:00
Vinay Rao
3f8c0e92e3 Merge pull request #2621 from SmartThingsCommunity/master
Rolling up master to staging
2017-12-12 16:01:08 -08:00
Vinay Rao
6a91660719 Merge pull request #2620 from SmartThingsCommunity/staging
Rolling down staging to master
2017-12-12 16:00:23 -08:00
greens
73d8f4787e DVCSMP-1524 Remove polling capability from hub-polled devices (#2510)
Removes the deprecated polling capability from these devices which are polled by the hub directly.
2017-12-12 10:23:55 -08:00
Juan Pablo Risso
f82ff2ba03 NQA-793 - Thermostat automation support (#2614)
Small typos

small change
2017-12-11 16:59:23 -05:00
Duncan McKee
a241804190 Add mfr fingerprints to Fibaro Motion
NVS-6
2017-12-07 00:05:58 -05:00
14 changed files with 210 additions and 62 deletions

View File

@@ -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 {

View File

@@ -18,7 +18,6 @@ metadata {
capability "Actuator"
capability "Switch"
capability "Configuration"
capability "Polling"
capability "Refresh"
capability "Sensor"
@@ -167,10 +166,6 @@ def setLevel(value, duration) {
zwave.switchMultilevelV2.switchMultilevelSet(value: value, dimmingDuration: dimmingDuration).format()
}
def poll() {
zwave.switchMultilevelV1.switchMultilevelGet().format()
}
def refresh() {
zwave.switchMultilevelV1.switchMultilevelGet().format()
}

View File

@@ -17,7 +17,6 @@ metadata {
capability "Actuator"
capability "Switch"
capability "Configuration"
capability "Polling"
capability "Refresh"
capability "Sensor"
@@ -122,13 +121,6 @@ def off() {
])
}
def poll() {
delayBetween([
zwave.switchBinaryV1.switchBinaryGet().format(),
zwave.meterV2.meterGet().format()
])
}
def refresh() {
zwave.switchBinaryV1.switchBinaryGet().format()
}

View File

@@ -17,7 +17,6 @@ metadata {
capability "Actuator"
capability "Indicator"
capability "Switch"
capability "Polling"
capability "Refresh"
capability "Sensor"
capability "Health Check"
@@ -26,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 {
@@ -242,10 +240,6 @@ def setLevel(value, duration) {
zwave.switchMultilevelV1.switchMultilevelGet().format()], getStatusDelay)
}
def poll() {
zwave.switchMultilevelV1.switchMultilevelGet().format()
}
/**
* PING is used by Device-Watch in attempt to reach the Device
* */

View File

@@ -124,6 +124,10 @@ metadata {
input "holdType", "enum", title: "Hold Type",
description: "When changing temperature, use Temporary (Until next transition) or Permanent hold (default)",
required: false, options:["Temporary", "Permanent"]
input "deadbandSetting", "number", title: "Minimum temperature difference between the desired Heat and Cool " +
"temperatures in Auto mode:\nNote! This must be the same as configured on the thermostat",
description: "temperature difference °F", defaultValue: 5,
required: false
}
}
@@ -172,7 +176,7 @@ def generateEvent(Map results) {
if (name=="temperature" || name=="heatingSetpoint" || name=="coolingSetpoint" ) {
sendValue = getTempInLocalScale(value, "F") // API return temperature values in F
event << [value: sendValue, unit: locationScale]
} else if (name=="maxCoolingSetpoint" || name=="minCoolingSetpoint" || name=="maxHeatingSetpoint" || name=="minHeatingSetpoint") {
} else if (name=="maxCoolingSetpoint" || name=="minCoolingSetpoint" || name=="maxHeatingSetpoint" || name=="minHeatingSetpoint") {
// Old attributes, keeping for backward compatibility
sendValue = getTempInLocalScale(value, "F") // API return temperature values in F
event << [value: sendValue, unit: locationScale, displayed: false]
@@ -465,7 +469,7 @@ def enforceSetpointLimits(setpoint, data, raise = null) {
def maxSetpoint = (setpoint == "heatingSetpoint") ? device.getDataValue("maxHeatingSetpointFahrenheit") : device.getDataValue("maxCoolingSetpointFahrenheit")
minSetpoint = minSetpoint ? Double.parseDouble(minSetpoint) : ((setpoint == "heatingSetpoint") ? 45 : 65) // default 45 heat, 65 cool
maxSetpoint = maxSetpoint ? Double.parseDouble(maxSetpoint) : ((setpoint == "heatingSetpoint") ? 79 : 92) // default 79 heat, 92 cool
def deadband = 5 // °F
def deadband = deadbandSetting ? deadbandSetting : 5 // °F
def delta = (locationScale == "F") ? 1 : 0.5
def targetValue = getTempInDeviceScale(data.targetValue, locationScale)
def heatingSetpoint = getTempInDeviceScale(data.heatingSetpoint, locationScale)
@@ -475,8 +479,8 @@ def enforceSetpointLimits(setpoint, data, raise = null) {
targetValue = maxSetpoint
} else if (targetValue < minSetpoint) {
targetValue = minSetpoint
} else if ((setpoint == "heatingSetpoint" && targetValue == heatingSetpoint) ||
(setpoint == "coolingSetpoint" && targetValue == coolingSetpoint)){
} else if ((raise != null) && ((setpoint == "heatingSetpoint" && targetValue == heatingSetpoint) ||
(setpoint == "coolingSetpoint" && targetValue == coolingSetpoint))) {
// Ensure targetValue differes from old. When location scale differs from device,
// converting between C -> F -> C may otherwise result in no change.
targetValue += raise ? delta : - delta

View File

@@ -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 {

View File

@@ -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"

View File

@@ -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"

View File

@@ -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(){

View File

@@ -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
@@ -320,7 +320,18 @@ def zwaveEvent(DoorLockOperationReport cmd) {
result << response(secure(zwave.associationV1.associationGet(groupingIdentifier:1)))
}
}
result ? [createEvent(map), *result] : createEvent(map)
if (generatesDoorLockOperationReportBeforeAlarmReport()) {
// we're expecting lock events to come after notification events, but for specific yale locks they come out of order
runIn(3, "delayLockEvent", [data: [map: map]])
return [:]
} else {
return result ? [createEvent(map), *result] : createEvent(map)
}
}
def delayLockEvent(data) {
log.debug "Sending cached lock operation: $data.map"
sendEvent(data.map)
}
/**
@@ -387,7 +398,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 +409,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 +442,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 +454,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 +475,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 +603,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 +657,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 +671,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 +692,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 +1668,30 @@ def isYaleLock() {
}
return false
}
/**
* Returns true if this lock generates door lock operation report before alarm report, false otherwise
* @return true if this lock generates door lock operation report before alarm report, false otherwise
*/
def generatesDoorLockOperationReportBeforeAlarmReport() {
//Fix for ICP-2367, ICP-2366
if(isYaleLock() && "0007" == zwaveInfo.prod && "0001" == zwaveInfo.model) {
//Yale Keyless Connected Smart Door Lock
return true
}
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
}

View File

@@ -17,7 +17,6 @@ metadata {
capability "Actuator"
capability "Switch"
capability "Power Meter"
capability "Polling"
capability "Refresh"
capability "Configuration"
capability "Sensor"
@@ -201,14 +200,6 @@ def off() {
]
}
def poll() {
delayBetween([
zwave.switchBinaryV1.switchBinaryGet().format(),
zwave.meterV2.meterGet(scale: 0).format(),
zwave.meterV2.meterGet(scale: 2).format()
])
}
/**
* PING is used by Device-Watch in attempt to reach the Device
* */

View File

@@ -31,6 +31,12 @@ metadata {
fingerprint mfr:"001D", prod:"1603", model:"0334", deviceJoinName: "Leviton 15A Split Duplex Receptacle"
fingerprint mfr:"011A", prod:"0101", model:"0102", deviceJoinName: "Enerwave On/Off Switch"
fingerprint mfr:"011A", prod:"0101", model:"0603", deviceJoinName: "Enerwave Duplex Receptacle"
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

View File

@@ -16,7 +16,6 @@ metadata {
capability "Actuator"
capability "Indicator"
capability "Switch"
capability "Polling"
capability "Refresh"
capability "Sensor"
capability "Health Check"
@@ -177,13 +176,6 @@ def off() {
])
}
def poll() {
delayBetween([
zwave.switchBinaryV1.switchBinaryGet().format(),
zwave.manufacturerSpecificV1.manufacturerSpecificGet().format()
])
}
/**
* PING is used by Device-Watch in attempt to reach the Device
**/

View File

@@ -0,0 +1,121 @@
/**
* Copyright 2017 SmartThings
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
* in compliance with the License. You may obtain a copy of the License at:
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software distributed under the License is distributed
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License
* for the specific language governing permissions and limitations under the License.
*
* Thermostats
*
* Author: Juan Pablo Risso
* Date: 2017-12-05
*
*/
definition(
name: "Thermostats",
namespace: "smartthings",
author: "SmartThings",
description: "Receive notifications when anything happens in your home.",
category: "SmartSolutions",
iconUrl: "https://s3.amazonaws.com/smartapp-icons/SafetyAndSecurity/Cat-SafetyAndSecurity.png",
iconX2Url: "https://s3.amazonaws.com/smartapp-icons/SafetyAndSecurity/Cat-SafetyAndSecurity@2x.png",
singleInstance: true
)
preferences {
section("Choose one or more, when..."){
input "smokeDevices", "capability.smokeDetector", title: "Smoke Detected", required: false, multiple: true
input "carbonMonoxideDevices", "capability.carbonMonoxideDetector", title: "Carbon Monoxide Detected", required: false, multiple: true
}
section("Turn off these thermostats"){
input "thermostatDevices", "capability.thermostat", title: "Thermostats", required: true, multiple: true
}
section("Send this message (optional, sends standard status message if not specified)"){
input "messageText", "text", title: "Message Text", required: false
}
section("Via a push notification and/or an SMS message"){
input("recipients", "contact", title: "Send notifications to") {
input "phone", "phone", title: "Enter a phone number to get SMS", required: false
paragraph "If outside the US please make sure to enter the proper country code"
input "pushAndPhone", "enum", title: "Notify me via Push Notification", required: false, options: ["Yes", "No"]
}
}
section("Minimum time between messages (optional, defaults to every message)") {
input "frequency", "decimal", title: "Minutes", required: false
}
}
def installed() {
log.debug "Installed with settings: ${settings}"
subscribeToEvents()
}
def updated() {
log.debug "Updated with settings: ${settings}"
unsubscribe()
subscribeToEvents()
}
def subscribeToEvents() {
subscribe(smokeDevices, "smoke.detected", eventHandler)
subscribe(smokeDevices, "smoke.tested", eventHandler)
subscribe(smokeDevices, "carbonMonoxide.detected", eventHandler)
subscribe(carbonMonoxideDevices, "carbonMonoxide.detected", eventHandler)
}
def eventHandler(evt) {
log.debug "Notify got evt ${evt}"
// Turn off thermostat
thermostatDevices*.setThermostatMode("off")
if (frequency) {
def lastTime = state[evt.deviceId]
if (lastTime == null || now() - lastTime >= frequency * 60000) {
sendMessage(evt)
}
}
else {
sendMessage(evt)
}
}
private sendMessage(evt) {
String msg = messageText
Map options = [:]
if (!messageText) {
msg = '{{ triggerEvent.descriptionText }}'
options = [translatable: true, triggerEvent: evt]
}
log.debug "$evt.name:$evt.value, pushAndPhone:$pushAndPhone, '$msg'"
if (location.contactBookEnabled) {
sendNotificationToContacts(msg, recipients, options)
} else {
if (phone) {
options.phone = phone
if (pushAndPhone != 'No') {
log.debug 'Sending push and SMS'
options.method = 'both'
} else {
log.debug 'Sending SMS'
options.method = 'phone'
}
} else if (pushAndPhone != 'No') {
log.debug 'Sending push'
options.method = 'push'
} else {
log.debug 'Sending nothing'
options.method = 'none'
}
sendNotification(msg, options)
}
if (frequency) {
state[evt.deviceId] = now()
}
}