How do you intend to control the many relays? Individual lines to every relay will sum up into a huge number of wires. Better were a bus system with addressable nodes (I2C, CAN, Ethernet...), that also can be extended at any time. Line drivers are almost required, for secure signal transmission, so that I2C can not be used across a house.
I have a few options:
Individual ethernet shields per light switch, which i control from main respberry pi via firmata and C# programming
One main arduino mega and ethernet shield, connected to each relay module via ethernet shield from raspberry pi via firmata. As it is only sending small pulse with low current the voltage drop will be minimal.
I'm not happy with your installation plans. What looks good for a breadboard model, is not normally applicable in a larger area.
Can you elaborate, Obviously this solutiojn would be soldered onto a perfboard. I have tested latching the circuit through ethernet lines running through my house already and I was successful in both sending the message through the lines and sending the message through firmata.
Don't forget fuses, or you risk failure of your entire installation on a local problem.
Where would fuses be added to the circuit?
I'd suggest RS485 from the master out to the remotes, with the remotes having intelligence to receive a serial message and manage the relays from there. Way less wiring, each remote can be powered locally. Remotes can then report status too if you want to set up sensors, or have light switches that can be turned on manually at the remotes sites, temperature, etc.
Can make a little custom card with equivalent of a Promini, RS485 chip (MAX488 perhaps), wallwart for power, relay driver (shift register like TPIC6B595) and that can also control other things, some sensors, etc.
This is all a bit above my head...But it sounds similar to an idea I had, which I am not sure on its quality until I receive parts in the mail. But I brought a whole bunch of enc28j60 and arduino nano. One option i had was to firmata control the nanos in each wall cavity, that way I would run the cat 6 into the internet hub rather than an arduino mega and program my raspberry pi to connect to each specific nano based on the command/.
Using an opto would provide high reliability and could handle long cable runs. However, you'll need a separate power supply. Yeah, there'll be a practical limit to how many relays you would want to control like this due to the increased wiring and digital outputs required.
I like the circuit and it doesnt seem that much harder than the current one. Would you recommend implementing something like this? What do you mean on practical limit to how many relays I want to control like this?
From our original plan, it does look like I need to use another line for grounding.
So in a 3 gang switch, I would need 1 x hot, 1 x adapter ground, 1 x arduino ground, 2 pins x 3 = 9 lines, its a shame cat 6 only has 8. Maybe i can send arduino things through cat 6 and external power supply through phone cable?
Thank you for your time