Mathieu Bonte has written a great Instructable in which he creates a model house and then wires up a Raspberry Pi to various lamps to light the model. In the Instructable, he takes you through wiring it all up, via relays so you can transfer it to a ‘real’ house eventually if you so wish, and then developing the software using the Pi, MySQL and the Flask web server library. It’s an assignment for school and it’s a great proof-of-concept. Take a look here.