Delay between commands?

I don’t know if this is due to my security system, or the plugin, but if I do the following from a lua script (pseudo code):

  • Disarm the system (it is currently armed stay)
  • Wait for the system status to show “Disarmed”
  • Request arm state armed (i.e. arm away)

With the goal of changing from an armed stay state to an armed away state, it doesn’t work - the system is disarmed, but it never re-arms. I have to wait for several seconds between when the system signals the Vera that it is “Disarmed” and when I issue the Request arm state command before it will work. What I’ve ended up doing is using the call_delay function to repeatedly call a function every second that tries to arm the system until it goes into the ExitDelay state.

Is this delay due to something in the plugin, or is the Vera simply issuing commands to quickly for my system to process? It seems I can punch in commands on the keypad pretty much instantly and have them accepted, but it is quite possible that even with waiting for the system status to change the Vera is still to fast.

If it is the vera simply being too fast, is there any way I can use the call_delay function (or similar) with a delay of less than a full second to minimize the lag? I’m thinking try every half second until it works sounds reasonable. Thanks!

I seem to recall reading somewhere on this forum about needing to space out certain programming commands so the panel has time to react.

Have you tried it with a short delay after each key command is sent ?

Feel free to share you lua code for others to see /comment on…

You need at least 2 seconds between each command in the entire DSC (even with multiple partition)