First you have to decide what you want to control it WITH. An IR remote control? An RF remote control? A smart phone and Wi-Fi? A custom in-wall touch screen? Your laptop?
Once you know that you have to assemble the correct hardware to achieve that goal. Only then can you start writing the software, or more likely, software drivers have already been written for the products you're using.
Fins: Still Slamming' His Trunk on pilgrim's Small Weenie - One Trunk at a Time!