As I am a crestron programmer by trade I decided to go that route when I wanted to bring automation into my house. It is not cheap and not readily available to the general public as Crestron has cracked down on thier software and it is not available to anyone but dealers anymore. There are companies out there now that provide automation software which will run on pc's such as Life|ware, Dean Roddey's CQC, Housebot by Meedio, and a few others. Each has varying degrees of integration with other products. With my htpc I am using a third party pluggin which provides a Serial I/O via TCP for my crestron processor to talk to my htpc. It is actually a great pluggin and provides full access to the htpc and can even start process directly.
I'm using HomeSeer software along with an Applied Digital Ocelot controller, the Applied Digital SECU-16IR infrared unit, some X10 light modules, and a few other things. Crestron is a little too expensive for my tastes. Plus, I like to develop my own hardware and software solutions for home automation tasks.