I originally had a ceiling light with a smoke detector in the ceiling. After removing it, I discovered two black, two white, two red and one ground wire in a single box.
When I turn on the switch, only one set of black and white is live (tested with a voltage pen). The two red are always live.
I tried to wire the new light to the set of black and white that will go live when the switch is on but the new light will not turn on when the light bulb is attached. Can someone help me understand this setup? Thanks.