Timer that can be interrupted, now using expire

I would recommend using blocklies as described here but of course the same can be achieved with DSL rules. The reference (which is currently in the writing) shows that you should have everything you need for the timers (of course also creating timers)

image

and you can use the following blocks to persist a rule-global-variable that could keep track of you current movement state.

I can’t help you exactly because it is not clear to me what the 5 seconds are for. Do you want to stop the motor after 5 seconds? In that case use a “after 5 second do with timer” block. If you need to cancel a timer, use the cancel block and you can also use the checks to know if a timer is still running and then cancel it (e.g. you probably want to do that if you want to stop the rollershutter).

To sum up, there is most likely everything there that you need only that do not exactly know what you want.