Multiple Trigger Expression question

I have this ponder i have this setup for my bedrom scene controller. Maybe someone would have done it better or smarter, but i am a newb so i do it as good as i know how ^^, or rather dont know how. Do feel free to give me pointers on how to do it better i would only appreciate it.

With the below setup i will by flicking the switch 1 - 3 times control different things.
1 click - bedroom lights
2 click - bathroom + path.
3 click entire upper floor lights.
and in reverse i will turn all off.

However… it dont quite work as i imagined.
at first click it turns on bedroom second path and bathroom 3rd click all lights :slight_smile:
I thought that it would be absolute. i click 3 times and it only turn on all lights. not activate all 3 actions.

_TrigBigBedroom - the bedroom scene controller, momentary.
tBBedroomWindow_On - state is on
tUpperPath_On - state of path before bathroom is on
tBathroom_On - state is on
tVirtualSwitch1_On - state is on
tVirtualSwitch2_On - state is on

cBBedroom_CNT1 - TrigBigBedroom @ 1<0:02
cBBedroom_CNT2 - TrigBigBedroom @ 2<0:05
cBBedroom_CNT3 - TrigBigBedroom @ 3<0:05
cBBedroom_CNT1_Off - tBBedroomWindow_On and TrigBigBedroom @ 1<0:02
cBBedroom_CNT2_Off - tVirtualSwitcht1_On and TrigBigBedroom @ 2<0:05
cBBedroom_CNT3_Off - tVirtualSwitch2_On and TrigBigBedroom @ 3<0:05


cBBedroom_CNT1_On - Turn on window lights in bedroom
cBBedroom_CNT2_On - Turn on bathroom lights, and path and virtual switch 1.
cBBedroom_CNT3_On - Turn on all lights on upper floor. And turn on Virtual Switch 2.
cBBedroom_CNT1_Off - Turn off window lights in bedroom
cBBedroom_CNT2_Off - Turn off bathroom lights, and Path. And turning off virtual switch 2.
cBBedroom_CNT3_Off - Turn off all lights on upper floor. And turning off virtual switch 2.

How do i make it wait the full 5 seconds on the 2nd and 3rd push before it decides which to run?

The button presses should set a state for the desired action.
The action for the button should be to start a 5 second self triggered timer.

At the end of 5 seconds do an action based on the state.

But do you really want to wait 5 seconds before you do something ?

I have 5sec at the moment more to test it out, i dont know how fast the presses can be registered without “kinks”.
But my first trials i had a 3sec timer and 3 presses was doable in 3secs.

The idea for me was to do something with my bedroom scene controller button.

I have a fibar 1x3kw breaker with the 2nd input as scene controller. At the moment i use that to control a Aeontec breaker (window lights) in the bedroom.

I was thinking what if i turn on bathroom and pathway lights with 2 presses, for say 10mins. and i built from that and figured what if i add 3 presses all lights,(when i get up in the morning to get a mini breakfast before work.

5secs is a long time but would maybe feel like 3 secs.
3 secs is doable i think, all i was worrying about was possible problems registering the keypresses in the vera lite device.

I just gave you the example as i was “experimenting” tbh it is above my current “know how”, i am an old $bash scripter so i think my mind will align in time. But i am telling you, 6+ years away from anything as such, focusing on hardware rather then software. will make you stop thinking like a machine :slight_smile:

Anyhow as i do have your attention, really great plugins.
I have bought licenses of vera alert and pleg, really well spent bucks.

And i appreciate it that you take time to answer questions not absolutely directly about your plugins, but also related to such things as this.


[quote author=RichardTSchaefer link=topic=26289.msg186592#msg186592 date=1406982374]
The button presses should set a state for the desired action.
The action for the button should be to start a 5 second self triggered timer.

At the end of 5 seconds do an action based on the state.

Dear RTS,
I’m trying to achieve something similar - my wife hates that lights and shades closes automatically at a certain time in the evening and suggested to have a MASTER Switch to execute various scenes. I have set a momentary switch on Aeontec device with instant status update and plan to have 3 basic scenes:

  1. A short press to (in less then a second) execute open or close of our living floor (depending on day / night + house open/ close status)
  2. Double short press (in less then 2 seconds) opens in the morning, shades in the bedrooms floor (as a “wake up” procedure for my kids…)
  3. Long press (over 2 seconds) to open or close entire house with A/C Etc.

Its clear a timer is requested to hold execution until presses are done. Could you please elaborate on how the presses should set the state for the desired scene - is this done by “state” - could you elaborate on the syntax.
I guess the action is depended on the state - please elaborate.

Many thanks.