Applescript to turn on motion detection when home alarm system is armed
Anyone know of a sure-fire way in SecuritySpy to have Motion Capture armed whenever I arm my home alarm system? My home alarm system sends me an email whenever it's armed or disarmed. I'd love to have a way for that email to trigger Motion Capture mode on and off in Security Spy.
Comments
If it has to be email, here's how to do it:
- Open Script Editor and create two AppleScripts: one to arm and the other to disarm your cameras, for example, this script will arm all cameras by setting them to the schedule "Armed 24/7":
tell application "SecuritySpy"
set schedule "Armed 24/7" camera number -1 mode MotionCapture
end tell
- On the Mac that is running SecuritySpy, set up Mail to receive the emails from your alarm system.
- In Preferences in Mail, click on Rules
- Add two rules to detect the emails based on words in the subject or content, and for the rule action, choose "Run AppleScript" and select the scripts you made above.
How would the script be activated under the Http request method?
Please let me know how you get on with this.