I can't see a way to implement a timeout in fhem. For example, I am controlling a device (in my case a garage door) and I send the close command. I expect it to get to the closed position but if it doesn't after a period of time I want to flag an error.
I can create an "at" device
define a_timeout at +00:01:00 set timeout_error on
But if the move command succeeds then I need to cancel the "at". I know about the "delete" command but in my case there are multiple ways for the move to be initiated and if I issue the delete command and the "at" hasn't yet been created then it throws an error.
What I need is something like
IF (ifdef a_timeout) (delete a_timeout)
I also see there is a "sleep" and "cancel" command but this has the same problem.
I feel I must be missing something but have read the cmd ref from start to end without finding anything suitable.
Can anyone point me in the right direction or provide me with some examples of code using timeouts?
Many thanks.