Adding and/or to the triggers in scene scripting

It is my understanding that adding more than ONE trigger to a scene will be treated as an OR condition. That is, EITHER trigger will run the scene.

This enhancement may have been proposed earlier (my search for “and or trigger” came up short), but it would be VERY useful to allow for the “AND” condition.

I know there is a CONDITIONAL app, and of course PLEG, but adding the “and/or” toggle to triggers would sure make things easier for us, and would make clear what is going on by default :-).

I wonder if they added this feature to UI7, someone having tested UI7 can answer that question ?

Thanks !

[quote=“kris4ever, post:2, topic:182535”]I wonder if they added this feature to UI7, someone having tested UI7 can answer that question ?

Thanks ![/quote]

I’m running UI7 and can’t find it.

I agree. This seems like a very basic feature that was as left out.

I would think a lot of questions would have to be answered in order for “and” triggers to be implemented.

Do you require that both triggers be on at the same time? Most triggers are momentary events (i.e. a light turning on is a momentary event), so it would be rare if both momentary triggers happened at the same time.

Or do you just say that after both triggers have triggered, run the scene. But what if the first trigger happened two days ago?

You can simulate the “and” by simply checking to see if the other trigger has triggered. Or in other words, you could check to see if the first light is on or not in the second triggers LUA code.

[quote=“aa6vh, post:5, topic:182535”]I would think a lot of questions would have to be answered in order for “and” triggers to be implemented.

Do you require that both triggers be on at the same time? Most triggers are momentary events (i.e. a light turning on is a momentary event), so it would be rare if both momentary triggers happened at the same time.

Or do you just say that after both triggers have triggered, run the scene. But what if the first trigger happened two days ago?

You can simulate the “and” by simply checking to see if the other trigger has triggered. Or in other words, you could check to see if the first light is on or not in the second triggers LUA code.[/quote]

Good point; an example would go a long way helping us struggling :-).

Good point; an example would go a long way helping us struggling :-).

The only additional logic capability I can see in UI7 scenes is the optional use of the in-built Modes. This is effectively an AND but is restricted to Home, Away, Night and Vacation modes. If you need additional logic, you have two choices:

Add Lua code to your scene or triggers. See Conditional Scene Execution for the principle and examples.

Use the Program Logic Event Generator (PLEG) plugin. This may not yet be fully operational under UI7 but I’m sure it will be. See PLEG Basics for an introduction and examples.

[quote=“RexBeckett, post:7, topic:182535”]

Good point; an example would go a long way helping us struggling :-).

The only additional logic capability I can see in UI7 scenes is the optional use of the in-built Modes. This is effectively an AND but is restricted to Home, Away, Night and Vacation modes. If you need additional logic, you have two choices:

Add Lua code to your scene or triggers. See Conditional Scene Execution for the principle and examples.

Use the Program Logic Event Generator (PLEG) plugin. This may not yet be fully operational under UI7 but I’m sure it will be. See PLEG Basics for an introduction and examples.[/quote]

Yep, this is what I’ve done so far, it is just too bad that Vera did not integrate it as a built-in method in UI7, it would be much more “user friendly” ;D

[quote author=kris4ever link=topic=26609.msg189498#msg189498 date=1408712379]

[quote=“RexBeckett, post:7, topic:182535”]

Good point; an example would go a long way helping us struggling :-).

See PLEG Basics for an introduction and examples.[/quote]

This is Vera programming GOLD BTW… it is by far the best thread for coding NOOBIES…