Motion detectors are simply devices that detect any motion. Inside they can be effective devices to trigger an alarm. Outside, they can be set off by just about anything From a person snooping around the house, from a bird flying by, from a bee or large insect even a fly at close range. Maybe a squirrel or rabbit. There are computer I/O boards and programs that can do home automation things like you are asking, but first ask yourself what your goal is? What you want to accomplish. What your goal is. And how much is it going to cost?
Try a web search using home+automation or"home automation" with quotes and see what ya get.
Let us know what your goal is and how it turns out.
I'm personally facinated by what promises home automation can offer.