You said the prox switch triggers manually, but does it trigger when you jog the machine to where it should be activated? Maybe the switch is out of adjustment or a piece of scrap is interfering with it.
Does the the hal pin "joint.0.home-sw-in" change when jogging the machine onto and off the prox switch.