I'm working on automating the lights in my house using a raspberry pi to control the main overhead light in four rooms. I don't want to give up the ability to use a physical light switch to turn the light on or off either so I'm going to wire a double-pole, double-throw setup where one switch is the relay controlled by the raspberry pi and the other switch is a normal looking switch in the wall. I've done all the electronics work and have a working prototype on a mock-up board but now I'm at the point where I need to install it physically. My plan is to have a single line of 14/2 go from the main panel into a box similar to this. Once inside the box the live, neutral and ground will all go to separate bus bars. The ground will tie all grounds together and the return will tie all returns together. The live will feed: a small power brick that will provide 5V/2A power to the raspberry pi, a USB hub for the raspberry pi and the 5v control side of a 4 channel relay bank similar to what you see here. The live will also feed the four inputs on the relay bank's 120V power side. Each of the relays has 2 poles and so the outgoing 14/3 will have the red and black lines connected to those which will eventually end at the wall switch. My thoughts and concerns are about the safety of this design. I've read about sub panels and rules and regulations regarding tying them into the main panel but I don't think I actually need more than just the plain, generic empty box. I'm not trying to add new lines to my service and don't require more breakers. I'm just taking one line outbound from the main panel and redirecting it through a bank of relays before going to the lights. No greater load is being added. Each relay will be powering only one overhead light. The main bedroom light may eventually be switched out for a ceiling fan/light combination but that's it. There will be no new lights or outlets or anything added. So can I get away with what I'm planning or do I need an actual sub panel with breakers installed and all?