2 wire proximity sensor with magnetic contactor