mirror of
https://github.com/mtan93/SmartThingsPublic.git
synced 2026-03-15 13:10:51 +00:00
Compare commits
34 Commits
netatmo-ap
...
MSA-692-2
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
9ee81263b1 | ||
|
|
01a36696d8 | ||
|
|
797def2935 | ||
|
|
1034cd06e6 | ||
|
|
c37729242e | ||
|
|
d29c3ec557 | ||
|
|
17be85b846 | ||
|
|
da06104563 | ||
|
|
5d37ac8515 | ||
|
|
2a739fda07 | ||
|
|
f627fb4fac | ||
|
|
1d30a718b2 | ||
|
|
303ca7117c | ||
|
|
1c96645b9f | ||
|
|
af4dc0640a | ||
|
|
80b46153dc | ||
|
|
b92cd9c637 | ||
|
|
1039b65c81 | ||
|
|
4e203e8e13 | ||
|
|
61398105d1 | ||
|
|
505efc5463 | ||
|
|
3ddc82f996 | ||
|
|
13a324069d | ||
|
|
2fd5859326 | ||
|
|
bbedbddf9d | ||
|
|
e424e7abdd | ||
|
|
47fbdabf6b | ||
|
|
7defe1cc61 | ||
|
|
a78459347b | ||
|
|
c473745e47 | ||
|
|
fc587ef15a | ||
|
|
0f3b730f26 | ||
|
|
11df2f31b3 | ||
|
|
4d243bf44d |
@@ -0,0 +1,145 @@
|
|||||||
|
/**
|
||||||
|
* Aeon Motor Controller
|
||||||
|
*
|
||||||
|
* Copyright 2015 Bruce Ravenel
|
||||||
|
*
|
||||||
|
* 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.
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
metadata {
|
||||||
|
definition (name: "Aeon Motor Controller", namespace: "bravenel", author: "Bruce Ravenel") {
|
||||||
|
capability "Refresh"
|
||||||
|
capability "Actuator"
|
||||||
|
capability "doorControl"
|
||||||
|
capability "Switch"
|
||||||
|
|
||||||
|
command "up"
|
||||||
|
command "down"
|
||||||
|
command "stop"
|
||||||
|
|
||||||
|
// fingerprint inClusters: "0x26,0x32"
|
||||||
|
}
|
||||||
|
|
||||||
|
simulator {
|
||||||
|
status "up": "command: 2604, payload: FF"
|
||||||
|
status "down": "command: 2604, payload: 00"
|
||||||
|
status "stop": "command: 2605, payload: FE"
|
||||||
|
|
||||||
|
["FF", "FE", "00"].each { val ->
|
||||||
|
reply "2001$val,delay 100,2602": "command: 2603, payload: $val"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
tiles {
|
||||||
|
standardTile("motor", "device.motor", width: 2, height: 2) {
|
||||||
|
state("stopUp", label:'stop', icon:"st.doors.garage.garage-open", action: 'down', backgroundColor:"#79b821")
|
||||||
|
state("stopDn", label:'stop', icon:"st.doors.garage.garage-closed", action: 'up', backgroundColor:"#79b821")
|
||||||
|
state("up", label:'up', icon:"st.doors.garage.garage-opening", action:'stop', backgroundColor:"#ffe71e")
|
||||||
|
state("down", label:'down', icon:"st.doors.garage.garage-closing", action:'stop', backgroundColor:"#ffe71e")
|
||||||
|
}
|
||||||
|
valueTile("energy", "device.energy", decoration: "flat") {
|
||||||
|
state "default", label:' '
|
||||||
|
}
|
||||||
|
standardTile("refresh", "device.switch", inactiveLabel: false, decoration: "flat") {
|
||||||
|
state "default", label:"", action:"refresh.refresh", icon:"st.secondary.refresh"
|
||||||
|
}
|
||||||
|
standardTile("stop", "device.switch") {
|
||||||
|
state "default", label:"", action: "stop", icon:"http://cdn.device-icons.smartthings.com/sonos/stop-btn@2x.png"
|
||||||
|
}
|
||||||
|
standardTile("up", "device.switch") {
|
||||||
|
state "default", label: "Up", action: "up", icon:"http://cdn.device-icons.smartthings.com/thermostat/thermostat-up@2x.png"
|
||||||
|
}
|
||||||
|
standardTile("down", "device.switch") {
|
||||||
|
state "default", label: "Down", action: "down", icon:"http://cdn.device-icons.smartthings.com/thermostat/thermostat-down@2x.png"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
main(["motor"])
|
||||||
|
details(["motor", "refresh", "energy", "up", "down", "stop",])
|
||||||
|
}
|
||||||
|
|
||||||
|
// parse events into attributes
|
||||||
|
def parse(String description) {
|
||||||
|
def result = []
|
||||||
|
def cmd = zwave.parse(description, [0x20: 1, 0x26: 3])
|
||||||
|
if (cmd) {
|
||||||
|
result = zwaveEvent(cmd)
|
||||||
|
log.debug("'$description' parsed to $result")
|
||||||
|
} else {
|
||||||
|
log.debug("Couldn't zwave.parse '$description'")
|
||||||
|
}
|
||||||
|
result
|
||||||
|
}
|
||||||
|
|
||||||
|
def zwaveEvent(physicalgraph.zwave.commands.basicv1.BasicReport cmd) {
|
||||||
|
motorEvents(cmd)
|
||||||
|
}
|
||||||
|
|
||||||
|
def zwaveEvent(physicalgraph.zwave.commands.basicv1.BasicSet cmd) {
|
||||||
|
motorEvents(cmd)
|
||||||
|
}
|
||||||
|
|
||||||
|
def zwaveEvent(physicalgraph.zwave.commands.switchmultilevelv3.SwitchMultilevelReport cmd) {
|
||||||
|
motorEvents(cmd)
|
||||||
|
}
|
||||||
|
|
||||||
|
def motorEvents(physicalgraph.zwave.Command cmd) {
|
||||||
|
def result = []
|
||||||
|
def switchEvent = []
|
||||||
|
if(cmd.value == 0) {switchEvent = createEvent(name: "motor", value: "down", descriptionText: text)}
|
||||||
|
else if(cmd.value == 254) {
|
||||||
|
def stopVal = state.up ? "stopUp" : "stopDn"
|
||||||
|
switchEvent = createEvent(name: "motor", value: stopVal, descriptionText: text)
|
||||||
|
}
|
||||||
|
else if(cmd.value == 255) {switchEvent = createEvent(name: "motor", value: "up", descriptionText: text)}
|
||||||
|
result << switchEvent
|
||||||
|
}
|
||||||
|
|
||||||
|
def refresh() {
|
||||||
|
zwave.switchMultilevelV1.switchMultilevelGet().format()
|
||||||
|
}
|
||||||
|
|
||||||
|
def up() {
|
||||||
|
state.up = true
|
||||||
|
delayBetween([
|
||||||
|
zwave.basicV1.basicSet(value: 0xFF).format(),
|
||||||
|
zwave.switchMultilevelV1.switchMultilevelGet().format()
|
||||||
|
], 1000)
|
||||||
|
}
|
||||||
|
|
||||||
|
def down() {
|
||||||
|
state.up = false
|
||||||
|
delayBetween([
|
||||||
|
zwave.basicV1.basicSet(value: 0x00).format(),
|
||||||
|
zwave.switchMultilevelV1.switchMultilevelGet().format()
|
||||||
|
], 1000)
|
||||||
|
}
|
||||||
|
|
||||||
|
def stop() {
|
||||||
|
delayBetween([
|
||||||
|
zwave.switchMultilevelV1.switchMultilevelStopLevelChange().format(),
|
||||||
|
zwave.switchMultilevelV1.switchMultilevelGet().format()
|
||||||
|
], 1000)
|
||||||
|
}
|
||||||
|
|
||||||
|
def on() {
|
||||||
|
state.up = true
|
||||||
|
delayBetween([
|
||||||
|
zwave.basicV1.basicSet(value: 0xFF).format(),
|
||||||
|
zwave.switchMultilevelV1.switchMultilevelGet().format()
|
||||||
|
], 1000)
|
||||||
|
}
|
||||||
|
|
||||||
|
def off() {
|
||||||
|
state.up = false
|
||||||
|
delayBetween([
|
||||||
|
zwave.basicV1.basicSet(value: 0x00).format(),
|
||||||
|
zwave.switchMultilevelV1.switchMultilevelGet().format()
|
||||||
|
], 1000)
|
||||||
|
}
|
||||||
@@ -10,24 +10,24 @@
|
|||||||
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License
|
* 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.
|
* for the specific language governing permissions and limitations under the License.
|
||||||
*
|
*
|
||||||
* Sonos Control
|
* Speaker Control
|
||||||
*
|
*
|
||||||
* Author: SmartThings
|
* Author: SmartThings
|
||||||
*
|
*
|
||||||
* Date: 2013-12-10
|
* Date: 2013-12-10
|
||||||
*/
|
*/
|
||||||
definition(
|
definition(
|
||||||
name: "Sonos Control",
|
name: "Speaker Control",
|
||||||
namespace: "smartthings",
|
namespace: "smartthings",
|
||||||
author: "SmartThings",
|
author: "SmartThings",
|
||||||
description: "Play or pause your Sonos when certain actions take place in your home.",
|
description: "Play or pause your Speaker when certain actions take place in your home.",
|
||||||
category: "SmartThings Labs",
|
category: "SmartThings Labs",
|
||||||
iconUrl: "https://s3.amazonaws.com/smartapp-icons/Partner/sonos.png",
|
iconUrl: "https://s3.amazonaws.com/smartapp-icons/Partner/sonos.png",
|
||||||
iconX2Url: "https://s3.amazonaws.com/smartapp-icons/Partner/sonos@2x.png"
|
iconX2Url: "https://s3.amazonaws.com/smartapp-icons/Partner/sonos@2x.png"
|
||||||
)
|
)
|
||||||
|
|
||||||
preferences {
|
preferences {
|
||||||
page(name: "mainPage", title: "Control your Sonos when something happens", install: true, uninstall: true)
|
page(name: "mainPage", title: "Control your Speaker when something happens", install: true, uninstall: true)
|
||||||
page(name: "timeIntervalInput", title: "Only during a certain time") {
|
page(name: "timeIntervalInput", title: "Only during a certain time") {
|
||||||
section {
|
section {
|
||||||
input "starting", "time", title: "Starting", required: false
|
input "starting", "time", title: "Starting", required: false
|
||||||
@@ -81,7 +81,7 @@ def mainPage() {
|
|||||||
]
|
]
|
||||||
}
|
}
|
||||||
section {
|
section {
|
||||||
input "sonos", "capability.musicPlayer", title: "Sonos music player", required: true
|
input "sonos", "capability.musicPlayer", title: "Speaker music player", required: true
|
||||||
}
|
}
|
||||||
section("More options", hideable: true, hidden: true) {
|
section("More options", hideable: true, hidden: true) {
|
||||||
input "volume", "number", title: "Set the volume volume", description: "0-100%", required: false
|
input "volume", "number", title: "Set the volume volume", description: "0-100%", required: false
|
||||||
@@ -10,7 +10,7 @@
|
|||||||
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License
|
* 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.
|
* for the specific language governing permissions and limitations under the License.
|
||||||
*
|
*
|
||||||
* Sonos Mood Music
|
* Speaker Mood Music
|
||||||
*
|
*
|
||||||
* Author: SmartThings
|
* Author: SmartThings
|
||||||
* Date: 2014-02-12
|
* Date: 2014-02-12
|
||||||
@@ -65,7 +65,7 @@ private saveSelectedSong() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
definition(
|
definition(
|
||||||
name: "Sonos Mood Music",
|
name: "Speaker Mood Music",
|
||||||
namespace: "smartthings",
|
namespace: "smartthings",
|
||||||
author: "SmartThings",
|
author: "SmartThings",
|
||||||
description: "Plays a selected song or station.",
|
description: "Plays a selected song or station.",
|
||||||
@@ -75,7 +75,7 @@ definition(
|
|||||||
)
|
)
|
||||||
|
|
||||||
preferences {
|
preferences {
|
||||||
page(name: "mainPage", title: "Play a selected song or station on your Sonos when something happens", nextPage: "chooseTrack", uninstall: true)
|
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: "chooseTrack", title: "Select a song", install: true)
|
||||||
page(name: "timeIntervalInput", title: "Only during a certain time") {
|
page(name: "timeIntervalInput", title: "Only during a certain time") {
|
||||||
section {
|
section {
|
||||||
@@ -125,7 +125,7 @@ def mainPage() {
|
|||||||
ifUnset "timeOfDay", "time", title: "At a Scheduled Time", required: false
|
ifUnset "timeOfDay", "time", title: "At a Scheduled Time", required: false
|
||||||
}
|
}
|
||||||
section {
|
section {
|
||||||
input "sonos", "capability.musicPlayer", title: "On this Sonos player", required: true
|
input "sonos", "capability.musicPlayer", title: "On this Speaker player", required: true
|
||||||
}
|
}
|
||||||
section("More options", hideable: true, hidden: true) {
|
section("More options", hideable: true, hidden: true) {
|
||||||
input "volume", "number", title: "Set the volume", description: "0-100%", required: false
|
input "volume", "number", title: "Set the volume", description: "0-100%", required: false
|
||||||
@@ -10,23 +10,23 @@
|
|||||||
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License
|
* 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.
|
* for the specific language governing permissions and limitations under the License.
|
||||||
*
|
*
|
||||||
* Sonos Custom Message
|
* Speaker Custom Message
|
||||||
*
|
*
|
||||||
* Author: SmartThings
|
* Author: SmartThings
|
||||||
* Date: 2014-1-29
|
* Date: 2014-1-29
|
||||||
*/
|
*/
|
||||||
definition(
|
definition(
|
||||||
name: "Sonos Notify with Sound",
|
name: "Speaker Notify with Sound",
|
||||||
namespace: "smartthings",
|
namespace: "smartthings",
|
||||||
author: "SmartThings",
|
author: "SmartThings",
|
||||||
description: "Play a sound or custom message through your Sonos when the mode changes or other events occur.",
|
description: "Play a sound or custom message through your Speaker when the mode changes or other events occur.",
|
||||||
category: "SmartThings Labs",
|
category: "SmartThings Labs",
|
||||||
iconUrl: "https://s3.amazonaws.com/smartapp-icons/Partner/sonos.png",
|
iconUrl: "https://s3.amazonaws.com/smartapp-icons/Partner/sonos.png",
|
||||||
iconX2Url: "https://s3.amazonaws.com/smartapp-icons/Partner/sonos@2x.png"
|
iconX2Url: "https://s3.amazonaws.com/smartapp-icons/Partner/sonos@2x.png"
|
||||||
)
|
)
|
||||||
|
|
||||||
preferences {
|
preferences {
|
||||||
page(name: "mainPage", title: "Play a message on your Sonos when something happens", install: true, uninstall: true)
|
page(name: "mainPage", title: "Play a message on your Speaker when something happens", install: true, uninstall: true)
|
||||||
page(name: "chooseTrack", title: "Select a song or station")
|
page(name: "chooseTrack", title: "Select a song or station")
|
||||||
page(name: "timeIntervalInput", title: "Only during a certain time") {
|
page(name: "timeIntervalInput", title: "Only during a certain time") {
|
||||||
section {
|
section {
|
||||||
@@ -92,7 +92,7 @@ def mainPage() {
|
|||||||
input "message","text",title:"Play this message", required:false, multiple: false
|
input "message","text",title:"Play this message", required:false, multiple: false
|
||||||
}
|
}
|
||||||
section {
|
section {
|
||||||
input "sonos", "capability.musicPlayer", title: "On this Sonos player", required: true
|
input "sonos", "capability.musicPlayer", title: "On this Speaker player", required: true
|
||||||
}
|
}
|
||||||
section("More options", hideable: true, hidden: true) {
|
section("More options", hideable: true, hidden: true) {
|
||||||
input "resumePlaying", "bool", title: "Resume currently playing music after notification", required: false, defaultValue: true
|
input "resumePlaying", "bool", title: "Resume currently playing music after notification", required: false, defaultValue: true
|
||||||
@@ -10,23 +10,23 @@
|
|||||||
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License
|
* 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.
|
* for the specific language governing permissions and limitations under the License.
|
||||||
*
|
*
|
||||||
* Sonos Weather Forecast
|
* Speaker Weather Forecast
|
||||||
*
|
*
|
||||||
* Author: SmartThings
|
* Author: SmartThings
|
||||||
* Date: 2014-1-29
|
* Date: 2014-1-29
|
||||||
*/
|
*/
|
||||||
definition(
|
definition(
|
||||||
name: "Sonos Weather Forecast",
|
name: "Speaker Weather Forecast",
|
||||||
namespace: "smartthings",
|
namespace: "smartthings",
|
||||||
author: "SmartThings",
|
author: "SmartThings",
|
||||||
description: "Play a weather report through your Sonos when the mode changes or other events occur",
|
description: "Play a weather report through your Speaker when the mode changes or other events occur",
|
||||||
category: "SmartThings Labs",
|
category: "SmartThings Labs",
|
||||||
iconUrl: "https://s3.amazonaws.com/smartapp-icons/Partner/sonos.png",
|
iconUrl: "https://s3.amazonaws.com/smartapp-icons/Partner/sonos.png",
|
||||||
iconX2Url: "https://s3.amazonaws.com/smartapp-icons/Partner/sonos@2x.png"
|
iconX2Url: "https://s3.amazonaws.com/smartapp-icons/Partner/sonos@2x.png"
|
||||||
)
|
)
|
||||||
|
|
||||||
preferences {
|
preferences {
|
||||||
page(name: "mainPage", title: "Play the weather report on your sonos", install: true, uninstall: true)
|
page(name: "mainPage", title: "Play the weather report on your speaker", install: true, uninstall: true)
|
||||||
page(name: "chooseTrack", title: "Select a song or station")
|
page(name: "chooseTrack", title: "Select a song or station")
|
||||||
page(name: "timeIntervalInput", title: "Only during a certain time") {
|
page(name: "timeIntervalInput", title: "Only during a certain time") {
|
||||||
section {
|
section {
|
||||||
@@ -85,7 +85,7 @@ def mainPage() {
|
|||||||
)
|
)
|
||||||
}
|
}
|
||||||
section {
|
section {
|
||||||
input "sonos", "capability.musicPlayer", title: "On this Sonos player", required: true
|
input "sonos", "capability.musicPlayer", title: "On this Speaker player", required: true
|
||||||
}
|
}
|
||||||
section("More options", hideable: true, hidden: true) {
|
section("More options", hideable: true, hidden: true) {
|
||||||
input "resumePlaying", "bool", title: "Resume currently playing music after weather report finishes", required: false, defaultValue: true
|
input "resumePlaying", "bool", title: "Resume currently playing music after weather report finishes", required: false, defaultValue: true
|
||||||
Reference in New Issue
Block a user