New list for Alarms group.
[smartthings-infrastructure.git] / Runner.py
index e82d1c2f1534f7a60e4da261a0ac9404d7968fa8..6f8bd4def5599b5c28792704c7248d8e5fae598e 100644 (file)
--- a/Runner.py
+++ b/Runner.py
@@ -21,9 +21,16 @@ sendSms = open("Methods/"+"sendSms.groovy", "r")
 sendPush = open("Methods/"+"sendPush.groovy", "r")
 eventHandler = open("Methods/"+"eventHandler.groovy", "r")
 schedule = open("Methods/"+"schedule.groovy", "r")
+httpPostJson = open("Methods/"+"httpPostJson.groovy", "r")
 now = open("Methods/"+"now.groovy", "r")
 getTemperatureScale = open("Methods/"+"getTemperatureScale.groovy", "r")
 getSunriseAndSunset = open("Methods/"+"getSunriseAndSunset.groovy", "r")
+runEvery15Minutes = open("Methods/"+"runEvery15Minutes.groovy", "r")
+timeToday = open("Methods/"+"timeToday.groovy", "r")
+sendNotification = open("Methods/"+"sendNotification.groovy", "r")
+canSchedule = open("Methods/"+"canSchedule.groovy", "r")
+createAccessToken = open("Methods/"+"createAccessToken.groovy", "r")
+runOnce = open("Methods/"+"runOnce.groovy", "r")
 App1 = open("Extractor/"+"App1/App1.groovy", "r")
 extractedObjectsApp1 = open("Extractor/"+"App1/extractedObjectsApp1.groovy", "r")
 extractedObjectsConstructorApp1 = open("Extractor/"+"App1/extractedObjectsConstructorApp1.groovy", "r")
@@ -35,6 +42,7 @@ extractedFunctionsApp1 = open("Extractor/"+"App1/extractedFunctionsApp1.groovy",
 Out.write("//Infrastructure for SmartThings Application\n")
 Out.write("//Importing Libraries\n")
 Out.write("import groovy.transform.Field\n")
+Out.write("import groovy.json.JsonSlurper\n")
 Out.write("\n")
 Out.write("//Importing Classes\n")
 Out.write("import ContactSensor.ContactSensor\n")
@@ -80,6 +88,28 @@ Out.write("import ColorControl.ColorControl\n")
 Out.write("import ColorControl.ColorControls\n")
 Out.write("import EnergyMeter.EnergyMeter\n")
 Out.write("import EnergyMeter.EnergyMeters\n")
+Out.write("import IlluminanceMeasurement.IlluminanceMeasurement\n")
+Out.write("import IlluminanceMeasurement.IlluminanceMeasurements\n")
+Out.write("import PowerMeter.PowerMeter\n")
+Out.write("import PowerMeter.PowerMeters\n")
+Out.write("import RelativeHumidityMeasurement.RelativeHumidityMeasurement\n")
+Out.write("import RelativeHumidityMeasurement.RelativeHumidityMeasurements\n")
+Out.write("import RelaySwitch.RelaySwitch\n")
+Out.write("import RelaySwitch.RelaySwitches\n")
+Out.write("import SleepSensor.SleepSensor\n")
+Out.write("import SleepSensor.SleepSensors\n")
+Out.write("import StepSensor.StepSensor\n")
+Out.write("import StepSensor.StepSensors\n")
+Out.write("import SwitchLevel.SwitchLevel\n")
+Out.write("import SwitchLevel.SwitchLevels\n")
+Out.write("import TemperatureMeasurement.TemperatureMeasurement\n")
+Out.write("import TemperatureMeasurement.TemperatureMeasurements\n")
+Out.write("import WaterSensor.WaterSensor\n")
+Out.write("import WaterSensor.WaterSensors\n")
+Out.write("import Valve.Valve\n")
+Out.write("import Valve.Valves\n")
+Out.write("import MobilePresence.MobilePresence\n")
+Out.write("import MobilePresence.MobilePresences\n")
 Out.write("import Event.Event\n")
 Out.write("import Timer.SimulatedTimer\n")
 Out.write("\n")
@@ -142,6 +172,20 @@ for line in getTemperatureScale:
        Out.write("\t"+line)
 for line in getSunriseAndSunset:
        Out.write("\t"+line)
+for line in httpPostJson:
+       Out.write("\t"+line)
+for line in runEvery15Minutes:
+       Out.write("\t"+line)
+for line in timeToday:
+       Out.write("\t"+line)
+for line in sendNotification:
+       Out.write("\t"+line)
+for line in canSchedule:
+       Out.write("\t"+line)
+for line in createAccessToken:
+       Out.write("\t"+line)
+for line in runOnce:
+       Out.write("\t"+line)
 Out.write("\n")
 Start = 0
 for line in App1:
@@ -162,11 +206,19 @@ runIn = open("Methods/"+"runIn.groovy", "r")
 unschedule = open("Methods/"+"unschedule.groovy", "r")
 sendNotificationToContacts = open("Methods/"+"sendNotificationToContacts.groovy", "r")
 sendSms = open("Methods/"+"sendSms.groovy", "r")
+sendPush = open("Methods/"+"sendPush.groovy", "r")
 eventHandler = open("Methods/"+"eventHandler.groovy", "r")
 schedule = open("Methods/"+"schedule.groovy", "r")
 now = open("Methods/"+"now.groovy", "r")
 getTemperatureScale = open("Methods/"+"getTemperatureScale.groovy", "r")
 getSunriseAndSunset = open("Methods/"+"getSunriseAndSunset.groovy", "r")
+httpPostJson = open("Methods/"+"httpPostJson.groovy", "r")
+runEvery15Minutes = open("Methods/"+"runEvery15Minutes.groovy", "r")
+timeToday = open("Methods/"+"timeToday.groovy", "r")
+sendNotification = open("Methods/"+"sendNotification.groovy", "r")
+canSchedule = open("Methods/"+"canSchedule.groovy", "r")
+createAccessToken = open("Methods/"+"createAccessToken.groovy", "r")
+runOnce = open("Methods/"+"runOnce.groovy", "r")
 App2 = open("Extractor/"+"App2/App2.groovy", "r")
 extractedObjectsApp2 = open("Extractor/"+"App2/extractedObjectsApp2.groovy", "r")
 extractedObjectsConstructorApp2 = open("Extractor/"+"App2/extractedObjectsConstructorApp2.groovy", "r")
@@ -220,6 +272,20 @@ for line in getTemperatureScale:
        Out.write("\t"+line)
 for line in getSunriseAndSunset:
        Out.write("\t"+line)
+for line in httpPostJson:
+       Out.write("\t"+line)
+for line in runEvery15Minutes:
+       Out.write("\t"+line)
+for line in timeToday:
+       Out.write("\t"+line)
+for line in sendNotification:
+       Out.write("\t"+line)
+for line in canSchedule:
+       Out.write("\t"+line)
+for line in createAccessToken:
+       Out.write("\t"+line)
+for line in runOnce:
+       Out.write("\t"+line)
 Out.write("\n")
 Start = 0
 for line in App2:
@@ -244,8 +310,8 @@ Out.write("if (installOrder) {\n")
 Out.write("\tapp1.installed()\n")
 Out.write("\tapp2.installed()\n")
 Out.write("} else {\n")
-Out.write("\tapp1.installed()\n")
 Out.write("\tapp2.installed()\n")
+Out.write("\tapp1.installed()\n")
 Out.write("}\n\n")
 for line in eventSimulator:
        Out.write(line)