'energy' : 1,
'power' : 2,
'illuminance' : 1,
- 'humidity' : 1,
+ 'humidity' : 2,
'alarm' : 4,
'contact' : 2,
'status' : 3,
'trackDescription' : 1,
'trackData' : 1,
'mute' : 2,
- 'temperature' : 1,
+ 'temperature' : 2,
'heatingSetpoint' : 1,
'coolingSetpoint' : 1,
'thermostatSetpoint' : 1}
for line in event:
extractedEvents.write(line)
event.close()
- elif eventList[i] == "acceleration.active":
- event = open("eventSimulator/accelerationDefaultActiveEvent.groovy", "r")
- for line in event:
- extractedEvents.write(line)
- event.close()
- elif eventList[i] == "acceleration.inactive":
- event = open("eventSimulator/accelerationDefaultInactiveEvent.groovy", "r")
- for line in event:
- extractedEvents.write(line)
- event.close()
elif eventList[i] == "sleeping":
#Write two events subsequently
event = open("eventSimulator/sleepSleepingEvent.groovy", "r")
extractedEvents.write(line)
event.close()
elif eventList[i] == "humidity":
- event = open("eventSimulator/humidityMeasurementEvent.groovy", "r")
+ event = open("eventSimulator/humidityHighMeasurementEvent.groovy", "r")
+ for line in event:
+ extractedEvents.write(line)
+ event.close()
+ extractedEvents.write("\n\t\t\tbreak\n")
+ counter = counter + 1
+ extractedEvents.write("\t\tcase %d:\n" % counter)
+ event = open("eventSimulator/humidityLowMeasurementEvent.groovy", "r")
for line in event:
extractedEvents.write(line)
event.close()
eventVarCount = eventVarCounterMap[eventList[i]]
eventVarCounterMap[eventList[i]] = eventVarCount + 1
capability = capabilityMap[variable[eventVarCount]]
+ #Write two events subsequently
+ if capability == "capability.thermostat":
+ event = open("eventSimulator/temperatureHighEvent.groovy", "r")
+ elif capability == "capability.temperatureMeasurement":
+ event = open("eventSimulator/temperatureHighMeasurementEvent.groovy", "r")
+ for line in event:
+ extractedEvents.write(line)
+ event.close()
+ extractedEvents.write("\n\t\t\tbreak\n")
+ counter = counter + 1
+ extractedEvents.write("\t\tcase %d:\n" % counter)
if capability == "capability.thermostat":
- event = open("eventSimulator/temperatureEvent.groovy", "r")
+ event = open("eventSimulator/temperatureLowEvent.groovy", "r")
elif capability == "capability.temperatureMeasurement":
- event = open("eventSimulator/temperatureMeasurementEvent.groovy", "r")
+ event = open("eventSimulator/temperatureLowMeasurementEvent.groovy", "r")
for line in event:
extractedEvents.write(line)
event.close()
--- /dev/null
+/////////////////////////////////////////////////////////////////////
+def runDaily(String date, Closure methodToCall) {
+ methodToCall()
+}
setLocationMode = open("Methods/"+"setLocationMode.groovy", "r")
subscribe = open("Methods/"+"subscribe.groovy", "r")
runIn = open("Methods/"+"runIn.groovy", "r")
+runDaily = open("Methods/"+"runDaily.groovy", "r")
unschedule = open("Methods/"+"unschedule.groovy", "r")
sendNotificationToContacts = open("Methods/"+"sendNotificationToContacts.groovy", "r")
sendSms = open("Methods/"+"sendSms.groovy", "r")
Out.write("\t"+line)
for line in runIn:
Out.write("\t"+line)
+for line in runDaily:
+ Out.write("\t"+line)
for line in unschedule:
Out.write("\t"+line)
for line in sendNotificationToContacts:
setLocationMode = open("Methods/"+"setLocationMode.groovy", "r")
subscribe = open("Methods/"+"subscribe.groovy", "r")
runIn = open("Methods/"+"runIn.groovy", "r")
+runDaily = open("Methods/"+"runDaily.groovy", "r")
unschedule = open("Methods/"+"unschedule.groovy", "r")
sendNotificationToContacts = open("Methods/"+"sendNotificationToContacts.groovy", "r")
sendSms = open("Methods/"+"sendSms.groovy", "r")
Out.write("\t"+line)
for line in runIn:
Out.write("\t"+line)
+for line in runDaily:
+ Out.write("\t"+line)
for line in unschedule:
Out.write("\t"+line)
for line in sendNotificationToContacts:
sunrise-sunset.groovy
switch-activates-home-phrase-or-mode.groovy
switch-changes-mode.groovy
-talking-alarm-clock.groovy
thermostat-mode-director.groovy
vacation-lighting-director.groovy
working-from-home.groovy
MonitorAndSetEcobeeHumidity.groovy
SmartPresence.groovy
Switches.groovy
-WorkingFromHome.groovy
\ No newline at end of file
+WorkingFromHome.groovy
+### The following is a very buggy app
+###talking-alarm-clock.groovy
--- /dev/null
+ humidityMeasurementObject.setValue([name: "humidity", value: "70"/*A number between 0 to 100 as a charge*/, deviceId: "humidityMeasurementID0", descriptionText: "",
+ displayed: true, linkText: "", isStateChange: false, unit: "", data: '{"info": "info"}'])
--- /dev/null
+ humidityMeasurementObject.setValue([name: "humidity", value: "30"/*A number between 0 to 100 as a charge*/, deviceId: "humidityMeasurementID0", descriptionText: "",
+ displayed: true, linkText: "", isStateChange: false, unit: "", data: '{"info": "info"}'])
+++ /dev/null
- thermostatObject.setValue([name: "temperature", value: "55", deviceId: "thermostatID0", descriptionText: "",
- displayed: true, linkText: "", isStateChange: false, unit: "", data: '{"info": "info"}'])
--- /dev/null
+ thermostatObject.setValue([name: "temperature", value: "55", deviceId: "thermostatID0", descriptionText: "",
+ displayed: true, linkText: "", isStateChange: false, unit: "", data: '{"info": "info"}'])
--- /dev/null
+ temperatureMeasurementObject.setValue([name: "temperature", value: "55"/*A number between 0 to 100*/, deviceId: "temperatureMeasurementID0", descriptionText: "",
+ displayed: true, linkText: "", isStateChange: false, unit: "", data: '{"info": "info"}'])
--- /dev/null
+ thermostatObject.setValue([name: "temperature", value: "45", deviceId: "thermostatID0", descriptionText: "",
+ displayed: true, linkText: "", isStateChange: false, unit: "", data: '{"info": "info"}'])
--- /dev/null
+ temperatureMeasurementObject.setValue([name: "temperature", value: "45"/*A number between 0 to 100*/, deviceId: "temperatureMeasurementID0", descriptionText: "",
+ displayed: true, linkText: "", isStateChange: false, unit: "", data: '{"info": "info"}'])
+++ /dev/null
- temperatureMeasurementObject.setValue([name: "temperature", value: "45"/*A number between 0 to 100*/, deviceId: "temperatureMeasurementID0", descriptionText: "",
- displayed: true, linkText: "", isStateChange: false, unit: "", data: '{"info": "info"}'])
#!/bin/bash
# Device conflict
-python ModelCheck.py ../jpf-core/ ../logs/acfanheaterSwitches/ ../smartapps/ appLists/device-interaction/acfanheaterSwitchesAppList appLists/device-interaction/acfanheaterSwitchesAppList2
+#python ModelCheck.py ../jpf-core/ ../logs/valves/ ../smartapps/ appLists/device-interaction/valvesAppList appLists/device-interaction/valvesAppList2
+#python ModelCheck.py ../jpf-core/ ../logs/acfanheaterSwitches/ ../smartapps/ appLists/device-interaction/acfanheaterSwitchesAppList appLists/device-interaction/acfanheaterSwitchesAppList2
#python ModelCheck.py ../jpf-core/ ../logs/cameraSwitches/ ../smartapps/ appLists/device-interaction/cameraSwitchesAppList appLists/device-interaction/cameraSwitchesAppList2
#python ModelCheck.py ../jpf-core/ ../logs/ventfanSwitches/ ../smartapps/ appLists/device-interaction/ventfanSwitchesAppList appLists/device-interaction/ventfanSwitchesAppList2
#python ModelCheck.py ../jpf-core/ ../logs/speeches/ ../smartapps/ appLists/device-interaction/speechesAppList appLists/device-interaction/speechesAppList2
#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
-#python ModelCheck.py ../jpf-core/ ../logs/relaySwitch/ ../smartapps/ appLists/device-interaction/relaySwitchesAppList
+#python ModelCheck.py ../jpf-core/ ../logs/relaySwitches/ ../smartapps/ appLists/device-interaction/relaySwitchesAppList appLists/device-interaction/relaySwitchesAppList2
#python ModelCheck.py ../jpf-core/ ../logs/cameras/ ../smartapps/ appLists/device-interaction/camerasAppList
# Physical conflict
#python ModelCheck.py ../jpf-core/ ../logs/ ../smartapps/ appLists/physical-interaction/motionsensorAppList appLists/physical-interaction/motionAppList
#python ModelCheck.py ../jpf-core/ ../logs/ ../smartapps/ appLists/physical-interaction/illuminancesensorAppList appLists/physical-interaction/lightAppList
#python ModelCheck.py ../jpf-core/ ../logs/ ../smartapps/ appLists/physical-interaction/watersensorAppList appLists/physical-interaction/watervalveAppList
+
+# Global variable conflict
+python ModelCheck.py ../jpf-core/ ../logs/globalStateVariables/ ../smartapps/ appLists/global-state-variable-interaction/globalstatevariableAppList appLists/global-state-variable-interaction/globalstatevariableAppList2