Need Help Triggering a Scene with 2 requirements

I have my alarm panel connected (Vista).
I have exterior cameras.
I have the day or night app.
I have a scene that turns on all exterior lights

I want to trigger the exterior light scene when the alarm is tripped ONLY if it is nighttime. I know how to do it based on one variable(day/night OR alarm), but I don’t know how to do it with 2 variables.

I use the “combination switch” plugin for something similar. It is a virtual switch that lets you define input conditions based on the state of other switches or devices. When a specified number of those conditions have been met, the switch turns on (you can use that to trigger a scene). Not sure if it works with the night or day plugin.

Basically the standard vera logic does not allow these “AND” conditions. But like @intveltr said, there are ways:

  1. Use Lua Code in your scene or in the trigger. (Search for examples in this forum.)
  2. Use the Plugin “Combination Switch”. (MiOS Apps)
  3. Use the Plugin “Program Logic Event Generator”. (MiOS Apps)

I’d personally recommend option 3.

Use alarm trigger as input.
In luup you do

if luup.is_night() then
return true
else
return false
end

If the trigger occurs during day time the luup will stop the scene.

Or a simpler version of:

if luup.is_night() then
  return true
else
  return false
end

Is:

return luup.is_night()

But I also recommend PLEG … Using the Day or Night plugin allows you to test your logic as well as bias what you consider day or night to be darker or lighter.

Thank you for the input guys. I have installed PLEG and will not toy with that for a bit to see if I can get it working.