Yes - three parameters are passed to AppleScripts that are invoked upon motion detection:
The camera number
The camera name
The reason for the trigger, which is a comma-separated list of the following reasons: Motion,Audio,Script,CameraEvent,WebEvent,OtherCamera,Manual,Human,Vehicle,Animal
Here's a simple script that will pop up an alert that shows the trigger reason:
on run arg
display alert "Reason for trigger: " & item 3 of arg
end run
Thanks Ben.... After looking at what I am trying to achieve I find myself in a hole. We have lots of deer that eat the plants in our yard. I found that they however don't like the sprinkler system that I was going to turn on via web interface. The problem is I believe there is no easy way to shut off the notifications and email from Actions for animals and keep it going for Humans ( This we leave notifications/email on during the night and when we are away).
Can the script disable the notifications and email given the type of trigger and then re-enable it
I can't use HomeKit because of the age of the Mac. (not sure that would help anyway)
In that case, what you'll need to do is duplicate the camera by adding it twice to SecuritySpy using identical device settings. The first camera instance can detect animals and call the sprinkler script without notifications, while the second instance can detect humans and send you notifications.
Comments
Yes - three parameters are passed to AppleScripts that are invoked upon motion detection:
Here's a simple script that will pop up an alert that shows the trigger reason:
Perfect - thanks.
Should I of found that in the docs , or the interface found in the script editor???
Thanks Dale
This is mentioned in the user manual, but it's easy to miss!
Thanks Ben.... After looking at what I am trying to achieve I find myself in a hole. We have lots of deer that eat the plants in our yard. I found that they however don't like the sprinkler system that I was going to turn on via web interface. The problem is I believe there is no easy way to shut off the notifications and email from Actions for animals and keep it going for Humans ( This we leave notifications/email on during the night and when we are away).
Can the script disable the notifications and email given the type of trigger and then re-enable it
I can't use HomeKit because of the age of the Mac. (not sure that would help anyway)
Thanks again
Dale
Hi Dale,
In that case, what you'll need to do is duplicate the camera by adding it twice to SecuritySpy using identical device settings. The first camera instance can detect animals and call the sprinkler script without notifications, while the second instance can detect humans and send you notifications.
I guess I am going to have to learn to read again. That works ! It also opens up a lot of other work arounds.
Thanks Dale