From: amiraj Date: Thu, 1 Aug 2019 18:26:19 +0000 (-0700) Subject: Merge branch 'master' of ssh://plrg.eecs.uci.edu/home/git/smartthings-infrastructure X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=de35dfa319418baf7ba4bc2eeb4dbfc0fd20230a;p=smartthings-infrastructure.git Merge branch 'master' of ssh://plrg.eecs.uci.edu/home/git/smartthings-infrastructure --- de35dfa319418baf7ba4bc2eeb4dbfc0fd20230a diff --cc ColorControl/ColorControls.groovy index 74964fe,39dfeaa..5b29f55 --- a/ColorControl/ColorControls.groovy +++ b/ColorControl/ColorControls.groovy @@@ -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 diff --cc Lock/Lock.groovy index 0271050,fd18e43..4b84497 --- a/Lock/Lock.groovy +++ b/Lock/Lock.groovy @@@ -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" @@@ -42,6 -41,7 +46,10 @@@ 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" @@@ -56,6 -54,7 +64,10 @@@ 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" @@@ -63,8 -62,6 +75,11 @@@ 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 } } @@@ -72,15 -69,14 +87,26 @@@ 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 } } } diff --cc MusicPlayer/MusicPlayers.groovy index d423e5c,bce3fc7..486feea --- a/MusicPlayer/MusicPlayers.groovy +++ b/MusicPlayer/MusicPlayers.groovy @@@ -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)) } diff --cc SmokeDetector/SmokeDetectors.groovy index d2a9290,2bbc41d..94c6176 --- a/SmokeDetector/SmokeDetectors.groovy +++ b/SmokeDetector/SmokeDetectors.groovy @@@ -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 diff --cc TemperatureMeasurement/TemperatureMeasurements.groovy index 3f3c634,15119cc..20d1f5a --- a/TemperatureMeasurement/TemperatureMeasurements.groovy +++ b/TemperatureMeasurement/TemperatureMeasurements.groovy @@@ -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 diff --cc Thermostat/Thermostats.groovy index d8f7ada,24d7b16..80a643b --- a/Thermostat/Thermostats.groovy +++ b/Thermostat/Thermostats.groovy @@@ -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 @@@ -99,8 -81,7 +99,12 @@@ } 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, diff --cc eventSimulator/eventSimulator.groovy index 0a04773,ad7c1db..393f9bd --- a/eventSimulator/eventSimulator.groovy +++ b/eventSimulator/eventSimulator.groovy @@@ -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 @@@ -22,8 -23,8 +28,13 @@@ 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 } }