I pulled the wires today; see attached picture. Though you cannot see it in the pic, there is an embedded label next to the black/white pair, it says "INPUT". The label next to the black/blue pair says "OUTPUT".
Curious...after your wiring fix, how does the motion sensor behave; does it still operate like motion sensor and turn on when you enter the area?