Compare commits

..

1 Commits

Author SHA1 Message Date
Daniel Segovia
401cdb4a34 MSA-2078: Door sensor 2017-07-04 19:46:46 -07:00
5 changed files with 13 additions and 8 deletions

View File

@@ -158,7 +158,7 @@ def generateEvent(Map results) {
if(results) { if(results) {
def linkText = getLinkText(device) def linkText = getLinkText(device)
def supportedThermostatModes = ["off"] def supportedThermostatModes = []
def thermostatMode = null def thermostatMode = null
results.each { name, value -> results.each { name, value ->

View File

@@ -293,4 +293,4 @@ private byte[] reverseArray(byte[] array) {
i++; i++;
} }
return array return array
} }

View File

@@ -28,8 +28,9 @@ Works with:
## Device Health ## Device Health
ZigBee Button is marked offline only in the case when Hub is offline. SmartThings platform will ping the device after `checkInterval` seconds of inactivity in last attempt to reach the device before marking it `OFFLINE`
* __722min__ checkInterval
## Troubleshooting ## Troubleshooting

View File

@@ -13,8 +13,6 @@
* for the specific language governing permissions and limitations under the License. * for the specific language governing permissions and limitations under the License.
* *
*/ */
import groovy.json.JsonOutput
import physicalgraph.zigbee.zcl.DataType import physicalgraph.zigbee.zcl.DataType
metadata { metadata {
@@ -185,6 +183,13 @@ private Map parseNonIasButtonMessage(Map descMap){
} }
} }
/**
* PING is used by Device-Watch in attempt to reach the Device
* */
def ping() {
refresh()
}
def refresh() { def refresh() {
log.debug "Refreshing Battery" log.debug "Refreshing Battery"
@@ -193,6 +198,8 @@ def refresh() {
} }
def configure() { def configure() {
// Device-Watch allows 2 check-in misses from device (plus 2 mins lag time)
sendEvent(name: "checkInterval", value: 2 * 6 * 60 * 60 + 2 * 60, displayed: false, data: [protocol: "zigbee", hubHardwareId: device.hub.hardwareID])
log.debug "Configuring Reporting, IAS CIE, and Bindings." log.debug "Configuring Reporting, IAS CIE, and Bindings."
def cmds = [] def cmds = []
if (device.getDataValue("model") == "3450-L") { if (device.getDataValue("model") == "3450-L") {
@@ -252,8 +259,6 @@ def updated() {
} }
def initialize() { def initialize() {
// Arrival sensors only goes OFFLINE when Hub is off
sendEvent(name: "DeviceWatch-Enroll", value: JsonOutput.toJson([protocol: "zigbee", scheme:"untracked"]), displayed: false)
if ((device.getDataValue("manufacturer") == "OSRAM") && (device.getDataValue("model") == "LIGHTIFY Dimming Switch")) { if ((device.getDataValue("manufacturer") == "OSRAM") && (device.getDataValue("model") == "LIGHTIFY Dimming Switch")) {
sendEvent(name: "numberOfButtons", value: 2) sendEvent(name: "numberOfButtons", value: 2)
} }

View File

@@ -58,7 +58,6 @@ metadata {
def installed() { def installed() {
// Device-Watch simply pings if no device events received for 32min(checkInterval) // 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]) sendEvent(name: "checkInterval", value: 2 * 15 * 60 + 2 * 60, displayed: false, data: [protocol: "zwave", hubHardwareId: device.hub.hardwareID])
response(refresh())
} }
def updated() { def updated() {