Check out www.linuxmce.org for how to do this exact thing. I use Z-Wave lighting controllers (not cheap but not too expensive either) combined with computers hooked up to my TVs and an Android app on my tablet allow me to control my home theater, lights, stream movies, music, and everything else that one might possibly think of wanting. One nice thing is that you can put together all these pieces one at a time so it isn't a $50k hit up front to automate everything. If you invest a few hundred in lighting controls then you can do all your lights in all your main areas. Add in some motion detectors and have fully automatic lights. Add a cheap computer for a media station and on and on...