Looping time delay? Also programing language for Vera is?

Subject says it all. I since I stumbling onto this section of the board and had a minute to read into threads i see there is a script language used for Vera3? LUUP? Can someone point me in the right direction? I’ve mastered the scenes and if I can take the automation totally into my hands with written scripts, that would put a smile on my face ;D. Also I have a question about delay’s:

I essentially want to run an object (water pump/filter for aquarium) ON for 1 minute and OFF for 5 minutes, infinitly… Only way I can see myself doing it is, by the delay setup menu. There has to be a better way… Any help?

You can do this without Luup programming by making two timers with the Countdown Timer plugin, and attaching scenes to their completion that restart each other indefinitely.

Luup is basically Lua (a programming language that you can read about yourself) with a library that can talk to Vera. Look on wiki.micasaverde.com for the page “Luup Lua extensions”.

I bought a Kindle book on beginning Lua programming. I’m beginning to find out that unless you have plenty of time and desire, or a background in another language, that it may not be worth learning the entire language. While the study is fascinating, the people here are more than willing to help you out with problems you run into with your scripts. When Vera so arrogantly spits your test code back at you (without so much as a courteous explanation of your ignorance!!! :cry: but I digress), this board is an excellent place to have one of the experts look it over for you. :slight_smile:

You can also find MANY examples of code that will do for most of the basic, and lots of advanced, situations you are looking to master.

Thx guys, I’ll research it.

Create two scenes:
Scene 1 turn on x and after 1 minute turn off - Trigger when x turned on

Scene 2 turn off x and after 5 minute turn on - Trigger when x turned off.

Run scene 1. It will run for 1 minute and turn off the pump which triggers scene 2 to leave it off for 5 minutes and then turn the pump on again triggering scene 1 and the cycle then continue.
You minute want a third scene for safety to turn on hourly which would trigger scene on again if your not confident.

Noting the above two results in the loop and to cancel you need to modify or delete one of the science unless you use a virtual switch to kill it.

Have fun.

No programming necessary only 1 scene needed.

[ol][li]Create a Scene[/li]
[li]Set a timer, interval based every 6 minutes[/li]
[li]Add a commad to turn on the pump and turn it off after 1 minute[/li][/ol]

I would question this short a duty cycle … why not 10 minutes every hour. Starting a moter puts the most wear on it.

Before you get into this too deep, consider what will happen when your Vera crashes. Is it acceptable for the pump to run continuously, if the Vera crashes while the pump was on? Or will it burn out the pump? Is it acceptable for the pump to be stopped for hours until you come home from work to fix it, if the Vera crashes while the pump was off? Or will that harm the aquatic life? If this kind of thing is important, then you need to think about failsafe protections, which complicate matters a lot.

Yep there are all kinds of single points of failure … power outage, Vera reboot, Vera hard crash, Z-Wave switch failure, pump failure, plumbing failure (lack of water or to much water in the wrong spot).

Any time you automate things you should do a failure analysis on the overall system.
I would hope that Vera is NOT the weakest link in this system which can only tolerate a single point of failure. I would imaging that the Z-Wave switch to be the least reliable.

Note: If Vera reboots while the pump is on … the pump may stay running an extra “Interval” period of time.

amazing, thanks for all the suggestions. Working on it now!