I have a B+ Pi that was purchased for use as a Christmas light controller. I wired the GPIO pins from the pin to the 16 channel Sainsmart relay successfully, and was able activate the switches. However, there is one thing I can't figure out: how do I power the devices connected to the relay?
Here is a short YouTube tutorial that show how to handle your kind of 'problem' https://m.youtube.com/watch?v=xc1daIb1LVc
In this video the guy is using 12V, which is OK. But if you want to use just AC Mains, be careful or even better, get you professional help. It can really KILL YOU if you don't know what you are doing.