There is a Raspberry Pi project for house automation called FEHM. http://fhem.de/fhem.html
You can include your own functions, modules, systems and it's also god for study the basic things of a home automation system. If you plan to build your own system.
FHEM (TM) is a GPL'd perl server for house automation. It is used to
automate some common tasks in the household like switching lamps /
shutters / heating / etc. and to log events like temperature /
humidity / power consumption.
The program runs as a server, you can control it via web or smartphone
frontends, telnet or TCP/IP directly.
In order to use FHEM you'll need a 24/7 server (Fritz!Box, NAS, RPi,
PC, MacMini, etc) with a perl interpreter and some attached hardware
like the CUL, FHZ1300PC, etc. to access the actors and sensors. See
the "Supported hardware" section below.
It is pronounced without the h, like in feminine.