package ColorControl
import SmartThing.SmartThings
-//Importing mutable integer class
-import MutableInteger.MutableInteger
-
public class ColorControls extends SmartThings {
List colorControls = new ArrayList()
sendEventSmartThings = sendEvent
// Initialization
+ String mode
helloHome = new Phrase()
contacts = ['AJ']
phoneNumbers = [9495379373]
hubs = [[id:0, localIP:"128.195.204.105"]]
if (init)
- mode.append("away")
+ mode = "away"
else
- mode.append("home")
+ mode = "home"
deviceValuesMap.put("mode", mode)
deviceValuesMap.put("name", "hub0")
// Methods to set values
def lock() {
- lock[0].lock()
+ locks[0].lock()
}
def lock(LinkedHashMap metaData) {
}
def unlock() {
- lock[0].unlock()
+ locks[0].unlock()
}
String id = "mobileDeviceID0"
String label = "mobileDevice"
String displayName = "mobileDevice"
- String deviceNetworkId
+ String deviceNetworkId = "id58323"
mobilePresences.add(new MobilePresence(sendEvent, id, label, displayName, deviceNetworkId))
}
// Initialization
this.id = id
this.label = label
- this.currentLevel = currentLevel
possibleValues.add("on")
possibleValues.add("off")
}
// Methods to return values
- def getProperty(String currentProperty) {
+ def propertyMissing(String currentProperty) {
String property = currentProperty
if (property.contains("current")) // Check to see if we have currentXXX or xxx
property = property.substring(7,8).toLowerCase()+property.substring(8);
//Create a class for SmartThings
package SmartThing
-class SmartThings {
+public class SmartThings {
List smartThings = new ArrayList()
// Methods for closures
}
// Methods to return states of the devices
- def getProperty(String currentProperty) {
+ def propertyMissing(String currentProperty) {
+ if (smartThings[0] == null)
+ return
List tmpValues = new ArrayList()
tmpValues.add(smartThings[0].getProperty(currentProperty))
return tmpValues
String id = "thermostatID0"
String label = "thermostat"
String displayName = "thermostat"
- String climateName "climateName"
+ String climateName = "climateName"
String thermostatOperatingState
String thermostatFanMode
String thermostatMode
-##beacon-control.groovy
+beacon-control.groovy
#enhanced-auto-lock-door.groovy
-good-night-house.groovy
-##initial-state-event-streamer.groovy
+#good-night-house.groovy
+#initial-state-event-streamer.groovy
#lock-it-at-a-specific-time.groovy
#lock-it-when-i-leave.groovy
#make-it-so.groovy
-nfc-tag-toggle.groovy
-##single-button-controller.groovy
-##smart-auto-lock-unlock.groovy
+#nfc-tag-toggle.groovy
+#single-button-controller.groovy
+#smart-auto-lock-unlock.groovy
#unlock-it-when-i-arrive.groovy
#auto-lock-door.smartapp.groovy
-##buffered-event-sender.groovy
-##ecobeeAwayFromHome.groovy
+#buffered-event-sender.groovy
+#ecobeeAwayFromHome.groovy
#FireCO2Alarm.groovy
##groveStreams.groovy
##influxdb-logger.groovy