This has been the problem. It seemed to move up 15mm, every time it was started.
I think firmware was causing the weird moves. It is the Auto Level version and I was trying to rely on a Z limit switch.
But I think I have got it all working now. Printed my first part and it went well.
(The part is actually a bracket to hold the sensor as the supplied acrylic needed much modification.)
I changed over to Auto Bed levelling. Then use G28 to home the X & Y axes.
Then use G29 to Auto level. Then manual jog the Z down so nozzle is a paper thickness from bed and use that positon as Z offset.
I was also using M114 to get readout of the axes positions, but don't think I need it now with the above procedure.