To home it, you could pass the cable through a hole or slot in a plate or a printed part at the top of the printer, and have a knot or collet on the cable below that. Then either use a microswitch to detect when the knot pushes against the plate, or use stall detection.