Skip to content

Commit

Permalink
No commit message
Browse files Browse the repository at this point in the history
  • Loading branch information
krlaframboise committed Sep 3, 2017
1 parent 0d9b6ef commit 550290d
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -263,18 +263,17 @@ private storeDeviceList(data) {

if (!excludedDeviceIdsSetting?.find { "$it" == "${dev.id}"}) {
def item = state.deviceList.find { it.id == dev.id }
def displayName = "${dev.name} (${dev.id})"
if (item) {
// logTrace "Updating Device: $desc"

ids.remove(ids?.find { "$it" == "${dev.id}" })
item.displayName = displayName
item.displayName = "${dev.name}"
item.lastActivity = dev.lastActivityTime
}
else {
// logTrace "Adding Device: ${desc}"

state.deviceList << [id: dev.id, displayName: displayName, lastActivity:dev.lastActivityTime]
state.deviceList << [id: dev.id, displayName: "${dev.name}", lastActivity:dev.lastActivityTime]
}
}
}
Expand Down Expand Up @@ -386,7 +385,7 @@ private sendRefreshedEvent() {
private getDeviceSummary() {
def lines = []
state.deviceList?.each {
lines << "${it.displayName}"
lines << "${it.displayName} (${it.id})"
}
return lines ? lines.sort().join("\n") : ""
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* Vision Shock Sensor v1.2.1
* Vision Shock Sensor v1.2.2
* (ZS 5101)
*
* Author:
Expand All @@ -9,6 +9,9 @@
*
* Changelog:
*
* 1.2.2 (08/31/2017)
* - testing
*
* 1.2.1 (08/31/2017)
* - Using Notification Report to detect activity is unreliable in the Monoprice version so switched to BasicSet.
*
Expand Down Expand Up @@ -315,7 +318,7 @@ def zwaveEvent(physicalgraph.zwave.commands.batteryv1.BatteryReport cmd) {
}

def zwaveEvent(physicalgraph.zwave.commands.basicv1.BasicSet cmd) {
// logTrace "Basic Set: $cmd"
log.warn "Basic Set: $cmd"
def result = []
createPrimaryEventMaps(cmd.value == 0XFF)?. each {
result << createEvent(it)
Expand All @@ -324,7 +327,7 @@ def zwaveEvent(physicalgraph.zwave.commands.basicv1.BasicSet cmd) {
}

def zwaveEvent(physicalgraph.zwave.commands.sensorbinaryv2.SensorBinaryReport cmd) {
logTrace "SensorBinaryReport: $cmd"
log.warn "SensorBinaryReport: $cmd"
return []
}

Expand All @@ -336,7 +339,7 @@ def zwaveEvent(physicalgraph.zwave.Command cmd) {

// Contact event is being created using Sensor Binarry command class so this event is ignored.
def zwaveEvent(physicalgraph.zwave.commands.notificationv3.NotificationReport cmd) {
// logTrace "NotificationReport: $cmd"
log.warn "NotificationReport: $cmd"
def result = []
if (cmd.notificationType == 7) {
if (cmd.event == 2 || cmd.v1AlarmType == 2) {
Expand Down

0 comments on commit 550290d

Please sign in to comment.