I was thinking about this as a diversion from working on something else and I think the easiest way to send a (non-blocking) delayed
actiongroup.execute() command is to run it in its own thread. I tested this approach with a 5 second delay and it works well. Presumably it will work just as well with your 6300 second delay, but I didn't test that.
- Code: Select all
import threading
import time
def actionGroupDelay(action_id, seconds):
indigo.activePlugin.sleep(seconds)
indigo.actionGroup.execute(action_id)
indigo.server.log(u"Do some stuff")
# ========================= Execute Delayed Action ==========================
t = threading.Thread(target=actionGroupDelay, args=[1450401770, 5]) # Replace with your action id, time in seconds
t.start()
# =============================================================================
indigo.server.log(u"Do some more stuff")
When I run this code, "Do some more stuff" appears in the log instantly, and the action group is executed after 5 seconds. There are other ways to do this, but I think this is probably the most straightforward.