X-Git-Url: http://demsky.eecs.uci.edu/git/?a=blobdiff_plain;f=official%2Fspeaker-mood-music.groovy;h=d7fe14732eeb7ca983af1ea669072380f22ebf31;hb=e77888cb4d37fc1552bdeec70675ee138d1def73;hp=9c47731368c7f3462d37c9f13367ab1f6ecb9f9f;hpb=3325c1b0cc49b9fbbc497cb3612f7aeff5263eca;p=smartapps.git diff --git a/official/speaker-mood-music.groovy b/official/speaker-mood-music.groovy index 9c47731..d7fe147 100755 --- a/official/speaker-mood-music.groovy +++ b/official/speaker-mood-music.groovy @@ -15,7 +15,26 @@ * Author: SmartThings * Date: 2014-02-12 */ +definition( + name: "Speaker Mood Music", + namespace: "smartthings", + author: "SmartThings", + description: "Plays a selected song or station.", + category: "SmartThings Labs", + iconUrl: "https://s3.amazonaws.com/smartapp-icons/Partner/sonos.png", + iconX2Url: "https://s3.amazonaws.com/smartapp-icons/Partner/sonos@2x.png" +) +preferences { + page(name: "mainPage", title: "Play a selected song or station on your Speaker when something happens", nextPage: "chooseTrack", uninstall: true) + page(name: "chooseTrack", title: "Select a song", install: true) + page(name: "timeIntervalInput", title: "Only during a certain time") { + section { + input "starting", "time", title: "Starting", required: false + input "ending", "time", title: "Ending", required: false + } + } +} private songOptions() { @@ -64,26 +83,19 @@ private saveSelectedSong() { } } -definition( - name: "Speaker Mood Music", - namespace: "smartthings", - author: "SmartThings", - description: "Plays a selected song or station.", - category: "SmartThings Labs", - iconUrl: "https://s3.amazonaws.com/smartapp-icons/Partner/sonos.png", - iconX2Url: "https://s3.amazonaws.com/smartapp-icons/Partner/sonos@2x.png" -) - -preferences { - page(name: "mainPage", title: "Play a selected song or station on your Speaker when something happens", nextPage: "chooseTrack", uninstall: true) - page(name: "chooseTrack", title: "Select a song", install: true) - page(name: "timeIntervalInput", title: "Only during a certain time") { - section { - input "starting", "time", title: "Starting", required: false - input "ending", "time", title: "Ending", required: false - } - } -} +// input "motion", "capability.motionSensor", title: "Motion Here", required: false, multiple: true +// input "contact", "capability.contactSensor", title: "Contact Opens", required: false, multiple: true +// input "contactClosed", "capability.contactSensor", title: "Contact Closes", required: false, multiple: true +// input "acceleration", "capability.accelerationSensor", title: "Acceleration Detected", required: false, multiple: true +// input "mySwitch", "capability.switch", title: "Switch Turned On", required: false, multiple: true +// input "mySwitchOff", "capability.switch", title: "Switch Turned Off", required: false, multiple: true +// input "arrivalPresence", "capability.presenceSensor", title: "Arrival Of", required: false, multiple: true +// input "departurePresence", "capability.presenceSensor", title: "Departure Of", required: false, multiple: true +// input "smoke", "capability.smokeDetector", title: "Smoke Detected", required: false, multiple: true +// input "water", "capability.waterSensor", title: "Water Sensor Wet", required: false, multiple: true +// input "button1", "capability.button", title: "Button Press", required:false, multiple:true //remove from production +// input "triggerModes", "mode", title: "System Changes Mode", required: false, multiple: true +// input "timeOfDay", "time", title: "At a Scheduled Time", required: false def mainPage() { dynamicPage(name: "mainPage") { @@ -106,7 +118,7 @@ def mainPage() { } } - def hideable = anythingSet || app.installationState == "COMPLETE" + def hideable = anythingSet //|| app.installationState == "COMPLETE" def sectionTitle = anythingSet ? "Select additional triggers" : "Play music when..." section(sectionTitle, hideable: hideable, hidden: true){ @@ -130,12 +142,12 @@ def mainPage() { section("More options", hideable: true, hidden: true) { input "volume", "number", title: "Set the volume", description: "0-100%", required: false input "frequency", "decimal", title: "Minimum time between actions (defaults to every event)", description: "Minutes", required: false - href "timeIntervalInput", title: "Only during a certain time", description: timeLabel ?: "Tap to set", state: timeLabel ? "complete" : "incomplete" + //href "timeIntervalInput", title: "Only during a certain time", description: timeLabel ?: "Tap to set", state: timeLabel ? "complete" : "incomplete" input "days", "enum", title: "Only on certain days of the week", multiple: true, required: false, options: ["Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday", "Sunday"] - if (settings.modes) { + //if (settings.modes) { input "modes", "mode", title: "Only when mode is", multiple: true, required: false - } + //} input "oncePerDay", "bool", title: "Only once per day", required: false, defaultValue: false } }