Thanks for the update. First, you have raw smarts but you are scattered, not able to describe what you want succinctly - and you seem to have no knowledge of code electrical, this stuff can kill you and burn your house down (with the lemons). You need to learn its pecularities (there are many) before you attempt to homebrew anything like this. Like I say, for smart people, knowledge is cheap. Learn more, work less, rather than the other way 'round.
The home automation field is rapidly evolving, and I'd search it to see if someone has already solved your problem. I bet they have. Then you can install a listed, code legal solution without a lot of work.
If you have to homebrew it, it's straightforward with 2 relays, though, that'll be a lot of wire. It can be done properly with one relay but you really need to know what you're doing with neutrals and grounds, in the Code paradigm.