Compare commits

...

6 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
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
3f8c0e92e3 Merge pull request #2621 from SmartThingsCommunity/master
Rolling up master to staging
2017-12-12 16:01:08 -08:00
4 changed files with 39 additions and 11 deletions

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

@@ -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)
}
/**
@@ -1659,6 +1670,19 @@ def isYaleLock() {
}
/**
* 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

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

@@ -25,12 +25,6 @@ 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