Multiple events for a scene

I wonder if multiple events for a single scene are AND-ed or OR-ed…

For example, if I have a scene to turn On the lights which has 2 events:

  1. sensor is tripped
  2. brightness level is reached

Will the lights turn On if any of the above happens (OR), or only if both of them happen (AND)? I have a suspicion it is the first case, i.e. OR…

But then is it possible to do with Vera what can be done with EZMotion multi-sensor direct association - turn on the lights only when the motion is detected AND the brightness is below specific level (#4 Light Threshold).

I believe events are independent of each other (OR-ed), currently. Like you, I looking forward to the day that MCV adds conditional logic to Vera.

Is it still true that multiple events in a scene are always logically 'OR’d?

I am trying to setup a scene as ‘denix’ described in the original posting.

Is there any alternative way to achieve this?

FYI - I’m runng Vera version 1.0.979

AFAIK, the only alternative way is to code a scene in Lua - there you get all the advanced logic you desire… :slight_smile:

http://wiki.micasaverde.com/index.php/Luup_Scenes_Events

As suggested, I went ahead and successfully coded a Luup scene and combined it with a tripped motion event to turn on a light. The scene only triggers when it is dark and there is motion. The sensor device I’m using is an HSM100 HomeSeer MultiSensor.

Here’s what I did:

  1. Created a scene and added device motion event where tripped = yes
  2. Added a Luup scene with following code:

local lul_light_level=luup.variable_get(“urn:micasaverde-com:serviceId:LightSensor1”,“CurrentLevel”,68)

if ( tonumber (lul_light_level)>0 ) then
return false
end

  1. Set command to turn on light and after 15 min. Off

My feedback to MCV is that basic logic control for governing stock events in a scene is a needed feature. It will extend the usefulness of the product to those needing more complex scenes but are unable to write their own code.

I’d like to do this too…can you explain in more detail what the “68” is?
Is this the device ID? I’d like to add this code to my Vera Scene for my HSM100, but I don’t want to break anything unless I know what Im doing with each variable

thanks!

68 is the device number of the light sensor.

Brian

I agree with Denix - there really needs to be a way to add logical operators to events, since that’s a key component to “smart” home functionality.

There really ought to be a way to add conditions to an event. For example “When the door’s unlocked AND it’s past sunset, turn on the lights.”

So does LUUP programming allow AND-ed commands?

Answered my own question again, looking over the [url=http://wiki.micasaverde.com/index.php/Luup_Scenes_Events]http://wiki.micasaverde.com/index.php/Luup_Scenes_Events[/url] I see that AND is indeed supported.

ditto: conditional logic for nonprogrammers will be a huge step forward in Vera’s usefulness

pgrover516, I think you may have understated it. I might have gone with “gargantuan” or “monumental”. Any way you say it, though, we really, really need this.

I stand corrected CMRancho, you always have a way with words

All I can say is DITTO.

I need the “and” operator and having to learn luup for that is a big jump.

I might try to teach myself luup for more down the road but at the moment I just want to make a scene to turn on a lamp if it’s past sunset and past 8pm. For the time being I guess I’ll just do 8pm and then in the summer change the scene to trigger at sunset…