Scene trigger

Hey guys…

I’m looking for some idea on scene trigger… I mean, without having a wall keypad…

For example, I create a scene that run when I close the front door light between a time frame, to rerun a scene that prepare the house for the evening… this way, if I’m having some friends at home and they are leaving after the original scene, I can retrigger the scene myself…

But I would like to know if it’s possible to create some scene trigger using a kind of counter, for example, if I hit “OFF” 2 time in a row of a light switch, it can trigger scene…

I’m looking for some cool scene trigger idea you already have…

PLEG has a multi click operator. So if you have a switch that has instant status you can trigger based on two ON or OFFS within a specified period:

Input:
SwitchOn

Condition:
MultiOn. SwitchOn @ 2 < 00:05

The condition MultiOn would trigger when SwitchOn became true twice within 5 seconds.

And that’s not possible with switch with no Instant Status ?

The following LUA code is what I use to detect multiple clicks on a scene button that occur within 10 seconds of each other. Scenes are sometimes slow to react, so I found 10 seconds to be necessary.

function ResetFRIndicator(stuff)
  sFRIndicator = "0"
end
if (sFRIndicator == "1") then
  luup.call_action("urn:upnp-org:serviceId:SwitchPower1","SetTarget",{ newTargetValue="1" },21)
else
  sFRIndicator = "1"
  luup.call_timer("ResetFRIndicator", 1, "10", "", "")
end

What this scene does is turn on a second light if the scene is activated twice. (The scene itself takes care of the first light.)

If you do not have instant status … Vera will not see the switch has changed until it polls … Upto 10 minutes later … And then it can’t tell how many or if you cycled the switch since the last poll.