Long running scenes and running scene management?

Hello,

Anyone know how you can view active running scenes and/or kill previously running scenes through luup?

I’ve started using Vera to control my pool and spa. I’ve created scenes to throw valves between pool and spa, starting the pump and or the heater. For example, I have a scene that moves the valves to proper location and turns on the spa and heater, delays an hour, then turns everything off. I also have another scene that does the daily pool maintenance, delays for four hours and turns everything off.

My problem is if I’m towards the end of the maintenance scene (say last 10 minutes), and someone starts the spa scene, how can I prevent the first scene from turning everything off in 10 minutes? I figure if I could view running scenes and kill them before starting another, I could solve this problem.

Thanks.

You can’t view running scenes(you might be able to derive) and you can’t stop a running scene. Scenes are “event driven scripts”. Once the scene starts, it will run to completion. That is, except when it doesn’t.

The scenes run in the context of the LUUP engine(Vera process) and if the process restarts for any number of common and frequent reasons, everything gets cleared from memory. So running scenes go no further, they simply cease to exist.

For this reason, it is not advisable to have scenes run for more than a few seconds, minutes at most, without very special consideration. The better way to do things is to use two scenes for everything. You schedule an On scene and you schedule a separate Off scene. But, scheduled scenes still won’t give you the exception condition that you desire, at least not without custom Lua code.

In your case, you’re wanting to dependencies, additional conditional logic, into when the Off action will occur. Multicondition scenes like these are best handled using the PLEG plugin. PLEG not only handles multiconditional scenes with aplomb, it also “remembers its state” across restarts so long running events aren’t lost, as with conventional scenes.

You need the Program Logic Event Generator(PLEG).