Securifi Community Forum

Securifi Products => Almond+ => Topic started by: penright on December 05, 2016, 03:01:35 pm

Title: Action to turn on switch for x minutes then off.
Post by: penright on December 05, 2016, 03:01:35 pm
The subject pretty much tells it all. I would like to on a trigger turn a switch (light) on for 15 minutes then it will automatically turn off.
Title: Re: Action to turn on switch for x minutes then off.
Post by: Ashok on December 05, 2016, 04:10:36 pm
@ penright,

The subject pretty much tells it all. I would like to on a trigger turn a switch (light) on for 15 minutes then it will automatically turn off.


We may have to create two rules accordingly to achieve that.
Title: Re: Action to turn on switch for x minutes then off.
Post by: grouter on December 05, 2016, 04:18:33 pm
The subject pretty much tells it all. I would like to on a trigger turn a switch (light) on for 15 minutes then it will automatically turn off.

I'd like to see this, too. The current 5 minute limitation is far too low.
Title: Re: Action to turn on switch for x minutes then off.
Post by: cswilly on December 06, 2016, 07:26:30 am
@ penright,

We may have to create two rules accordingly to achieve that.

@Ashok What is the 2nd rule you are thinking of?

My solution sucks. The 2nd rule is "if no motion, wait 300 s, then light off". Lots of limitations and misfeatures using this rule.

I would like the 2nd rule to be "if no motion for 300 s, then light off". Is this possible?



Title: Re: Action to turn on switch for x minutes then off.
Post by: Ashok on December 06, 2016, 07:54:00 am
@ cswilly,

Try to create a rule something like this "If trigger happened then switch on light, wait 300 seconds switch off light". However, we got your point and as of now it is limited only to 5 minutes.
Title: Re: Action to turn on switch for x minutes then off.
Post by: Ohiomedic on December 06, 2016, 01:03:45 pm
@ cswilly,

Try to create a rule something like this "If trigger happened then switch on light, wait 300 seconds switch off light". However, we got your point and as of now it is limited only to 5 minutes.
What if he made a rule "If trigger happened then switch on light, wait 300 seconds switch on light, wait 300 seconds switch on light, wait 300 seconds switch on light, wait 300 seconds switch off light".

I know it looks odd, and I haven't tried it, but wouldn't that keep the light on for 15 minutes?
Title: Re: Action to turn on switch for x minutes then off.
Post by: fillibar on December 06, 2016, 02:18:45 pm
From my experience with a light and the delays, that should work. Great idea for a workaround!
Title: Re: Action to turn on switch for x minutes then off.
Post by: grouter on December 06, 2016, 03:34:17 pm
What if he made a rule "If trigger happened then switch on light, wait 300 seconds switch on light, wait 300 seconds switch on light, wait 300 seconds switch on light, wait 300 seconds switch off light".

I know it looks odd, and I haven't tried it, but wouldn't that keep the light on for 15 minutes?

Awesome idea!

I just tested a bit and it looks like it's only waiting for the 1st switch on wait + the switch off wait--the switch on waits "in the middle" aren't used.

That now makes a 10-minute wait possible instead of 5. I'll take it! But hopefully one day a Securifi developer will undertake making that 5 minute limit something like 60 or 120...
Title: Re: Action to turn on switch for x minutes then off.
Post by: penright on December 07, 2016, 09:20:13 am
Sorry, new to Almond+, but if I go to rule, then click on "then" at the top, for any of my switchs I only see choices "on", "off", and "toggle". Where am I off at? Besides as my wife would say, "in my mind".  ;D
Title: Re: Action to turn on switch for x minutes then off.
Post by: fillibar on December 07, 2016, 01:22:09 pm
The idea is that you would select the ON twice or more times. For the second and following ones you would set the max 4min 59sec delay. Then finish it with an OFF. Attached is an example I made. This, in theory, would keep the light on for ~10min before turning it off.
Title: Re: Action to turn on switch for x minutes then off.
Post by: Ohiomedic on December 07, 2016, 01:29:45 pm
Sorry, new to Almond+, but if I go to rule, then click on "then" at the top, for any of my switchs I only see choices "on", "off", and "toggle". Where am I off at? Besides as my wife would say, "in my mind".  ;D
One you click one of the choices it gets added into the row at the top. At the top a delay is added next to the action and you set it their.
https://1drv.ms/i/s!Ag4RKxanHZpkgcVqQqzHdmARka2d7g
Title: Re: Action to turn on switch for x minutes then off.
Post by: penright on December 07, 2016, 03:24:05 pm
One you click one of the choices it gets added into the row at the top. At the top a delay is added next to the action and you set it their.
https://1drv.ms/i/s!Ag4RKxanHZpkgcVqQqzHdmARka2d7g
That was the part I missed. This feature is kind of cool. If it was not restricted to  5 minutes then it would be exactly what I need. Turn it on, delay x minutes, then off.
I wonder is the time limited to 5 minutes because of the internal timer or that is just what the UI guy stuck on the wheel? The question is somewhat off subject, just would tell me how hard it will be to change.

