Laser head not homing and get position not reading 0

This lengthy discussion around Ruida homing setup may sort things out:

You won’t have miswired switches, but getting the polarity correct requires the same attention.