from my android application I control the garage door relay.
On the arduino running the web server on the port, the application comes a request to run the relay. Timing is set to 30s of function delay. The problem is that if I wanted to stop the door earlier, then the arduino would not let me go until the 30s had been released. Is there any way I can make another request from the application "cancel" delay?
Thank you for your help in making the correction, although I suppose that there is the unlikely possibility that the problem could be in the power supply or elsewhere.
NOTHING will happen while this function is running.
You KNOW that the (client) user wanted to close the door. So, start the door closing.
Completely independently of what the user wanted to do, the door might be closing. If it is, it might be time to stop that from happening, or it might not.
The blink without delay example shows how to determine that, without using delay().
delay on siren blinking is set to 30s, if I want to stop the drive gate (open / close) for any reason, it is not a drive until the delay 30s. Web client Is not response.
It never will be until you make the client just give directions, like "start the gate opening", "start the gate closing", and let the Arduino handle EVERYTHING else. There will be NO delay()s anywhere in your code.
The opening / closing of the garage works fine, it is a pulse. But the second relay is needed for a siren that runs for example 30s and if I want to stop the gate before it can not until the second relay is delayed.
Use millis() for timing and NOT delay(...). There is a tutorial at the top of the forum that will help you with this. Some people find millis() hard to learn but learning to not use delay(...) is worthwhile in the long run.