Not sure if this needs to be on a different thread, but it would be cool in the "if" section "between" would support "sunset" to "sunrise". I just create two rules for now.

Has there been any discussion on if an action was overridden by a switch, what to do. This would be only an issue where a device is controlling a switch. I have a device controlling light 1, that use to  have a switch 1. So when I wire it up, the light can be controlled by the device or the switch. This creates a circuit compared to a 3-way. So a command is sent to device to turn on light and light is on. Then switch is flipped and light is off. Maybe there needs to be a drop down option that would let you set delay and a true/false to force the condition if the between time is still true. The Almond would know it needed to command the device by seeing the switch being set to off. Currently Almond is not reading my multi-function device when the switch is flipped different than the last command. Not sure if this is an issue with binary switches. Here is my post on a different thread https://forum.securifi.com/index.php/topic,5132.0.html (https://forum.securifi.com/index.php/topic,5132.0.html)
Title: Re: Action to turn on switch for x minutes then off.
Post by: penright on April 10, 2017, 06:31:37 pm
Not sure if this needs to be on a different thread, but it would be cool in the "if" section "between" would support "sunset" to "sunrise". I just create two rules for now
I know it been awhile, I had to put home automation on hold till I got my old house sold. So, now it is sold, I got my Gocontrol installed for my overhead garage door.
So I came back to this thread and started the rule so when the door opens (check) and it is between sunset and sunrise .... Ooops. Wait, I know I have done that before, oh it was using two rules, one to turn on and one to turn off.
First, I checked to see if there has been any new releases for Almond+, I did not see any since December. I am on that version.
So now I am stuck. If I create a chain that on the door opens fires a on + on (wait 5) + on (wait 5) + on (wait 5) + off. I have to do that in one rule. How can I protect/make sure it is dark?
Title: Re: Action to turn on switch for x minutes then off.
Post by: fillibar on April 11, 2017, 07:17:55 am
If you have a light sensor that is easy, just include it as part of the IF.
Otherwise you could add a between time, where the times are when it is relatively dark. I say relatively because of sunset/sunrise times changing. Unfortunately the Sunset and Sunrise settings in the weather option do not allow >< functions.
Title: Re: Action to turn on switch for x minutes then off.
Post by: penright on April 11, 2017, 09:06:52 am
If you have a light sensor that is easy, just include it as part of the IF.
No sensor yet. Guess I could check out that option.

Otherwise you could add a between time, where the times are when it is relatively dark. I say relatively because of sunset/sunrise times changing. Unfortunately the Sunset and Sunrise settings in the weather option do not allow >< functions.

What about  this thought .... I have two devices that are controlled by two different rules. One at sunset and the other at sunrise to turn on and off them.  One device controls my under cabinet lights, the other an outlet that I used for Christmas lights. Could I include one of them in my if?

Clarification, when I have an "on" action with delay. Is the delay before or after the action? (Example Sunrise/Sunset has a before/after option.)
Title: Re: Action to turn on switch for x minutes then off.
Post by: fillibar on April 11, 2017, 09:35:53 am
The Sunset/Sunrise before/after affects the timing of it. Ex:
If sunrise is 6am and you set 30min before, that would trigger at 5:౩0am.

Delays for THEN actions happen before the action. So if you set a 5min delay before turning the light on, they will not turn on until 5min after the trigger. But, as a side note, you cannot STOP that action from happening (this is regardless of delays, just most noticeable). Once a rule is triggered it will perform all actions of that rule and you cannot interrupt that.

But... Your idea of using the other devices would work. I am trying to get away from recommending workarounds like that because many people do not have others. In any case... Assuming you have two Rules for that lighting. Something like:
1) IF sunset and light off THEN light on
2) IF sunrise and light on THEN light off

You could add that light into the other's rule as an IF it is on... Then that would give you the sunset to sunrise effect, if there is nothing else that might alter it.
Title: Re: Action to turn on switch for x minutes then off.
Post by: penright on April 12, 2017, 07:59:38 am
I tried it last night and the rule works, but it is not fired as expected. I started this thread to ask about it. https://forum.securifi.com/index.php/topic,5544.0.html (https://forum.securifi.com/index.php/topic,5544.0.html)
Title: Re: Action to turn on switch for x minutes then off.
Post by: fillibar on April 12, 2017, 09:35:43 am
Makes sense to separate the topics. So at least now you have a workaround for what you want done.
Title: Re: Action to turn on switch for x minutes then off.
Post by: mbirnbaum on April 16, 2017, 09:46:49 pm
Just added Monoprice PIR (multifunction) sensor.  It has lots of options and allows me to easily turn off after set period of time.  But wait, there's more built in: temp, ambient light and more.   They've been put on sale for $22 including shipping lately.  Worth a try.

NOTE:  I've found you must remove this device (paper clip in little hole on back, 10 times rapidly), before you can add.
Title: Re: Action to turn on switch for x minutes then off.
Post by: fillibar on April 17, 2017, 07:55:40 am
I have two of those (and the main brand as well) and the do work quite well. I did not have to perform a remove on any of mine, but it does happen with almost any device now and then (maybe the manufacturer used it for testing?).