I got rid of the “sleep” and added the luup.call_delay but couldn’t get it to work. I eventually found out that you cannot pass two variables with the delay function (besides the amount of time to delay). I needed to pass two variables.
There are 4 discreet actions I needed to do, each with two variables and each action repeats with one different variable value after a specified time. In the interest of keeping the code short I wanted to pass both variables to the same function. I guess no can do.
I created 4 functions with 4 variables defined internal to each action. I just pass one variable with the delay command.
It works, but it’s not efficient.
Any idea where the best “primer” for LUA might reside on the web? I hate to keep asking for help with basic LUA things.