Merge branch 'master' of ssh://plrg.eecs.uci.edu/home/git/smartthings-infrastructure
authoramiraj <amiraj.95@uci.edu>
Thu, 1 Aug 2019 18:26:19 +0000 (11:26 -0700)
committeramiraj <amiraj.95@uci.edu>
Thu, 1 Aug 2019 18:26:19 +0000 (11:26 -0700)
31 files changed:
1  2 
AccelerationSensor/AccelerationSensors.groovy
Alarm/Alarms.groovy
Battery/Batteries.groovy
BeaconSensor/BeaconSensors.groovy
CarbonMonoxideDetector/CarbonMonoxideDetectors.groovy
ColorControl/ColorControls.groovy
ContactSensor/ContactSensors.groovy
DoorControl/DoorControls.groovy
EnergyMeter/EnergyMeters.groovy
IlluminanceMeasurement/IlluminanceMeasurements.groovy
ImageCapture/ImageCaptures.groovy
Lock/Lock.groovy
Lock/Locks.groovy
MotionSensor/MotionSensors.groovy
MusicPlayer/MusicPlayer.groovy
MusicPlayer/MusicPlayers.groovy
PowerMeter/PowerMeters.groovy
PresenceSensor/PresenceSensors.groovy
RelativeHumidityMeasurement/RelativeHumidityMeasurements.groovy
RelaySwitch/RelaySwitches.groovy
SleepSensor/SleepSensors.groovy
SmokeDetector/SmokeDetectors.groovy
SpeechSynthesis/SpeechSynthesises.groovy
StepSensor/StepSensors.groovy
Switch/Switches.groovy
SwitchLevel/SwitchLevels.groovy
TemperatureMeasurement/TemperatureMeasurements.groovy
Thermostat/Thermostats.groovy
Valve/Valves.groovy
WaterSensor/WaterSensors.groovy
eventSimulator/eventSimulator.groovy

Simple merge
Simple merge
Simple merge
@@@ -38,9 -35,9 +38,9 @@@ public class ColorControls 
                        this.color = "green"
                } else {
                        this.color = "blue"
-               }
+               }*/
  
 -              colorControls.add(new ColorControl(id, label, displayName, this.color, this.hue, this.saturation))
 +              colorControls.add(new ColorControl(id, label, displayName, this.color, this.hue, this.saturation, this.level, this.currentSwitch, this.colorTemperature))
        }
  
        //Methods for closures
