Checking for follow up trigger inside a rule

I have some ikea on/off switches I am using to control my Somfy shades and have two rules, one triggered by the on to open the shades and one by the off to close the shades. I would like to check for any other button press after initiating an open or close to allow me to stop the shades at a particular spot. What would be the best way of achieving this? I'm expecting I would only want to check for this second press for about 5-10 seconds.

Thanks,
Simon

Are both the open/close and stop initiated by a button? If so, if you're using either Button Controller or Rule Machine with a "Button Device" trigger, you could just assign the "stop" action to that particular button event. Both apps will let you configure separate sets of actions for each kind of button event. (If by chance you have a "Button" trigger in RM instead, it's doable but you'd just need a separate rule.)

This seems preferable to me to trying to capture the button event in the actions somehow. That would be difficult unless you're able to use a "Wait for event" in your actions, but that would get tricky with a button device and a timeout (easier with most other devices given that the event would usually cause a change to a specific condition that you could check for).

If none of the above sounds right and you show what you have set up now, I'm sure someone can come up with more specific ideas.

1 Like

Thanks @bertabcd1234, that's given me an idea with the wait for event.

I am using an Ikea On/Off switch, which only has two buttons. I wanted to press the On button to initiate the open command on the shades, but within the rule wait to see if either the On or Off buttons were pressed, but only within say 10 seconds, roughly the time it takes for the shades to open. Pressing either of these buttons within the 10 seconds should initiate a stop command to stop the blinds from opening. Otherwise, if past the 10 seconds, either button should initiate whatever command it is normally intended to trigger, e.g. pressing the Off button 15 seconds after the On should trigger a close command, not the stop.

I'll look at the wait for option, but I also noticed last night that it can also detect a hold and release, so that may also be an option.

I'll post back with some more details, either of the solution I put in place or my current setup if I need further assistance.

Thanks,
Simon

I went down the separate rules route and got it working nicely, thanks for the tips @bertabcd1234. I've posted about this in more detail in a separate post:

Simon

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.