Choose style:

Author Topic: Conditional without being a trigger in the Rules Engine  (Read 5465 times)

0 Members and 1 Guest are viewing this topic.

Offline malachi

  • Newbie
  • Posts: 2
  • Thanks: 0
  • Registered : 27/04/2015
    YearsYearsYearsYearsYearsYearsYearsYearsYearsYears
Conditional without being a trigger in the Rules Engine
« on: May 04, 2015, 05:46:15 pm »
This may be the wrong place to post this, but would it be possible to add the ability to make some conditionals based on the states of sensors, but not triggered by that sensor.

Offline fillibar

  • Backer
  • *
  • Posts: 2060
  • Thanks: 4
  • Registered : 02/08/2013
    YearsYearsYearsYearsYearsYearsYearsYearsYearsYearsYearsYears
Re: Conditional without being a trigger in the Rules Engine
« Reply #1 on: May 04, 2015, 06:09:13 pm »
Not entirely sure what you mean.
Something like "turn on the light IF motion triggered AND IF the light is off"?  That can be done now, within the limits of the Rules and what devices/sensors they handle.

If not, can you provide more detail? Maybe it can already do it... maybe it is something that Securifi has mentioned they are working on or maybe it is something new.
Almond 3 mesh handling the home.

Offline malachi

  • Newbie
  • Posts: 2
  • Thanks: 0
  • Registered : 27/04/2015
    YearsYearsYearsYearsYearsYearsYearsYearsYearsYears
Re: Conditional without being a trigger in the Rules Engine
« Reply #2 on: May 05, 2015, 06:14:10 pm »
My problem arose when I tried to set up 3 key fobs, 1 for each in the house. The key fob has 3 programmable buttons, so in order to maximize it's usability, I attempted to set up 2 different functions on the same button. I wanted it so that if button 1 is pressed and the door is locked, the door will unlock, and conversely if button 1 is pressed and the door is unlocked, the door will lock.

so
if ($doorlocked=true and $keyfob1=button1)
{
then $doorlocked=false
}
and
if ($doorlocked=false and $keyfob1=button1)
{
then $doorlocked=true
}
repeated for $keyfob2 and $keyfob3

Logically this makes sense and when you press the button 1 on the key fob, it will change the state of the key lock to the opposite of what it was. The problem is that I the lock is not just a conditional, it is also a trigger, so the it looks more like this:

if (($keyfob1 changes state) or ($doorlocked changes state))
then
{
     if ($doorlocked=true and $keyfob1=button1)
     {
     then $doorlocked=false
     }
}
so when the lock changes state, all rules with the lock as a trigger are checked and run, if applicable, (not necessarily all rules. the order in which the devices are added appears to have something to do with which rules are run). With multiple Key Fobs, if the last button pressed on any of the other key fobs (assuming you're using the first key fob added) was button 1, when it gets to the rules for that key fob the conditions will be met and the rule executed thus undoing the first rule (door locks and then unlocks, or vice versa).

I'd like the ability to set conditionals that are not also triggers.

if ($keyfob1 changes state)
then
{
     if ($doorlocked=true and $keyfob1=button1)
     {
     then $doorlocked=false
     }
}


I tried to do something similar with a fan plugged into a peanut plug which is zigbee instead of z wave like the door lock (I point out because I think the speed of transfer causes this problem).

if ($keyfob1 changes state or $peanut changes state)
then
{
     if ($peanut=true and $keyfob1=button1)
     {
     then $peanut=false
     }
}
if ($keyfob1 changes state or $peanut changes state)
then
{
     if ($peanut=false and $keyfob1=button1)
     {
     then $peanut=true
     }
}

the result is the peanut rapidly turns off and on until I press a different button on the key fob. Adding a delay only slows down how rapidly the peanut turns off and on.

Offline fillibar

  • Backer
  • *
  • Posts: 2060
  • Thanks: 4
  • Registered : 02/08/2013
    YearsYearsYearsYearsYearsYearsYearsYearsYearsYearsYearsYears
Re: Conditional without being a trigger in the Rules Engine
« Reply #3 on: May 05, 2015, 07:29:13 pm »
Thank you. It might have been just me but seeing it written out made it pretty clear for me. Yes, hopefully that is something Securifi could do... but I am willing to bet it is a ways out at best.
Almond 3 mesh handling the home.

Offline k1m

  • Backer
  • *
  • Posts: 33
  • Thanks: 0
  • Registered : 28/08/2013
    YearsYearsYearsYearsYearsYearsYearsYearsYearsYearsYearsYears
Re: Conditional without being a trigger in the Rules Engine
« Reply #4 on: May 06, 2015, 06:49:15 pm »
I hope this feature is implemented as well, every time I have put the key fob into a rule, it has become an absolute that isn't overide-able. I.e. I use the fob to lock the doors and then all unlock attempts after get overridden almost immediately after the unlock function is used, like when I use the app to unlock the door, or when I use a pin to unlock. Each time, the lock reverts right back to a "locked" status.

 

Page created in 0.039 seconds with 16 queries.

bottleneck