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:
sensor is tripped
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).
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:
Created a scene and added device motion event where tripped = yes
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
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
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 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…
Best Home Automation shopping experience. Shop at Ezlo!