Adding a feature to detect potential motion sensor conflict through acceleration...
[smartthings-infrastructure.git] / Extractor / ExtractorScript.py
index 974afc453933e8c6f2dd0921524127d3465f4cfe..f762b812f44ea381cf7f80f32c039e9f11d3c97f 100644 (file)
@@ -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