For this project i ordered a Raspberry Pi model A. The main difference between model A and model B is that model A doesen't have an RJ45 port and 2 usb, also the ram have been lowered to 256 mb. Becase of this downgrades it is more cheaper, but for an automation project it is perfect.
The idea is to set some ports as output, connect those ports to some optocouplers that acts as a switch for the 12V adpter that power the 12V relays that turn on/off the lights.
In the above picture you can see the optocouplers and the relays soldered on an old pc power supply circuit board.
The relay board and the Raspberry board is fitted inside the power supply metal case for protection
The interface that control the relays is called Webiopi which allow you to use HTML codes to create a nice interface for the output ports.
In this image you can see the web interface on the tablet mounted in the wall.
Becase i use webiopi i can switch the light both from any device that can connect to the internet.
I also let the analog switches of the light bulbs, in case something goes wrong with the raspberry board or the relays. Those switches are connected to the relays, so it is possible to turn on the light from the analog switch and turn it off from the touch panel (or any device) and vice versa.
Here is a video with the system in action:
Source code of the HTML file: index.html