Automation is typically about "sensors" and "actors" although you will want to allow for manual override and possibly emergency interruption as well. There are many products and packages available to help you achieve aspects of home automation but before you start, ask yourself the following questions:
What are your normal routines and which processes can be automated, it is this and perhaps more importantly the exceptions to daily routines that need to be analysed. A cost/benefit analysis includes not only the prices of the products needed but also the efficacy of the automated solution: 95% good might be acceptable provided the 5% failure rate does not cause total disruption and can be easily manually overridden.
Example: Your PIR sensors cost 50EUR so you use a single sensor to operate a room light and provide intruder detection as part of the alarm system. You accept a 95% detection rate as the light switch is still available.
Other equipment might be more problematic, power and controls for the TV and other media might cause a headache for those in the family not knowing how to override activation or if the remotes have been hidden/replaced.
This is something that grows in importance as you change from what is essentially a hobby to something that forms part of your everyday life. Remember you would not accept not being able to get cash from a bank, neither will other members of your family accept having their routine interrupted while you figure out why your automation script is failing.
It doesn't matter if you are using simple block logic or complicated scripting languages, if you have to code for devices that affect everyday life at home you need to follow good practises:
Questions or comments, please e-mail us at firstname.lastname@example.org