One-button garage - help

Thanks for the reply.
I try to be clearer.
The garage is operated by a single button, which if pressed

  • When closed, opens the garage.
  • When open it closes it.
  • From the state of opening or closing it stops it.
    so:
    if during opening or closing I press the button, it stops.
    the following action on the door closing or opening button (reverses the previous command).

I would like to open and close the garage and monitor the status (at least to know that it is open) and for this purpose I have put a sensor that signals me that it is not closed (stat / TESTLED / POWER1 = OFF). The garage is controlled via the button connected in parallel to Wemos on POWER2 (cmnd / TESTLED / POWER2 = ON) activated temporarily.

It takes 10 seconds to fully open or close (full stroke of the garage). It could be useful to know that if it is stopped in an intermediate position and 10 seconds after the closing command, the sensor does not detect the closed position, I must give a further closing command.

Another step is remote management via telegram.

Thanks for your reply and help.