



How I did it:
april.py is the main machine vision script. It has two rectangles -- one corresponding to the door, and one corresponding to everything else. It will trigger if there is more than some amount of motion at the door, and less than some amount of motion everywhere else. The second rectangle is there so the script won't react to e.g. lighting changes. I don't know if the second rectangle is required, but I do know that I had zero false positives or negatives with this algorithm over a fairly long period of time. To use this script, there are a few things to modify:
dothat.sh runs on the machine in my living room. It runs the machine vision program, waits 2 seconds from the event (to allow my wife to come in), begins video recording, and then notifies the other machines (the IP here needs to be changed).
doit.sh runs on the machine in my bedroom. It plays the greeting, and then record video of my wife looking for me.
The gst-launch command is a beast. All it does is record video for half an hour (so I had proof). You'll need to mess with it to get the right audio/video device, and on some machines, you may need to disable audio. See the examples in the scripts. I had help with this one from the gstreamer IRC channel.
All of this runs under Ubuntu GNU/Linux, and isn't really designed to be used by anyone not computer savvy.