I've got a couple of sets of 3 way switches in my house that aren't functioning properly. Basically, one switch has to be in the "up" position for the other switch to control the light. In the set pictured, the metal box is the existing/untouched switch 1, the blue is a new box and relocated switch 2. If switch 1 is down, the light is dead and switch 2 has no effect. If switch 1 is up, switch 2 can turn the light on an off. Aside from the taped neutrals with no wire nut and overall sloppy install of switch 1, what is wrong with the wire placement?
Rather than melt your brain with white, black, red blah blah, let's call travelers yellow. Here's how a 3-way circuit actually works.
Golly, that's simple. Align the two switches onto the same yellow wire, light lights. Easy peasy.
But of course, they don't make cables in yellow-yellow-white. They only make them in black-white-red; and; depending on the other needs of the circuit, the two travelers might be any combination of colors. That's what colored electrical tape is for. $5 will get you a 5-pack of 5 colors.
Identify the travelers. Travelers are
- always in the same cable (so might the third wire, but it won't be that way on both ends).
- On the brass switch screws if the circuit is wired correctly
Assuming your lower switch is untouched, black and red are your travelers in this circuit. I would remark them with yellow on both ends.
Then, it's dog simple: yellow wires to brass screws, remaining wire to remaining screw and Bob's your uncle.
3-way switches don't take neutral wires, so the white wire in the blue box is definitely not a neutral. It must be re-marked a color. (any color but gray or green, but it's preferable to mark it for its function: black always-hot, red switched-hot).
If the metal box/switch in untouched, then the 2 travelers, black & red, connected to the two brass screws on that switch should go to the other switch in the blue box and be connected to the same two brass screws. They're not. You've got white and red to those two screws. Try swapping the white and black wires. If all works right tape the travelers at each location with some yellow tape or someone on this site will yell at you.
The blacked terminal screw denotes the common on the switch, which goes to the live feed in on one, and the live out to the light on the other. The two wires that go between the two switched terminals are called 'travelers' and since you've got a black and a red on one, those same two wires should be at the two switched terminal on the other switch.
Image from here