gregjsmith wrote:I'm looking for a way to do various things after X minutes from the last motion detected in the house. This "away mode" is going to be different then day and night and it has to look at when the last motion was detected from all the motion detectors in the house.
Do the readers of the board have any suggestions?
Here's one idea.
Have a variable "motion detected"
Whenever any motion is detected toggle this variable between true and false.
Have two trigger actions, one that activates on the true-false transition and on on the false-true transition
These trigger actions both do the same thing, they 'remove delayed actions' for the target devices and then they re-establish the delayed actions for the target devices in X minutes. If any motion occurs the delays are reset. This is done with the applescript commands.
How does that sound??