Function description:

When the motor is moving in opening direction, the tension-weight travels up until it hits a maximum -> After that, the door moves up.

( "Open" end-stop switch is placed on the door. No fancy approach needed here. )

When the motor is moving in closing direction, the door travels down until it hits the doorstep or anything else -> After that, the tension-weight moves down.

( "Closed" end-stop switch is placed under the weight and NOT on the door! )

This method eliminates the need for calibration.

See the timelapse videos for a visual explanation. ( Boring Alert! )

The relay is coupled as shown on the hand-drawn schematic. ( sorry for the simplicity ).

Triggering one of the relays will pass the DC voltage to the motor with different polarity. Easy peasy.

If both relays are triggered nothing happens. Both motor terminals will be grounded.