I suggest you update your firmware to 2.02.
https://github.com/dc42/RepRapFirmware/releases/tag/2.02

And remove M98 Pdeployprobe.g and M98 Pretractprobe.g from your homeall.g

In config.g change G31 P500 to G31 P25

And follow the directions here to test and calibrate the probe

https://duet3d.dozuki.com/Wiki/Test_and_calibrate_the_Z_probe