From f52149556955ffb14bcbc2ef7629f5aecb909696 Mon Sep 17 00:00:00 2001 From: Raja Date: Tue, 13 Jun 2017 22:46:31 -0700 Subject: [PATCH] MSA-2039: Test publication --- .../aeon-led-bulb.src/aeon-led-bulb.groovy | 2 +- .../zigbee-dimmer.src/zigbee-dimmer.groovy | 3 +- .../mmasmarththingdemo.groovy | 50 +++++++++++++++++++ 3 files changed, 53 insertions(+), 2 deletions(-) create mode 100644 smartapps/mmasmartthing/mmasmarththingdemo.src/mmasmarththingdemo.groovy diff --git a/devicetypes/smartthings/aeon-led-bulb.src/aeon-led-bulb.groovy b/devicetypes/smartthings/aeon-led-bulb.src/aeon-led-bulb.groovy index eecaa62..515c997 100644 --- a/devicetypes/smartthings/aeon-led-bulb.src/aeon-led-bulb.groovy +++ b/devicetypes/smartthings/aeon-led-bulb.src/aeon-led-bulb.groovy @@ -251,4 +251,4 @@ def huesatToRGB(float hue, float sat) { case 4: return [t, p, 255] case 5: return [255, p, q] } -} +} \ No newline at end of file diff --git a/devicetypes/smartthings/zigbee-dimmer.src/zigbee-dimmer.groovy b/devicetypes/smartthings/zigbee-dimmer.src/zigbee-dimmer.groovy index 820e07a..2cb059e 100644 --- a/devicetypes/smartthings/zigbee-dimmer.src/zigbee-dimmer.groovy +++ b/devicetypes/smartthings/zigbee-dimmer.src/zigbee-dimmer.groovy @@ -34,6 +34,7 @@ metadata { fingerprint profileId: "0104", inClusters: "0000, 0003, 0004, 0005, 0006, 0008", outClusters: "0003, 0006, 0008, 0019, 0406", manufacturer: "Leviton", model: "DL6HD", deviceJoinName: "Leviton Dimmer Switch" fingerprint profileId: "0104", inClusters: "0000, 0003, 0004, 0005, 0006, 0008", outClusters: "0003, 0006, 0008, 0019, 0406", manufacturer: "Leviton", model: "DL3HL", deviceJoinName: "Leviton Lumina RF Plug-In Dimmer" fingerprint profileId: "0104", inClusters: "0000, 0003, 0004, 0005, 0006, 0008", outClusters: "0003, 0006, 0008, 0019, 0406", manufacturer: "Leviton", model: "DL1KD", deviceJoinName: "Leviton Lumina RF Dimmer Switch" + fingerprint profileId: "0104", deviceId: "0001", inClusters: "0000, 0003, 0004, 0005, 0006, 0008, 0B04, FC0F", outClusters: "0019", manufacturer: "OSRAM", model: "LIGHTIFY A19 ON/OFF/DIM", deviceJoinName: "OSRAM LIGHTIFY LED Smart Connected Light" } tiles(scale: 2) { @@ -137,4 +138,4 @@ def configure() { // OnOff minReportTime 0 seconds, maxReportTime 5 min. Reporting interval if no activity refresh() + zigbee.onOffConfig(0, 300) + zigbee.levelConfig() -} +} \ No newline at end of file diff --git a/smartapps/mmasmartthing/mmasmarththingdemo.src/mmasmarththingdemo.groovy b/smartapps/mmasmartthing/mmasmarththingdemo.src/mmasmarththingdemo.groovy new file mode 100644 index 0000000..002a4ab --- /dev/null +++ b/smartapps/mmasmartthing/mmasmarththingdemo.src/mmasmarththingdemo.groovy @@ -0,0 +1,50 @@ +/** + * MMASmarthThingDemo + * + * Copyright 2017 Raja + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at: + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed + * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License + * for the specific language governing permissions and limitations under the License. + * + */ +definition( + name: "MMASmarthThingDemo", + namespace: "MMASmartThing", + author: "Raja", + description: "MMASmartThing demo app is for learning purpose to know how to integrage smarthings with mobile apps", + category: "Fun & Social", + iconUrl: "https://s3.amazonaws.com/smartapp-icons/Convenience/Cat-Convenience.png", + iconX2Url: "https://s3.amazonaws.com/smartapp-icons/Convenience/Cat-Convenience@2x.png", + iconX3Url: "https://s3.amazonaws.com/smartapp-icons/Convenience/Cat-Convenience@2x.png") + + +preferences { + section("Title") { + // TODO: put inputs here + } +} + +def installed() { + log.debug "Installed with settings: ${settings}" + + initialize() +} + +def updated() { + log.debug "Updated with settings: ${settings}" + + unsubscribe() + initialize() +} + +def initialize() { + // TODO: subscribe to attributes, devices, locations, etc. +} + +// TODO: implement event handlers \ No newline at end of file