Notifications and Schedules

dannasoft
edited January 2016 in SecuritySpy
I want to setup notifications on motion detection on my installation. I have 18 cams total but for 4 or 5 of them I'd like an email notification sent on motion detection with a clip. That's easy enough to do it seems but I'd like that to only occur on weekends or weekdays after office hours.

Is this possible and if so how would I go about it?

Comments

  • To be more clear. I want continuous recording 24/7 but only get motion notifications after hours.
  • This currently isn't a built-in feature, but can be set up using AppleScript - I can provide more information on this if you want it?

    The next version of SecuritySpy (4.0, which should be finished in a few months) will allow you to independently set (or schedule) continuous capture, motion capture and actions independently, so it will provide the functionality you want.
  • Thanks. Any information you could provide would be very helpful. I'm fairly proficient with AppleScript.
  • Ben
    Ben
    edited January 2016
    So the best thing would be to schedule a script in the morning to turn off email notifications, and another script in the evenings to turn them back on. Then you simply leave the cameras in Active mode all the time.

    Firstly, have a look at the SecuritySpy AppleScript Examples page, which will demonstrate a few ways to automate SecuritySpy using AppleScript, including a "Camera Settings Change" example.

    The script to turn off email notifications will look like this:

      property thePath : "http://username:password@127.0.0.1:8000/++camerasetup"
      do shell script "curl -d " & "'cameraNum=0&sendEmailCheck=0&action=save' " & thePath

    The script to turn them on will be the same apart from the sendEmailCheck parameter, which should be set to 1 instead of 0.

    Make sure to substitute in the correct camera number, which you will find in the "Device Map" window in SecuritySpy.

    Duplicate the "do shell script" line with different camera numbers to apply this settings change to more than one camera.

    So create these two scripts, and save them somewhere as applications (you will find this option to create applications when you save them from the AppleScript Editor application).

    These script-applications can be scheduled to run at particular times of the day using something like Cronnix.

    Note that this method works via SecuritySpy's web server, so this must be enabled (in the Web Server Settings window in SecuritySpy), and if you have password protection enabled for the web server you must put the username and password into the script where indicated.

    Hope this helps!
  • Thanks Ben. That's exactly what I needed. My client purchased an unlimited camera license and I'll be implementing these scripts next week.