Scene with logical AND triggers

So it has been well known that the biggest shortfall for Vera Scenes is the inability to use AND with conditionals. For example if the window and the front door are both open at the same time trigger a light to turn on. As far as I know this cannot be done using scenes in vera. However I was creating a scene using the iPhone app today and noticed a new option as soon as I selected two triggers. In the app below the triggers it now shows “This scene should be played: if at least one trigger is tripped or only if all triggers are tripped at the same time” as options. I tried it out and it actually works. I am now able to use a logical AND with scene triggers vs only being able to use OR. The catch is that this option only seems to appear when using the native iOS app. I don’t get this option at all when using the web interface. I even created two identical scenes using the iOS app and selected the AND option and in the other I used the OR option. When I looked at the scenes using the web interface on my computer they look identical even though one is an OR and the other is an AND. Maybe I’m missing something here but it now looks like we have a way of doing a logical AND with scenes but we must do it in the iOS app.

Clearly you have not read about conditional LUA or PLEG.

Hi Richard,

Thanks for your response. I should have clarified. I meant a shortfall of default vera setups without having to use Lua or PLEG. Right now I am using AltUI’s workflows to do a lot of my automation which is great but sometimes I want to do a simple AND trigger and it is nice to use the built in scene engine since its quick and easy and in my experience has been more reliable. When I was brand new to Vera I was baffled that this couldn’t be done in the default scene editor and I had to install PLEG (which for a newbie seems intimidating at first) or worse have to write LUA code.

+1 Tsviper. Worked like a charm in a test scene I created.

Me too :slight_smile: :slight_smile: :slight_smile:

Does the ANDed condition still work when the phone is off?

It seems more than a little strange that they would add such an important feature, but only add it to the IOS app interface.

It would seem less strange that the ANDing logic was being performed on the IOS device. Not unlike scripting with Tasker.

It work with my Iphone turned Off :slight_smile:

In my case, I triggered a Don Away and Thea Away scene (as if we had left) and the test scene with the notification and logic worked perfect. I also turned off my phone and it still worked as well. I could not find in the UI what setting was set.

Vera Customer Service told me, it is coming soon for Ui. :slight_smile:

Thank you for testing and letting me know.

I saw this capability mentioned on the forum many months ago, unfortunately I can’t find that post right now. I asked the poster about it, but I was not able to determine to my satisfaction whether the functionality was located in the app or in Vera. Now I know.

Vera development is a mess. Why would they build this feature into Vera and then, for months, expose it only in the IOS app?

If it’s in Vera, then it must somehow be coded into the scene JSON description, which can be retrieved and examined via an HTTP scenes request.

My Vera is not on the newest firmware, but he one from a few months ago…

I just updated the Android app and no such option appears…adding the second device trigger automatically says “OR” between the triggers. so, is it Firmware related or did they really ONLY update the IOS app and not the Andriod?

Can anyone tell me what firmware they are running on? Anyone have this option with Android?

See the FW edition below. I am used the iOS iPhone app to create the AND logic but I cannot see where that logic is stored in the UI.

If the Vera UI has not been updated to show this, then you won’t see it. However, if it works as described, it must be stored in Vera. The following request documented here, Luup Requests: Scenes, should show it.

http://ip_address:3480/data_request?id=scene&action=list&scene=5

…with the appropriate scene number substituted.

See the FW edition below. I am used the iOS iPhone app to create the AND logic but I cannot see where that logic is stored in the UI.[/quote]

Okay, I’m running 1.7.919, you are on 947…do it may have something to do with that. My wife does have iOS device, I’ll see if it is there in hers. If not,I may update firmware to see if that works.

Interesting though

[quote=“akbooer, post:15, topic:196815”]If the Vera UI has not been updated to show this, then you won’t see it. However, if it works as described, it must be stored in Vera. The following request documented here, Luup Requests: Scenes, should show it.

http://ip_address:3480/data_request?id=scene&action=list&scene=5

…with the appropriate scene number substituted.[/quote]

Thanks akbooer. Here is what this shows me when I change the or/and option on the iOS app for the same scene.

