Page 1 of 1

Very Short Delay (1/2 second or less) within an Action Group

PostPosted: Sun Jan 19, 2020 2:26 pm
by eric
I want to turn on a relay at the beginning of an action group and then 1/4 or 1/2 second later turn it off.

The minimum time increment throughout Indigo seems to be 1 whole second and this is too long.

If there were a way to call up a simple delay in milliseconds between the steps of an action group this would probably do what I need to, between the on and the off commands, but I can't see to find a way.

Any tips for this?

And i know of the availability of momentary relay hardware (and this is plan B) but I am trying to keep this hardware for other reasons and accomplish this is software.

Thanks.

Re: Very Short Delay (1/2 second or less) within an Action G

PostPosted: Sun Jan 19, 2020 3:26 pm
by jay (support)
You'll need to use a Python script:

Code: Select all
import time
time.sleep(.5)
#perform actions here, like executing an action group or something

Re: Very Short Delay (1/2 second or less) within an Action G

PostPosted: Sun Jan 19, 2020 6:19 pm
by eric
Thanks.

If I wanted to include this as one step of an action group, how would I do that, such that the execution of the action waits until the delay is over before continuing?

Re: Very Short Delay (1/2 second or less) within an Action G

PostPosted: Sun Jan 19, 2020 7:37 pm
by FlyingDiver
eric wrote:
If I wanted to include this as one step of an action group, how would I do that, such that the execution of the action waits until the delay is over before continuing?


You can't. All actions in an action group will be performed simultaneously, unless delayed using the time specification in the action group. More or less.

The easiest thing to do is just use a script for all of it, turning the device on and off in the script, with the delay between. See https://wiki.indigodomo.com/doku.php?id ... g_tutorial

Code: Select all
import time
indigo.device.turnOn(theRelayID)
time.sleep(.25)
indigo.device.turnOff(theRelayID)