From: rtrimana Date: Sat, 27 Jul 2019 18:30:48 +0000 (-0700) Subject: Adding a feature to detect potential motion sensor conflict through acceleration... X-Git-Url: http://plrg.eecs.uci.edu/git/?p=smartthings-infrastructure.git;a=commitdiff_plain;h=01bc90033a262dfb036f903975105398ba90b673 Adding a feature to detect potential motion sensor conflict through acceleration sensor. --- diff --git a/Extractor/ExtractorScript.py b/Extractor/ExtractorScript.py index 974afc4..f762b81 100644 --- a/Extractor/ExtractorScript.py +++ b/Extractor/ExtractorScript.py @@ -103,6 +103,7 @@ def AnalyzeCapabilities(Temp, appName, F): Temp == "capability.illuminanceMeasurement" or #Motion related Temp == "capability.motionSensor" or + Temp == "capability.accelerationSensor" or #Water related Temp == "capability.valve" or Temp == "capability.waterSensor" or @@ -131,7 +132,8 @@ def AnalyzePhysicalInteraction(app1Capab, app2Capab): "capability.switchLevel" in app2Capab): print ("\nWARNING: Potential PHYSICAL CONFLICT (light) detected between App1 and App2!\n") #Motion - if ("capability.motionSensor" in app1Capab): + # TODO: Technically this is not entirely precise since we need to be able to detect that the other app creates motion + if ("capability.motionSensor" in app1Capab) or ("capability.accelerationSensor" in app1Capab): print ("\nWARNING: Potential PHYSICAL CONFLICT (motion) detected between App1 and App2!\n") #Water if ("capability.waterSensor" in app1Capab) and ("capability.valve" in app2Capab or