]Maybe
I'm having trouble understanding greenthumbs description of the wiring? there would have to be 2 cables going to the light box for the switch to not be able to control it, right? the siders only hot wired it with the hot wire coming in on one cable and just bypassed the cable to the switch? It's over my head, I'm confused, still curious though
JB[/I].
It all depends on where the power is comming from and weither you switch ground or hot. Yes there could be 2 "cables" in the box. Being the switch is not controlling the light as of now, I'm assuming the power is run into the light junction box, but it is possible that it is not. I've seen stranger things when it comes to wiring.
How I'm thinking it is wired is like this:
We have two "cables" comming into the LIGHT junction box. One of them will be POWER comming from a power source, ie an outlet or even the breaker box. We will call this wire the POWER wire. The other "cable" will be ran to the switch and we will call this the FEED wire. In the LIGHT junction box some of the BLACK wires get connected together ( POWER, Motion sensor input & FEED). The motion sensor may be a blue wire. DO NOT connect the actual light fixture black wire or the motions sensor output to this bundle of wires, only the INPUT of the motion sensor.
The motion sensor OUTPUT and the actual light fixture black wire can be wired together by themselves.
The WHITE wire going to the SWITCH which we are calling the FEED wire should be taped with a piece of black electrical tape @ 6" from the end. This is a universal sign to electricans that a white wire is being used for "HOT" applications. From this point (for ease of explanation) we will now go to the switch. At the switch the BLACK wire of the FEED cable goes to the bottom of the light switch. The white wire (taped with black electrical tape) goes to the top of the switch. Now we go back to the LIGHT junction box.
Be careful here. All the WHITE wires EXCEPT the one with the piece of black electrical tape gets connected together. This is the FEED white wire, the white with black electrical tape, which is actually now a HOT wire comming from the switch. It will serve as power to the relay. Some relays may have a few "taps" while others may have several, this is where we must have the schematic of the relay. The main thing is that the FEED white wire, tapped in black electral tape, goes to one side of the coil "taps" on the relay. The other side of the coil "tap" will go to the neutral (white) wires in the junction box.
Now the relay. THIS could very so finding the pinout of the relay is VERY IMPORTANT. As stated above the coil will get power from the switch and neutral from the white wires. It is CRITICAL that a NO (normal open) set of contacts is selected. On the INPUT side of the relay contact we will need a wire going to the black (hot) side of of the POWER wire. This wire should be HOT all the time regardless if the motion detector is active or the switch is flipped, this side of the NO contact MUST have power ALL the time. Now the other side of the NO (normal open) contact will have one wire pulled from it and will go the the BLACK wire of the actual light fixture. You will also need to wire the output side of the motion detector to this side as well.
Make certain that ALL the "taps" are covered with electrical tape. Depending on the relay and how many "taps" you have for the contacts the unused taps that are NC (normal closed) will be HOT!! If several NO (normal open) "taps are provided they will all become HOT when the switch is flipped. MAKE CERTAIN ALL "TAPS" ARE ELECTRICALLY SHIELDED.
Oh yea don't wire up anything with the power on either, turn off the breaker before you begin.
