From 987a1b207c07d9be6eeec010f3cda080bdddb03e Mon Sep 17 00:00:00 2001 From: greens Date: Wed, 21 Aug 2019 15:30:02 -0700 Subject: [PATCH 1/4] WWST-2347 enable mcd for aeon minimote --- devicetypes/smartthings/aeon-minimote.src/aeon-minimote.groovy | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/devicetypes/smartthings/aeon-minimote.src/aeon-minimote.groovy b/devicetypes/smartthings/aeon-minimote.src/aeon-minimote.groovy index f58b346b176..c1ae94b4fc7 100644 --- a/devicetypes/smartthings/aeon-minimote.src/aeon-minimote.groovy +++ b/devicetypes/smartthings/aeon-minimote.src/aeon-minimote.groovy @@ -15,7 +15,7 @@ import groovy.json.JsonOutput * */ metadata { - definition (name: "Aeon Minimote", namespace: "smartthings", author: "SmartThings", runLocally: true, minHubCoreVersion: '000.017.0012', executeCommandsLocally: false) { + definition (name: "Aeon Minimote", namespace: "smartthings", author: "SmartThings", runLocally: true, minHubCoreVersion: '000.017.0012', executeCommandsLocally: false, mcdSync: true) { capability "Actuator" capability "Button" capability "Holdable Button" From ab651989ad22869b267035834bd0936694605040 Mon Sep 17 00:00:00 2001 From: greens Date: Thu, 17 Oct 2019 09:54:37 -0700 Subject: [PATCH 2/4] change isStateChange flag --- devicetypes/smartthings/aeon-minimote.src/aeon-minimote.groovy | 1 - 1 file changed, 1 deletion(-) diff --git a/devicetypes/smartthings/aeon-minimote.src/aeon-minimote.groovy b/devicetypes/smartthings/aeon-minimote.src/aeon-minimote.groovy index c1ae94b4fc7..e2ed59c52ea 100644 --- a/devicetypes/smartthings/aeon-minimote.src/aeon-minimote.groovy +++ b/devicetypes/smartthings/aeon-minimote.src/aeon-minimote.groovy @@ -1,5 +1,4 @@ import groovy.json.JsonOutput -import groovy.json.JsonOutput /** * Copyright 2015 SmartThings From e432e04ec8bcf1494707ea8d9a91dc401bb0df2e Mon Sep 17 00:00:00 2001 From: greens Date: Thu, 17 Oct 2019 10:49:27 -0700 Subject: [PATCH 3/4] set supportdbuttonvalues --- .../smartthings/aeon-minimote.src/aeon-minimote.groovy | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/devicetypes/smartthings/aeon-minimote.src/aeon-minimote.groovy b/devicetypes/smartthings/aeon-minimote.src/aeon-minimote.groovy index e2ed59c52ea..85cb701bd8e 100644 --- a/devicetypes/smartthings/aeon-minimote.src/aeon-minimote.groovy +++ b/devicetypes/smartthings/aeon-minimote.src/aeon-minimote.groovy @@ -141,13 +141,15 @@ def updated() { def initialize() { sendEvent(name: "numberOfButtons", value: 4) sendEvent(name: "DeviceWatch-Enroll", value: JsonOutput.toJson([protocol: "zwave", scheme:"untracked"]), displayed: false) + sendEvent(name: "supportedButtonValues", value: ["pushed","held"].encodeAsJson(), displayed: false) } private void createChildDevices() { state.oldLabel = device.label for (i in 1..4) { - addChildDevice("Child Button", "${device.deviceNetworkId}/${i}", device.hubId, + def child = addChildDevice("Child Button", "${device.deviceNetworkId}/${i}", device.hubId, [completedSetup: true, label: "${device.displayName} button ${i}", isComponent: true, componentName: "button$i", componentLabel: "Button $i"]) + child.sendEvent(name: "supportedButtonValues", value: ["pushed","held"].encodeAsJson(), displayed: false) } } From f9191f331d72a91792c408a21b69b7ae7741d96a Mon Sep 17 00:00:00 2001 From: greens Date: Thu, 24 Oct 2019 13:44:45 -0700 Subject: [PATCH 4/4] enable update of child devices for migration to MCD --- .../smartthings/aeon-minimote.src/aeon-minimote.groovy | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/devicetypes/smartthings/aeon-minimote.src/aeon-minimote.groovy b/devicetypes/smartthings/aeon-minimote.src/aeon-minimote.groovy index 85cb701bd8e..e058021f28d 100644 --- a/devicetypes/smartthings/aeon-minimote.src/aeon-minimote.groovy +++ b/devicetypes/smartthings/aeon-minimote.src/aeon-minimote.groovy @@ -127,14 +127,17 @@ def updated() { initialize() if (!childDevices) { createChildDevices() - } - else if (device.label != state.oldLabel) { + } else if (device.label != state.oldLabel) { childDevices.each { def segs = it.deviceNetworkId.split("/") def newLabel = "${device.displayName} button ${segs[-1]}" it.setLabel(newLabel) } state.oldLabel = device.label + } else { + childDevices.each { + it.sendEvent(name: "supportedButtonValues", value: ["pushed","held"].encodeAsJson(), displayed: false) + } } }