Trigger a script on motion detected (two motion detectors)

  • 85 Views
  • Last Post 02 August 2013
Axial-User posted this 02 August 2013

I am trying (unsuccessfully) to sequence a script as follows. I would like to trigger a script to run once (a script that starts a camera recording) when either of two motion detectors are tripped.

I tried adding both as triggers to a scene, but then the scene triggers when either goes off (twice if you walk past both sensors). I only want it to trigger once when either goes off.

I tried creating two scenes. One that triggers the script when motion detector A is tripped with a condition that motion detector B is at state 0. The second that reverses that logic - trigger the script when motion detector B is tripped with a condition that motion detector A is at state 0.

The only thing I can think of is that checking for state 0 is incorrect.

Any thoughts?

Order By: Standard | Newest | Votes
Axial-User posted this 02 August 2013

Problem solved - in the condition I needed to click on the "at" that is defaulted and change it to a "=". The set of two scenes worked as I desired. It would be nice to accomplish in one scene, but it would require the trigger logic to be expanded to be able to check for a specific condition related to a given trigger.

Ryan-Scott posted this 02 August 2013

I am trying (unsuccessfully) to sequence a script as follows. I would like to trigger a script to run once (a script that starts a camera recording) when either of two motion detectors are tripped.

I tried adding both as triggers to a scene, but then the scene triggers when either goes off (twice if you walk past both sensors). I only want it to trigger once when either goes off.

I tried creating two scenes. One that triggers the script when motion detector A is tripped with a condition that motion detector B is at state 0. The second that reverses that logic - trigger the script when motion detector B is tripped with a condition that motion detector A is at state 0.

The only thing I can think of is that checking for state 0 is incorrect.

Any thoughts?



You might could do something with a virtual device. Add the virtual device to your scene and turn it on. Add a pause then turn it off after a few seconds. Then in your conditions, check if the virtual device is off. This would make it so if either sensor triggered, it would turn on the virtual device and start your recording, but wouldn't record again until the "pause time" elapsed and turned the virtual device off again.

Axial-User posted this 02 August 2013

Thank you Scott. That was a good idea. It allows for additional flexibility in the scene.

Close