3 Simple Ways to
Share What You Make

With Instructables you can share what you make with the world — and tap into an ever-growing community of creative experts.

PhotosPhotos

Share one or more photos of a project, recipe, or whatever you've made, quickly and easily.

Step by StepStep-By-Step

Share your step-by-step photos with text instructions of what you made so others can do it too!

VideoVideo

Share your how-to video. You'll need your embed code from a video site such as YouTube.

Home 9000 - The ULTIMATE Doorbell

Step 8The Software (Applescript) & More

The Software (Applescript) & More
I set up a separate Apple account with a unique name (account) for the doorbell to be used exclusively for FaceTime calls. I also added in the following command in Apple's Terminal application so my FaceTime would answer a specific caller ID phone number.

To allow a single mobile, open terminal and type:
defaults write com.apple.FaceTime AutoAcceptInvitesFrom -array-add +15205551212
(where the number on the end is your iPhone) It will activate facetime, even if its not open.


APPLESCRIPT CODE:

-- Starts Facetime Session
open location "facetime://15205551212"
delay 5
-- simulate pressing the Enter key
tell application "System Events"
keystroke return
-- Check to see if Facetime is active
tell application "System Events" to set theCount to the count of (processes whose name is "Facetime")
if theCount = 0 then
do shell script "sleep 1"
else
tell application "FaceTime" to activate
-- starts automator script to take picture and email it
tell application "Take Picture and E-mail" to launch
tell application "Take Picture and E-mail" to activate

delay 5
-- Starts Video capture
tell application "QuickTime Player 7"
try
activate
new movie recording
start first recording
do shell script "sleep 10"

set status to true

repeat until status = false
-- sets how long facetime will ring your phone (30 secs)
delay 45 -- if call is active wait 60 seconds before rechecking
--3600 is 1 hour, 1800 =1/2 hour, 60 =1 min, 300 =5 mins
--add 300 (5 mins) ahead/behind starting

-- Check to see if call is still active

tell application "FaceTime" to activate
tell application "System Events" to tell process "FaceTime"
if name of front window contains "not available" then
do shell script "sleep 1"
set status to false

else

-- Check to see if call is still active

tell application "FaceTime" to activate
tell application "System Events" to tell process "FaceTime"
if name of front window contains "with" then
set status to true
do shell script "sleep 5"

-- Check to see if call is still active

else
-- Quit Facetime / video recording if call is not active
tell application "System Events" to tell process "FaceTime"
if name of front window contains "facetime" then
set status to false
tell application "FaceTime" to quit
do shell script "sleep 1"
tell application "QuickTime Player 7"
stop first recording
tell application "QuickTime Player 7"
quit
end tell
end tell
end if
end tell
end if
end tell
end if
end tell
end repeat
end try
end tell
end if
end tell
end
end
end



-------------------------------------------------------------------
Please note This code:

-- starts automator script to take picture and email it
tell application "Take Picture and E-mail" to launch
tell application "Take Picture and E-mail" to activate


This activates a Apple AUTOMATOR script to take a photocapture of the video feed, and email it to me
and start a video capture or the doorbell camera / audio and save it as a .mov file (poor man's DVR)

Here is a great Tutorial how to do this by TUAW's Cory Bohon


« Previous StepDownload PDFView All StepsNext Step »

Pro

Get More Out of Instructables

Already have an Account?

close

All Steps Viewing
View all steps of an Instructable on the same page when you're a Pro Member.

Upgrade to Pro today!
71
Followers
24
Author:macgeek(Zoltar Speaks / Macgeek.com)