SecuritySpy and Captured Images

Posted on
Sun Aug 04, 2013 11:20 am
AlaskaDave offline
User avatar
Posts: 293
Joined: Oct 16, 2008
Location: Juneau, Alaksa

SecuritySpy and Captured Images

Currently I capture a photo at Noon and FTP to a directory. These are fun to look at and compare images from previous years of trees in the yard, snowfall...etc. Currently I am using the latest version of the plug-in and Security Spy. I have added a temperature overlay which will be nice for this purpose above. For the capture of a daily image so as to include the overlay, should I use Security Spy or some type of scheduled action in Indigo? I don't see this option as part of the plug-in so figure this must be achieved using the desktop software.

Posted on
Sun Aug 04, 2013 7:17 pm
AlaskaDave offline
User avatar
Posts: 293
Joined: Oct 16, 2008
Location: Juneau, Alaksa

Re: SecuritySpy and Captured Images

On a second note, can I display the temperature coming from WeatherSnoop and display as an overlay? I send my data to WeatherUnderground but don't bring back into Indigo via. the plug-in, instead using WeatherSnoop's Plug-in.

Posted on
Mon Sep 09, 2013 10:46 pm
Perry The Cynic offline
Posts: 838
Joined: Apr 07, 2008

Re: SecuritySpy and Captured Images

The plugin currently has no actions for capturing pictures (mostly because Indigo doesn't have picture-valued variables or anything else that could expose pictures as part of Indigo programming).

Hm.... how would you like this to work? Just out of curiosity, you understand... :-)

Cheers
-- perry

Posted on
Wed Dec 31, 2014 4:17 pm
T-Power offline
User avatar
Posts: 220
Joined: May 10, 2010

Re: SecuritySpy and Captured Images

Hello All,

I use this script to have SS sent an image when motion is detected:
Code: Select all
tell application "Finder"
   activate
   if file "Macintosh HD:Users:macmini:Desktop:SecuritySpyimage.jpg" exists then
      delete file "Macintosh HD:Users:macmini:Desktop:SecuritySpyimage.jpg"
   end if
   delay 5
end tell

tell application "SecuritySpy"
   capture image camera number 13 as "/Users/macmini/Desktop/SecuritySpyimage.jpg"
end tell

set theSubject to "Front Porch Sensor Detection"
set theSender to “myname@aol”.com
set theAddress to “xxx@hotmail.com”
set theAttachment to "/Users/macmini/Desktop/SecuritySpyimage.jpg"

tell application "Mail"
   set theMessage to make new outgoing message with properties {subject:theSubject, sender:theSender}
   
   tell theMessage
      set visible to false
      make new to recipient at end of to recipients with properties {address:theAddress}
      make new attachment with properties {file name:theAttachment} at after the last paragraph
   end tell
   send theMessage
   delay 10
end tell

tell application "System Events"
   set visible of process "Mail" to false
end tell


Can someone please help me modify this script to have SS send a short 5 to 10sec video clip?

T.I.A.

MacMini 2.3 GHz Intel Core i7 16GB DDR3
Indigo Pro 2022.1 macOS Mojave 10.14.6

Posted on
Wed Dec 31, 2014 6:21 pm
ckeyes888 offline
Posts: 2425
Joined: Nov 26, 2009
Location: Kalispell, MT

Re: SecuritySpy and Captured Images

Don't know about modifying that script but here's one I use to email the most recent video in a folder.

Carl

Code: Select all
set sourceFolder to "Macintosh HD:Users:TV:Sites:ss1"
script o
   property l : {}
end script
tell application "Finder"
   set o's l to sort (every file of entire contents of folder sourceFolder) by modification date
   repeat with i from (count o's l) to 1 by -1
      if name of item i of o's l is not ".DS_Store" then
         set theVideo to (item i of o's l as alias)
      end if
   end repeat
end tell



tell application "IndigoServer"
   set theInsert to "This attached video was taken at " & value of variable "ClockTimeAmPm" & " with your couch camera." & return & return & "Have a good " & value of variable "TimeOfDayShort" & "!"
   set PrintDateTimeName to value of variable "DayDate"
end tell

set theSenderTemp to "xxx@xxxxxx.com"
set the_mailto to {"xxx@xxxxxx.net"}
set nameList to {"Carl"}

set TheName to "Couch Webcam Video"

set the_subject to "Alert! Motion Detected From Couch Camera."
set the_content to ("Hey Carl," & return & return & "This is an automated message from your Indigo Security System." & return & return & theInsert & return & return & "To report a problem with your system contact " & theSenderTemp & "." & return & return & "Your image from, " & TheName as text) & ", from the folder " & PrintDateTimeName & " has been backed up into the folder Security Cameras." & return & return
tell application "Mail"
   activate
   set attachmentVar to theVideo
   set newMessage to make new outgoing message with properties {address:the_mailto, subject:the_subject, content:the_content}
   tell newMessage
      set x to offset of "Indigo Security System." in the_content
      repeat with y from 0 to count of "Indigo Security System."
         set font of character (x + y) of content to "Helvetica Bold"
         set color of character (x + y) of content to {48632, 1630, 1102}
      end repeat
      set x to offset of TheName in the_content
      repeat with y from 0 to count of TheName
         set font of character (x + y) of content to "Helvetica Bold"
      end repeat
      set x to offset of PrintDateTimeName in the_content
      repeat with y from 0 to count of PrintDateTimeName
         set font of character (x + y) of content to "Helvetica Bold"
      end repeat
      set x to offset of "Security Cameras." in the_content
      repeat with y from 0 to count of "Security Cameras."
         set font of character (x + y) of content to "Helvetica Bold"
         set size of content to (17)
      end repeat
      make new attachment with properties {file name:attachmentVar}
      repeat with i from 1 to count nameList
         make new to recipient at end of to recipients with properties {name:item i of nameList, address:item i of the_mailto}
      end repeat
      
      send
   end tell
end tell

Posted on
Wed Dec 31, 2014 7:00 pm
T-Power offline
User avatar
Posts: 220
Joined: May 10, 2010

Re: SecuritySpy and Captured Images

Hello and Thank you Carl for the response.
I will study your script and hopefully be able to meet my objective.

For a few years now I just cannot seem to properly create a script to simply record a few minutes of video and send it off via email.

Thanks

MacMini 2.3 GHz Intel Core i7 16GB DDR3
Indigo Pro 2022.1 macOS Mojave 10.14.6

Posted on
Wed Dec 31, 2014 7:19 pm
ckeyes888 offline
Posts: 2425
Joined: Nov 26, 2009
Location: Kalispell, MT

Re: SecuritySpy and Captured Images

A lot of it is setup within SecuritySpy.
Mine is set to have the cam record a video whenever it's set to "active".
Also make note of where the video is being saved.

In Indigo I use a button on a CP that toggle's a device on/off,
which triggers the cam active or passive.

Hope you get it all working.

Carl

Posted on
Thu Jan 01, 2015 5:48 pm
T-Power offline
User avatar
Posts: 220
Joined: May 10, 2010

Re: SecuritySpy and Captured Images

Thank you again for your help!

MacMini 2.3 GHz Intel Core i7 16GB DDR3
Indigo Pro 2022.1 macOS Mojave 10.14.6

Page 1 of 1

Who is online

Users browsing this forum: No registered users and 5 guests