We don't KNOW where the power comes in at?........
The WHITE neutral from all the lights and the motion detector are wired to the LINE WHITE (neutral).....
attach all grounds..........
The BLACK wire is always switched............
switch/detector/lights
The wall switch should be the "first" device after the LINE BLACK (Hot).........then the black wire from the detector..........
The red wire is the "switched" wire from the detector, continues the power to the black wires of #1,2, 3 lights......
So now the switch still controls the power to the lights.....so leave the switch ON at night.........the lights will only come on if motion is detected ......