Commit #5
[smartthings-infrastructure.git] / Runner.py
index 86a42515518481464208059ee963fca53b0dbc3d..9aab6288bb075d728ca20eab6edfca50fd26441c 100644 (file)
--- a/Runner.py
+++ b/Runner.py
@@ -7,13 +7,13 @@ definition = open("Methods/"+"definition.groovy", "r")
 preferences = open("Methods/"+"preferences.groovy", "r")
 setLocationMode = open("Methods/"+"setLocationMode.groovy", "r")
 subscribe = open("Methods/"+"subscribe.groovy", "r")
-EventHandler = open("Methods/"+"EventHandler.groovy", "r")
 runIn = open("Methods/"+"runIn.groovy", "r")
 unschedule = open("Methods/"+"unschedule.groovy", "r")
 sendNotificationToContacts = open("Methods/"+"sendNotificationToContacts.groovy", "r")
 sendSms = open("Methods/"+"sendSms.groovy", "r")
+eventHandler = open("Methods/"+"eventHandler.groovy", "r")
 App = open("Extractor/"+"App.groovy", "r")
-ExtractedObjects = open("Extractor/"+"ExtractedObjects.groovy", "r")
+extractedObjects = open("Extractor/"+"extractedObjects.groovy", "r")
 
 
 #Extract information from preferences and subscribe method to create required objects
@@ -24,24 +24,24 @@ Out.write("//Importing Libraries\n")
 Out.write("import groovy.transform.Field\n")
 Out.write("\n")
 Out.write("//Importing Classes\n")
-Out.write("import ContactSensor.contacting\n")
-Out.write("import ContactSensor.contacts\n")
-Out.write("import Lock.locking\n")
-Out.write("import Lock.locks\n")
-Out.write("import Switch.switching\n")
-Out.write("import Switch.switches\n")
-Out.write("import Event.Event\n")
+Out.write("import ContactSensor.Contacting\n")
+Out.write("import ContactSensor.Contacts\n")
+Out.write("import Lock.Locking\n")
+Out.write("import Lock.Locks\n")
+Out.write("import Switch.Switching\n")
+Out.write("import Switch.Switches\n")
 Out.write("import Logger.Logger\n")
-Out.write("import Location.locationVar\n")
+Out.write("import Location.LocationVar\n")
 Out.write("import Location.Phrase\n")
-Out.write("import appTouch.Touch\n")
+Out.write("import appTouch.Touched\n")
+Out.write("import Event.Event\n")
 Out.write("\n")
 Out.write("//GlobalVariables\n")
 for line in GlobalVariables:
        Out.write(line)
 Out.write("\n")
-Out.write("//ExtractedObjects\n")
-for line in ExtractedObjects:
+Out.write("//extractedObjects\n")
+for line in extractedObjects:
        Out.write(line)
 Out.write("\n")
 Out.write("//Methods\n")
@@ -53,8 +53,6 @@ for line in setLocationMode:
        Out.write(line)
 for line in subscribe:
        Out.write(line)
-for line in EventHandler:
-       Out.write(line)
 for line in runIn:
        Out.write(line)
 for line in unschedule:
@@ -63,12 +61,13 @@ for line in sendNotificationToContacts:
        Out.write(line)
 for line in sendSms:
        Out.write(line)
+for line in eventHandler:
+       Out.write(line)
 Out.write("\n")
 for line in App:
        Out.write(line)
 Out.write("\n")
 Out.write("installed()\n")
-Out.write("EventHandler()\n")
 Out.close()