Skip to content

Commit 156604e

Browse files
authored
ICP-3774 Update contact sensors to be offline pingable (SmartThingsCommunity#2881)
* ICP-3774 Update contact sensors to be offline pingable Because DeviceHealth is only going to ping the offlinepingable devices, we need to make these contact sensors offlinepingable.
1 parent baa1003 commit 156604e

File tree

6 files changed

+10
-10
lines changed

6 files changed

+10
-10
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -286,7 +286,7 @@ def ping() {
286286

287287
def configure() {
288288
// Device-Watch allows 2 check-in misses from device
289-
sendEvent(name: "checkInterval", value: 60 * 12, displayed: false, data: [protocol: "zigbee", hubHardwareId: device.hub.hardwareID])
289+
sendEvent(name: "checkInterval", value: 60 * 12, displayed: false, data: [protocol: "zigbee", hubHardwareId: device.hub.hardwareID, offlinePingable: "1"])
290290

291291
String zigbeeEui = swapEndianHex(device.hub.zigbeeEui)
292292

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ def parse(String description) {
101101
} else if (descMap?.clusterInt == zigbee.TEMPERATURE_MEASUREMENT_CLUSTER && descMap.commandInt == 0x07) {
102102
if (descMap.data[0] == "00") {
103103
log.debug "TEMP REPORTING CONFIG RESPONSE: $descMap"
104-
sendEvent(name: "checkInterval", value: 60 * 12, displayed: false, data: [protocol: "zigbee", hubHardwareId: device.hub.hardwareID])
104+
sendEvent(name: "checkInterval", value: 60 * 12, displayed: false, data: [protocol: "zigbee", hubHardwareId: device.hub.hardwareID, offlinePingable: "1"])
105105
} else {
106106
log.warn "TEMP REPORTING CONFIG FAILED- error code: ${descMap.data[0]}"
107107
}
@@ -212,7 +212,7 @@ def refresh() {
212212
def configure() {
213213
// Device-Watch allows 2 check-in misses from device + ping (plus 1 min lag time)
214214
// enrolls with default periodic reporting until newer 5 min interval is confirmed
215-
sendEvent(name: "checkInterval", value: 2 * 60 * 60 + 1 * 60, displayed: false, data: [protocol: "zigbee", hubHardwareId: device.hub.hardwareID])
215+
sendEvent(name: "checkInterval", value: 2 * 60 * 60 + 1 * 60, displayed: false, data: [protocol: "zigbee", hubHardwareId: device.hub.hardwareID, offlinePingable: "1"])
216216

217217
// temperature minReportTime 30 seconds, maxReportTime 5 min. Reporting interval if no activity
218218
// battery minReport 30 seconds, maxReportTime 6 hrs by default

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ def parse(String description) {
104104
} else if (descMap?.clusterInt == zigbee.TEMPERATURE_MEASUREMENT_CLUSTER && descMap.commandInt == 0x07) {
105105
if (descMap.data[0] == "00") {
106106
log.debug "TEMP REPORTING CONFIG RESPONSE: $descMap"
107-
sendEvent(name: "checkInterval", value: 60 * 12, displayed: false, data: [protocol: "zigbee", hubHardwareId: device.hub.hardwareID])
107+
sendEvent(name: "checkInterval", value: 60 * 12, displayed: false, data: [protocol: "zigbee", hubHardwareId: device.hub.hardwareID, offlinePingable: "1"])
108108
} else {
109109
log.warn "TEMP REPORTING CONFIG FAILED- error code: ${descMap.data[0]}"
110110
}
@@ -234,7 +234,7 @@ def refresh() {
234234
def configure() {
235235
// Device-Watch allows 2 check-in misses from device + ping (plus 1 min lag time)
236236
// enrolls with default periodic reporting until newer 5 min interval is confirmed
237-
sendEvent(name: "checkInterval", value: 2 * 60 * 60 + 1 * 60, displayed: false, data: [protocol: "zigbee", hubHardwareId: device.hub.hardwareID])
237+
sendEvent(name: "checkInterval", value: 2 * 60 * 60 + 1 * 60, displayed: false, data: [protocol: "zigbee", hubHardwareId: device.hub.hardwareID, offlinePingable: "1"])
238238

239239
// temperature minReportTime 30 seconds, maxReportTime 5 min. Reporting interval if no activity
240240
// battery minReport 30 seconds, maxReportTime 6 hrs by default

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ def parse(String description) {
130130
} else if (descMap?.clusterInt == zigbee.TEMPERATURE_MEASUREMENT_CLUSTER && descMap.commandInt == 0x07) {
131131
if (descMap.data[0] == "00") {
132132
log.debug "TEMP REPORTING CONFIG RESPONSE: $descMap"
133-
sendEvent(name: "checkInterval", value: 60 * 12, displayed: false, data: [protocol: "zigbee", hubHardwareId: device.hub.hardwareID])
133+
sendEvent(name: "checkInterval", value: 60 * 12, displayed: false, data: [protocol: "zigbee", hubHardwareId: device.hub.hardwareID, offlinePingable: "1"])
134134
} else {
135135
log.warn "TEMP REPORTING CONFIG FAILED- error code: ${descMap.data[0]}"
136136
}
@@ -346,7 +346,7 @@ def refresh() {
346346
def configure() {
347347
// Device-Watch allows 2 check-in misses from device + ping (plus 1 min lag time)
348348
// enrolls with default periodic reporting until newer 5 min interval is confirmed
349-
sendEvent(name: "checkInterval", value: 2 * 60 * 60 + 1 * 60, displayed: false, data: [protocol: "zigbee", hubHardwareId: device.hub.hardwareID])
349+
sendEvent(name: "checkInterval", value: 2 * 60 * 60 + 1 * 60, displayed: false, data: [protocol: "zigbee", hubHardwareId: device.hub.hardwareID, offlinePingable: "1"])
350350

351351
log.debug "Configuring Reporting"
352352
def configCmds = []

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ def parse(String description) {
9191
} else if (descMap?.clusterInt == zigbee.TEMPERATURE_MEASUREMENT_CLUSTER && descMap.commandInt == 0x07) {
9292
if (descMap.data[0] == "00") {
9393
log.debug "TEMP REPORTING CONFIG RESPONSE: $descMap"
94-
sendEvent(name: "checkInterval", value: 60 * 12, displayed: false, data: [protocol: "zigbee", hubHardwareId: device.hub.hardwareID])
94+
sendEvent(name: "checkInterval", value: 60 * 12, displayed: false, data: [protocol: "zigbee", hubHardwareId: device.hub.hardwareID, offlinePingable: "1"])
9595
} else {
9696
log.warn "TEMP REPORTING CONFIG FAILED- error code: ${descMap.data[0]}"
9797
}
@@ -173,7 +173,7 @@ def refresh() {
173173
def configure() {
174174
// Device-Watch allows 2 check-in misses from device + ping (plus 1 min lag time)
175175
// enrolls with default periodic reporting until newer 5 min interval is confirmed
176-
sendEvent(name: "checkInterval", value: 2 * 60 * 60 + 1 * 60, displayed: false, data: [protocol: "zigbee", hubHardwareId: device.hub.hardwareID])
176+
sendEvent(name: "checkInterval", value: 2 * 60 * 60 + 1 * 60, displayed: false, data: [protocol: "zigbee", hubHardwareId: device.hub.hardwareID, offlinePingable: "1"])
177177

178178
log.debug "Configuring Reporting, IAS CIE, and Bindings."
179179

devicetypes/smartthings/tyco-door-window-sensor.src/tyco-door-window-sensor.groovy

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -250,7 +250,7 @@ def refresh()
250250

251251
def configure() {
252252
// Device-Watch allows 2 check-in misses from device
253-
sendEvent(name: "checkInterval", value: 60 * 12, displayed: false, data: [protocol: "zigbee", hubHardwareId: device.hub.hardwareID])
253+
sendEvent(name: "checkInterval", value: 60 * 12, displayed: false, data: [protocol: "zigbee", hubHardwareId: device.hub.hardwareID, offlinePingable: "1"])
254254

255255
String zigbeeEui = swapEndianHex(device.hub.zigbeeEui)
256256
log.debug "Configuring Reporting, IAS CIE, and Bindings."

0 commit comments

Comments
 (0)