Merge branch 'master' of ssh://plrg.eecs.uci.edu/home/git/smartthings-infrastructure
authorbdemsky <bdemsky@uci.edu>
Sun, 4 Aug 2019 21:15:05 +0000 (14:15 -0700)
committerbdemsky <bdemsky@uci.edu>
Sun, 4 Aug 2019 21:15:05 +0000 (14:15 -0700)
ColorControl/ColorControls.groovy
ColorTemperature/ColorTemperatures.groovy
Extractor/ExtractorScript.py
run.sh

index 5122f6b9b55f9150f3a6a8a51202c341499c73c6..0c0832b3921e650d870b2db8814bd212f4106a9b 100644 (file)
@@ -31,18 +31,16 @@ public class ColorControls {
                this.deviceNumbers = deviceNumbers
                this.colorControls = []
 
-               /*def initHue = Verify.getIntFromList(30, 50, 70)
+               def initHue = Verify.getIntFromList(30, 50)
                this.hue = initHue
-               def initSat = Verify.getIntFromList(40, 50, 60)
+               def initSat = Verify.getIntFromList(40, 50)
                this.saturation = initSat
                def init = Verify.getInt(0,2)
                if (init == 0) {
                        this.color = "red"
-               } else if (init == 1) {
-                       this.color = "green"
                } else {
                        this.color = "blue"
-               }*/
+               }
 
                colorControls.add(new ColorControl(sendEvent, id, label, displayName, this.color, this.hue, this.saturation, this.level, this.currentSwitch, this.colorTemperature))
        }
index 952bfcd86759678e50453bf4d3fa40c3cfc58205..aea527995d14b286e5f23ca21ebca1574d0cab9b 100644 (file)
@@ -25,6 +25,17 @@ public class ColorTemperatures {
                this.deviceNumbers = deviceNumbers
                this.colorTemperatues = []
 
+               def initLevel = Verify.getIntFromList(50, 70)
+               this.level = initLevel 
+               def initTemp = Verify.getIntFromList(10000, 15000)
+               this.colorTemperature = initTemp 
+               def init = Verify.getBoolean
+               if (init) {
+                       this.currentSwitch = "off"
+               } else {
+                       this.currentSwitch = "on"
+               }
+
                colorTemperatues.add(new ColorTemperature(sendEvent, id, label, displayName, this.level, this.currentSwitch, this.colorTemperature))
        }
 
index d495d0fa6b23ffbcd7d163a6fff57a870b44e103..bf8471f1a41935fa0191f93f558dc31b5679966d 100644 (file)
@@ -924,6 +924,8 @@ def ExtractEvents(extractedEvents):
                                event = open("eventSimulator/musicPlayerLevelEvent.groovy", "r")
                        elif capability == "capability.switchLevel":
                                event = open("eventSimulator/switchLevelEvent.groovy", "r")
+                       elif capability == "capability.colorControl":
+                               event = open("eventSimulator/colorLevelChangeEvent.groovy", "r")
                        for line in event:
                                extractedEvents.write(line)
                        event.close()
diff --git a/run.sh b/run.sh
index d77af37608a2679ba4ecc430cbca06b17162cb3f..019ba29f014528e07fb6ba2bc11ae0caf166a675 100755 (executable)
--- a/run.sh
+++ b/run.sh
@@ -1,7 +1,9 @@
 #!/bin/bash
 
 # Device conflict
-python ModelCheck.py ../jpf-core/ ../logs/thermostats/ ../smartapps/ appLists/device-interaction/thermostatsAppList appLists/device-interaction/thermostatsAppList2
+python ModelCheck.py ../jpf-core/ ../logs/nonHueLights/ ../smartapps/ appLists/device-interaction/nonHueLightsAppList appLists/device-interaction/nonHueLightsAppList2
+#python ModelCheck.py ../jpf-core/ ../logs/hueLights/ ../smartapps/ appLists/device-interaction/hueLightsAppList
+#python ModelCheck.py ../jpf-core/ ../logs/thermostats/ ../smartapps/ appLists/device-interaction/thermostatsAppList appLists/device-interaction/thermostatsAppList2
 #python ModelCheck.py ../jpf-core/ ../logs/alarms/ ../smartapps/ appLists/device-interaction/alarmsAppList appLists/device-interaction/alarmsAppList2
 #python ModelCheck.py ../jpf-core/ ../logs/locks/ ../smartapps/ appLists/device-interaction/locksAppList appLists/device-interaction/locksAppList2
 #python ModelCheck.py ../jpf-core/ ../logs/musicPlayers/ ../smartapps/ appLists/device-interaction/musicPlayersAppList