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
index 74964fe0cf131e6eff15e310f998ed85a6583a9e,39dfeaa8ab3c8d3a3fb84a4bc269c82a07f0e309..5b29f55e54eb51d83ebe1e13a7d8f0545eeff57b
@@@ -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
index 0271050af9dd100f9bedc0c430caa4fe3ea8a765,fd18e4384071a7de01191dcdaad67ad3fcc9331b..4b84497003b6696d86c74eacdcc6567f32766919
@@@ -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
index d423e5ce5f8ccfbb052bf1d1b570ae925806ec67,bce3fc7d40612d6139e29c67317e41163df47b3a..486feeac79a9f468c945db62ec22eb3081d44322
@@@ -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
index d2a9290744b79363fe8fb92b1b6037fd461aaa0a,2bbc41d5706704716753b6c2ec91bd7b350050a3..94c6176d2e79272524931b0b7a8bee1ce1a45736
@@@ -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
index 3f3c634e0cdef34a1fae451d3a3ed9767c8f94b0,15119cc38c6bd9e4484c5f4a23eb3cc8f46298d2..20d1f5af01bd44c3dd2259eff76a0a8e044edd86
@@@ -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
index d8f7adaff9a9e14d69d32fa48f9f30f2b9471d60,24d7b16abaf76a9c85a86120ceefd14328541218..80a643b6a5ae0be8fbdaa4961f354e617254fab2
@@@ -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
index 0a047739aa821ee8434030d7fbcf8dc68fe31728,ad7c1db3c5f96f59bda952b881413a5984e08bee..393f9bd1fbbbc769d776ad69c819b1b2aff36409
@@@ -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
        }
  }