[code]{ “id”: 56, “name”: “Test And Operator”, “triggers_operator”: “AND”, “paused”: 0, “groups”: [ { “delay”: 0, “actions”: [ { “device”: “52”, “service”: “urn:intvelt-com:serviceId:HWPush1”, “action”: “SendMessage”, “arguments”: [ { “name”: “Msg”, “value”: “Test” } ] } ] } ], “triggers”: [ { “name”: “”, “enabled”: 1, “template”: “3”, “device”: “23”, “arguments”: [ { “id”: 0, “value”: “” } ] }, { “name”: “”, “enabled”: 1, “template”: “3”, “device”: “36”, “arguments”: [ { “id”: 0, “value”: “” } ] } ], “timers”: [ ], “users”: “”, “modeStatus”: “0”, “Timestamp”: 1501453964, “room”: 0 }

{ “id”: 56, “name”: “Test And Operator”, “triggers_operator”: “OR”, “paused”: 0, “groups”: [ { “delay”: 0, “actions”: [ { “device”: “52”, “service”: “urn:intvelt-com:serviceId:HWPush1”, “action”: “SendMessage”, “arguments”: [ { “name”: “Msg”, “value”: “Test” } ] } ] } ], “triggers”: [ { “name”: “”, “enabled”: 1, “template”: “3”, “device”: “23”, “arguments”: [ { “id”: 0, “value”: “” } ] }, { “name”: “”, “enabled”: 1, “template”: “3”, “device”: “36”, “arguments”: [ { “id”: 0, “value”: “” } ] } ], “timers”: [ ], “users”: “”, “modeStatus”: “0”, “Timestamp”: 1501454045, “room”: 0 }[/code]

Looks like they may have added the “triggers_operator” value just not to the web UI yet.

[quote=“Tsviper, post:17, topic:196815”][quote=“akbooer, post:15, topic:196815”]If the Vera UI has not been updated to show this, then you won’t see it. However, if it works as described, it must be stored in Vera. The following request documented here, Luup Requests: Scenes, should show it.

http://ip_address:3480/data_request?id=scene&action=list&scene=5

…with the appropriate scene number substituted.[/quote]

Thanks akbooer. Here is what this shows me when I change the or/and option on the iOS app for the same scene.

[code]{ “id”: 56, “name”: “Test And Operator”, “triggers_operator”: “AND”, “paused”: 0, “groups”: [ { “delay”: 0, “actions”: [ { “device”: “52”, “service”: “urn:intvelt-com:serviceId:HWPush1”, “action”: “SendMessage”, “arguments”: [ { “name”: “Msg”, “value”: “Test” } ] } ] } ], “triggers”: [ { “name”: “”, “enabled”: 1, “template”: “3”, “device”: “23”, “arguments”: [ { “id”: 0, “value”: “” } ] }, { “name”: “”, “enabled”: 1, “template”: “3”, “device”: “36”, “arguments”: [ { “id”: 0, “value”: “” } ] } ], “timers”: [ ], “users”: “”, “modeStatus”: “0”, “Timestamp”: 1501453964, “room”: 0 }

{ “id”: 56, “name”: “Test And Operator”, “triggers_operator”: “OR”, “paused”: 0, “groups”: [ { “delay”: 0, “actions”: [ { “device”: “52”, “service”: “urn:intvelt-com:serviceId:HWPush1”, “action”: “SendMessage”, “arguments”: [ { “name”: “Msg”, “value”: “Test” } ] } ] } ], “triggers”: [ { “name”: “”, “enabled”: 1, “template”: “3”, “device”: “23”, “arguments”: [ { “id”: 0, “value”: “” } ] }, { “name”: “”, “enabled”: 1, “template”: “3”, “device”: “36”, “arguments”: [ { “id”: 0, “value”: “” } ] } ], “timers”: [ ], “users”: “”, “modeStatus”: “0”, “Timestamp”: 1501454045, “room”: 0 }[/code]

Looks like they may have added the “triggers_operator” value just not to the web UI yet.[/quote]

I see it in my scenes also. Thanks akbooer. Another +1.

Ooh, that’s cool. Thought it had to be there. I’ll let @amg0 know so perhaps he can include this is the AltUI interface.

I wonder if it ANDs the schedules as well.
I can’t remember, can you add two schedules to a scene ?