Page 1 of 1
'Turn off' after >60 seconds fails to work, but works <= 60 secs
Posted: Monday 27 February 2017 21:55
by Dandoggie
My goal is to have a switch turn off 30 minutes after I turn it on. The Blockly automation I show here works up to 60 seconds (and perhaps slightly more), but doesn't work when set for 120 seconds or higher.
What's going on...is a max number of seconds a known limitation of this command?

- bathroom fan timer.PNG (8.99 KiB) Viewed 2050 times
Re: 'Turn off' after >60 seconds fails to work, but works <= 60 secs
Posted: Monday 27 February 2017 22:01
by Lusch
I guess since this script runs every 2 minutes it validates the bathroom fan = on statement as true again so it startes from scratch with counting?
Re: 'Turn off' after >60 seconds fails to work, but works <= 60 secs
Posted: Monday 27 February 2017 22:04
by Dandoggie
Hmm. I don't know enough to say that's not the case. But it doesn't seem the script runs every two minutes...only that it waits two minutes to complete the "set" command. Right?
Also, that doesn't explain why it works when the timer is set to less than 60 seconds.
Re: 'Turn off' after >60 seconds fails to work, but works <= 60 secs
Posted: Monday 27 February 2017 22:22
by tozzke
setting the off delay @ 'Bathroom Fan' @ switches to 2700 seconds should do the trick
Re: 'Turn off' after >60 seconds fails to work, but works <= 60 secs
Posted: Monday 27 February 2017 22:26
by Dandoggie
tozzke wrote:setting the off delay @ 'Bathroom Fan' @ switches to 2700 seconds should do the trick
I'll try that. I considered doing it previously, but I was concerned it wouldn't allow me to manually turn the fan off when I wanted, preempting the "off delay" if you will.
Edit: It works! Thanks for the solution. And it turns out my fears were unfounded; I am able to turn off through Domoticz control panel whenever I wish.
Re: 'Turn off' after >60 seconds fails to work, but works <= 60 secs
Posted: Tuesday 07 November 2017 19:00
by nixalsschrott
Dandoggie wrote: ↑Monday 27 February 2017 21:55
What's going on...is a max number of seconds a known limitation of this command?
bathroom fan timer.PNG
Hi all,
I only want to trick some led for 5 seconds. My if do for block is only showing minutes instead of seconds. Where to find the shown block or is it possible to adjust?
Kind regards matty
Re: 'Turn off' after >60 seconds fails to work, but works <= 60 secs
Posted: Wednesday 08 November 2017 14:10
by Slinkos
nixalsschrott wrote: ↑Tuesday 07 November 2017 19:00
Dandoggie wrote: ↑Monday 27 February 2017 21:55
What's going on...is a max number of seconds a known limitation of this command?
bathroom fan timer.PNG
Hi all,
I only want to trick some led for 5 seconds. My if do for block is only showing minutes instead of seconds. Where to find the shown block or is it possible to adjust?
Kind regards matty
You could do it with LUA. Or just set it off right away, and put a off delay on your switch. But then the delay is always active on that LED, so that might not work for you.
Re: 'Turn off' after >60 seconds fails to work, but works <= 60 secs
Posted: Wednesday 08 November 2017 14:14
by Slinkos
I just thought of another way, Like this: