Have you checked to see if the blue wire is switching using a muiltimeter?
Rather than start swapping parts, it's best to start with the basics, like is the sensor getting the necessary voltage, then see if it's outputting the correct signal before connecting it up.
However, having just ran through the datasheet for that sensor, the resistor on the input side may be a bit high.
Somebody correct me if I'm wrong in the follwing lines.
The datasheet calls for a typical forward voltage of 1.3V (max 1.8V) at 20mA.
Now for a 5V supply, we need a 3.7V drop across the resistor (5 - 1.3), and that limited to 20mA or 0.02A.
So using R=V/I, R = 3.7/0.02, which gives 185ohm, or for Vmax, 160ohm, so something between those two should work.
Also, is that a regulated 5V power supply you're using?
If it's not regulated, it may well be putting out well over 5V...
Another thing I've just noticed, is that sensor may struggle to output 5V to the BOB (it can only supply 6-7mA), so I'd go back to my original suggestion, and check the blue wire, first disconnected from the BOB, then if voltages are OK, connect it to the BOB and see if they remain the same.
An alternative sensor, with far simpler wiring is the PM series of sensors from RS. I used the PMR44P (RS no. 4805231) as the homing switch on my x-axis, or there is another sensor, which came on the spindle of my lathe, but I'd have to go and check it for the part no, but it was still available when I was hunting for the datasheet.