We use solid state magnetic limit switches on our doors to provide durable, long lasting door position sensing.
The magnet is installed on the door which rides up and down between the rails. The sensors are mounted such that they are triggered (closed) which sends a signal to the controller to indicate that the door is opened or closed.
Reed Sensor Datasheet
Magnetic Actuator Datasheet