Simple merge
Simple merge
Simple merge
Simple merge
@@@ -28,6 -28,7 +28,10 @@@ public class Lock 
        def lock() {
                if (lockState != "locked") {
                        println("the door with id:$id is locked!")
++<<<<<<< HEAD
++=======
+                       //this.lockLatestValue = this.lockState
++>>>>>>> a02c9807815a35c0f57241ee6510a3d312499049
                        this.lockLatestValue = "locked"
                        this.lockState = "locked"
                        this.currentLock = "locked"
                if (lockState != "locked") {
                        def task = timers.runAfter(metaData["delay"]) {
                                println("the door with id:$id is locked!")
++<<<<<<< HEAD
++=======
+                               //this.lockLatestValue = this.lockState
++>>>>>>> a02c9807815a35c0f57241ee6510a3d312499049
                                this.lockLatestValue = "locked"
                                this.lockState = "locked"
                                this.currentLock = "locked"
        def unlock() {
                if (lockState != "unlocked") {
                        println("the door with id:$id is unlocked!")
++<<<<<<< HEAD
++=======
+                       //this.lockLatestValue = this.lockState
++>>>>>>> a02c9807815a35c0f57241ee6510a3d312499049
                        this.lockLatestValue = "unlocked"
                        this.lockState = "unlocked"
                        this.currentLock = "unlocked"
                                  displayed: true, linkText: "", isStateChange: false, unit: "", data: '{"info": "info"}'])
                        sendEvent([name: "lock", value: "unlocked", deviceId: this.id, descriptionText: "",
                                  displayed: true, linkText: "", isStateChange: false, unit: "", data: '{"info": "info"}'])
++<<<<<<< HEAD
 +                      sendEvent([name: "lock.unlocked", value: "unlocked", deviceId: this.id, descriptionText: "",
 +                                displayed: true, linkText: "", isStateChange: false, unit: "", data: '{"info": "info"}'])
++=======
++>>>>>>> a02c9807815a35c0f57241ee6510a3d312499049
                }
        }
  
                if (lockState != "unlocked") {
                        def task = timers.runAfter(metaData["delay"]) {
                                println("the door with id:$id is locked!")
++<<<<<<< HEAD
 +                              this.lockLatestValue = "unlocked"
 +                              this.lockState = "unlocked"
 +                              this.currentLock = "unlocked"
 +                              sendEvent([name: "unlock", value: "unlocked", deviceId: this.id, descriptionText: "",
 +                                        displayed: true, linkText: "", isStateChange: false, unit: "", data: '{"info": "info"}'])
 +                              sendEvent([name: "lock", value: "unlocked", deviceId: this.id, descriptionText: "",
 +                                        displayed: true, linkText: "", isStateChange: false, unit: "", data: '{"info": "info"}'])
 +                              sendEvent([name: "lock.unlocked", value: "unlocked", deviceId: this.id, descriptionText: "",
 +                                        displayed: true, linkText: "", isStateChange: false, unit: "", data: '{"info": "info"}'])                             
++=======
+                               //this.lockLatestValue = this.lockState
+                               this.lockLatestValue = "locked"
+                               this.lockState = "locked"
+                               this.currentLock = "locked"
+                               sendEvent([name: "unlock", value: "unlocked", deviceId: this.id, descriptionText: "",
+                                         displayed: true, linkText: "", isStateChange: false, unit: "", data: '{"info": "info"}'])
+                               sendEvent([name: "lock", value: "unlocked", deviceId: this.id, descriptionText: "",
+                                               displayed: true, linkText: "", isStateChange: false, unit: "", data: '{"info": "info"}'])
++>>>>>>> a02c9807815a35c0f57241ee6510a3d312499049
                        }
                }
        }
Simple merge
Simple merge
Simple merge
@@@ -34,15 -34,30 +34,34 @@@ public class MusicPlayers 
                if (initMute) {
                        this.mute = "unmuted"
                } else {
-                       this.mute = "mute"
+                       this.mute = "muted"
                }
-               def initStatus = Verify.getBoolean()
-               if (initStatus) {
+               def initStatus = Verify.getInt(0,2)
+               if (initStatus == 0) {
                        this.status = "paused"
-               } else {
+               } else if (initStatus == 1) {
                        this.status = "playing"
+               } else {
+                       this.status = "stopped"
                }
++<<<<<<< HEAD
 +
++=======
+               def initTrack = Verify.getIntFromList(1, 2, 3)
+               this.trackNumber = initTrack 
+               def initData = Verify.getBoolean()
+               if (initData) {
+                       this.trackData = "someTrack"
+               } else {
+                       this.trackData = "someOtherTrack"
+               }
+               def initDesc = Verify.getBoolean()
+               if (initDesc) {
+                       this.trackDescription = "someDescriptions"
+               } else {
+                       this.trackDescription = "someOtherDescriptions"
+               }*/
++>>>>>>> a02c9807815a35c0f57241ee6510a3d312499049
                musicPlayers.add(new MusicPlayer(sendEvent, id, label, displayName, this.level, this.mute, this.status, this.trackNumber, this.trackData, this.trackDescription))
        }
  
Simple merge
Simple merge
Simple merge
Simple merge
@@@ -29,35 -24,18 +29,45 @@@ public class SmokeDetectors 
                this.deviceNumbers = deviceNumbers
                this.smokeDetectors = []
  
++<<<<<<< HEAD
 +              def initBattery = Verify.getIntFromList(30, 50, 70)
 +              this.battery = initBattery
 +              this.batteryLatestValue = initBattery
 +
 +              def initSmoke = Verify.getInt(0,2)
 +              if (initSmoke == 0) {
++=======
+               /*def init = Verify.getInt(0,2)
+               if (init == 0) {
++>>>>>>> a02c9807815a35c0f57241ee6510a3d312499049
                        this.currentSmokeValue = "clear"
                        this.smokeLatestValue = "clear"
 -              } else if (init == 1) {
 +              } else if (initSmoke == 1) {
                        this.currentSmokeValue = "detected"
                        this.smokeLatestValue = "detected"
                } else {
                        this.currentSmokeValue = "tested"
                        this.smokeLatestValue = "tested"                
++<<<<<<< HEAD
 +              }
 +
 +              def initCarbonMonoxide = Verify.getInt(0,2)
 +              if (initCarbonMonoxide == 0) {
 +                      this.currentCarbonMonoxideValue = "clear"
 +                      this.carbonMonoxideLatestValue = "clear"
 +              } else if (initCarbonMonoxide == 1) {
 +                      this.currentCarbonMonoxideValue = "detected"
 +                      this.carbonMonoxideLatestValue = "detected"
 +              } else {
 +                      this.currentCarbonMonoxideValue = "tested"
 +                      this.carbonMonoxideLatestValue = "tested"               
 +              }
 +              smokeDetectors.add(new SmokeDetector(id, label, displayName, this.currentSmokeValue, this.smokeLatestValue, this.currentCarbonMonoxideValue,
 +                                                     this.carbonMonoxideLatestValue, this.battery))
++=======
+               }*/
+               smokeDetectors.add(new SmokeDetector(id, label, displayName, this.currentSmokeValue, this.smokeLatestValue))
++>>>>>>> a02c9807815a35c0f57241ee6510a3d312499049
        }
  
        //By Model Checker
Simple merge
Simple merge
Simple merge
@@@ -12,11 -15,7 +15,12 @@@ public class TemperatureMeasurements 
        private String label = "temperatureMeasurement0"
        private String displayName = "temperatureMeasurement0"
        private int temperature = 50
++<<<<<<< HEAD
 +      private int currentTemperature = 50
 +
++=======
++>>>>>>> a02c9807815a35c0f57241ee6510a3d312499049
        
-               
        TemperatureMeasurements(Closure sendEvent, int deviceNumbers) {
                this.sendEvent = sendEvent              
                this.deviceNumbers = deviceNumbers
@@@ -46,9 -38,8 +46,9 @@@ public class Thermostats
                this.deviceNumbers = deviceNumbers
                this.thermostats = []
  
-               def initTemperature = Verify.getIntFromList(60, 66, 70)
+               /*def initTemperature = Verify.getIntFromList(60, 66, 70)
                this.temperature = initTemperature
 +              this.currentTemperature = initTemperature
                
                def initCoolingSetpoint = Verify.getIntFromList(70, 80, 90)
                this.currentCoolingSetpoint = initCoolingSetpoint
                } else {
                        this.thermostatMode = "off"
                        this.currentThermostatMode = "off"
++<<<<<<< HEAD
 +                      this.thermostatLatestMode = "off"
 +              }
++=======
+               }*/
++>>>>>>> a02c9807815a35c0f57241ee6510a3d312499049
  
                thermostats.add(new Thermostat(sendEvent, id, label, displayName, this.temperature, this.currentCoolingSetpoint, 
                                                 this.currentHeatingSetpoint, this.coolingSetpoint, this.thermostatSetpoint, this.heatingSetpoint, this.coolingSetpointRange,
Simple merge
Simple merge
@@@ -4,10 -4,9 +4,16 @@@ while(true) 
                case 0:
                        def event = Verify.getInt(0,1)
                        if (event == 0) {
++<<<<<<< HEAD
 +                                      switchObject.setValue([name: "switch", value: "on", deviceId: "switchID0", descriptionText: "",
 +                                                      displayed: true, linkText: "", isStateChange: false, unit: "", data: '{"info": "info"}'])
 +                      } else {
 +                                      switchObject.setValue([name: "switch", value: "off", deviceId: "switchID0", descriptionText: "",
++=======
+                                       lockObject.setValue([name: "lock", value: "locked", deviceId: "lockID0", descriptionText: "",
+                                                       displayed: true, linkText: "", isStateChange: false, unit: "", data: '{"info": "info"}'])                       } else {
+                                       lockObject.setValue([name: "lock", value: "unlocked", deviceId: "lockID0", descriptionText: "",
++>>>>>>> a02c9807815a35c0f57241ee6510a3d312499049
                                                        displayed: true, linkText: "", isStateChange: false, unit: "", data: '{"info": "info"}'])
                        }
                        break
                                        displayed: true, linkText: "", isStateChange: false, unit: "", data: '{"info": "info"}'])
                        break
                case 4:
++<<<<<<< HEAD
 +                      break
 +              case 5:
++=======
+                       appObject.setValue([name: "Touched", value: "touched", deviceId: "touchedSensorID0", descriptionText: "",
+                                       displayed: true, linkText: "", isStateChange: false, unit: "", data: '{"info": "info"}'])
++>>>>>>> a02c9807815a35c0f57241ee6510a3d312499049
                        break
        }
  }