Need help figuring out how to delay a reset on reaction
-
@tamorgen reading thru this twice (and I may go back again and slow down even more) it sounds like there's no "link" between your rulesets. ie, the conditions for
AWAY
is being met even though the conditions forGUEST
are, too.What does your
AWAY
ruleset look like?Here is my
GUEST from AWAY
ruleset (I don't have the luxury of surfacing the individual user code so I'm stuck being a bit more generic, ie "lock unlocked". AsHOME
requires my presence, this has been doing the trick.) My only issue: sometimes the lock is slow to report it's state so I've asked my authorized guests to enter their code, count to 10, the open the door. That let's Hubitat Safety Monitor to disarm.Here is my
Change to AWAY
for comparison sake.@toggledbits gave me very sound advise early on as I was prone to making my rulesets "do too much" in addition to waaaaaay overthinking/overcomplicating things.
Instead of trying to make a ruleset that determines presence AND tries to set mode, just have it determine presence. Have one for your immediate family and one for your guests. Then use the TRUE FALSE state of them in your mode rules. (Saves you countless hours later, too, when you add/remove people from either presence ruleset.)
-
said in Need help figuring out how to delay a reset on reaction:
@gwp1 said in Need help figuring out how to delay a reset on reaction:
@toggledbits gave me very sound advise early on as I was prone to making my rulesets "do too much" in addition to waaaaaay overthinking/overcomplicating things.
Instead of trying to make a ruleset that determines presence AND tries to set mode, just have it determine presence. Have one for your immediate family and one for your guests. Then use the TRUE FALSE state of them in your mode rules. (Saves you countless hours later, too, when you add/remove people from either presence ruleset.)
That is essentially what I'm doing. The "Phones Home" doesn't set the mode, except to reset it. I suppose I could make the reset a separate rule, but I'm not sure how that would solve my problem.
And it's 100% possible I'm overthinking this, or I'm in so deep, that I'm not seeing the obvious. Many of these rules were built on the original Reactor in Vera, before converting to MSR. I had to work with the limitations of Vera at the time, and of course the plug-ins that stopped working quite regularly.
-
said in Need help figuring out how to delay a reset on reaction:
@gwp1 said in Need help figuring out how to delay a reset on reaction:
@toggledbits gave me very sound advise early on as I was prone to making my rulesets "do too much" in addition to waaaaaay overthinking/overcomplicating things.
Instead of trying to make a ruleset that determines presence AND tries to set mode, just have it determine presence. Have one for your immediate family and one for your guests. Then use the TRUE FALSE state of them in your mode rules. (Saves you countless hours later, too, when you add/remove people from either presence ruleset.)
That is essentially what I'm doing. The "Phones Home" doesn't set the mode, except to reset it. I suppose I could make the reset a separate rule, but I'm not sure how that would solve my problem.
And it's 100% possible I'm overthinking this, or I'm in so deep, that I'm not seeing the obvious. Many of these rules were built on the original Reactor in Vera, before converting to MSR. I had to work with the limitations of Vera at the time, and of course the plug-ins that stopped working quite regularly.
@tamorgen You're falling into the same pitfalls I did. Notice my Mode SETs don't have resets. No need. The next appropriate rule SETs so there's no reason to reset. Any resets (like from GUEST back to AWAY or VACA) are done via their own SET rulesets.
I don't want to reset... I want to move on to another Mode - even if that mode happens to be the last mode I was in. Make sense?
One thing I have done: every time I change mode I write it to an expression called
previous_mode
. This let's me do things like "if the previous mode was AWAY, return to AWAY - but if the previous mode was VACA, return to VAC" -- again, these being sep SET rulesets and not RESETs.Every time I tried to make use of RESETs I got buried as I had too many "what ifs" in my
Conditions
. -
@gwp1 said in Need help figuring out how to delay a reset on reaction:
@tamorgen You're falling into the same pitfalls I did. Notice my Mode SETs don't have resets. No need. The next appropriate rule SETs so there's no reason to reset. Any resets (like from GUEST back to AWAY or VACA) are done via their own SET rulesets.
Okay, I think I've made progress thanks to your suggestion.
I took the thought of creating a new rule for "Go to Away Mode", and removed the reset from "Phones Home".
In the new "Go to Away Mode" rule, I added a condition that the mode needs to "Phones Home" rule needs to be sustained for 60 seconds.
This at least makes it specific, as to what my rules do.
Next I tried to toggle the house mode in Home Assistant, and well, it immediately changed to "Home", which is different than what I expected.
So now, the "Go To Home Mode" rule is being tripped. I added a very short 15 second "must be sustained" condition for the "Phones Home" rule state in that rule, and now it lets me change the drop down to Guest Mode. Unfortunately, 15 seconds later, i changes to Home mode, then it changes to Away mode. I feel like this is progress, but I need to figure out why it's not staying in Guest mode
-
@gwp1 said in Need help figuring out how to delay a reset on reaction:
@tamorgen You're falling into the same pitfalls I did. Notice my Mode SETs don't have resets. No need. The next appropriate rule SETs so there's no reason to reset. Any resets (like from GUEST back to AWAY or VACA) are done via their own SET rulesets.
Okay, I think I've made progress thanks to your suggestion.
I took the thought of creating a new rule for "Go to Away Mode", and removed the reset from "Phones Home".
In the new "Go to Away Mode" rule, I added a condition that the mode needs to "Phones Home" rule needs to be sustained for 60 seconds.
This at least makes it specific, as to what my rules do.
Next I tried to toggle the house mode in Home Assistant, and well, it immediately changed to "Home", which is different than what I expected.
So now, the "Go To Home Mode" rule is being tripped. I added a very short 15 second "must be sustained" condition for the "Phones Home" rule state in that rule, and now it lets me change the drop down to Guest Mode. Unfortunately, 15 seconds later, i changes to Home mode, then it changes to Away mode. I feel like this is progress, but I need to figure out why it's not staying in Guest mode
@tamorgen said in Need help figuring out how to delay a reset on reaction:
In the new "Go to Away Mode" rule, I added a condition that the mode needs to "Phones Home" rule needs to be sustained for 60 seconds.
Doesn't the result of that mean the system waits for someone to be home for 60 seconds before flipping mode to HOME?
-
Test appears to be successful. I was able to use one of the guest users PINs for the alarm panel, and the system went into and stayed in Guest mode. Thanks to @gwp1 for reminding me to keep it simple and get rid of the reset.
@tamorgen said in Need help figuring out how to delay a reset on reaction:
Thanks to @gwp1 for reminding me to keep it simple
The thanks goes to @toggledbits who has long endured my questions on things only to have him say "wow... pare this down to smaller bits". Essentially, don't try to do things with "one big beautiful ruleset".
-
@tamorgen said in Need help figuring out how to delay a reset on reaction:
In the new "Go to Away Mode" rule, I added a condition that the mode needs to "Phones Home" rule needs to be sustained for 60 seconds.
Doesn't the result of that mean the system waits for someone to be home for 60 seconds before flipping mode to HOME?
@gwp1, no only away. The Home mode is only 15 seconds.
However, since the "Phones Home" rule is a geofence rule (based upon the HA companion app), it detects the phone being there before I'm actually in the house. The Home mode does not disarm the alarm system, that is still manually done at the keypad. The only delay would be lights automatically turning on, or blinds opening during the day.
-
@tamorgen said in Need help figuring out how to delay a reset on reaction:
Thanks to @gwp1 for reminding me to keep it simple
The thanks goes to @toggledbits who has long endured my questions on things only to have him say "wow... pare this down to smaller bits". Essentially, don't try to do things with "one big beautiful ruleset".
@gwp1 said in Need help figuring out how to delay a reset on reaction:
Essentially, don't try to do things with "one big beautiful ruleset"
Seriously. It can't be done, but sometimes I swear I've paired it down into so many individual functions, I forget how it all works together. When I'm troubleshooting, I have to go back and look at the rules, and think "what was I trying to do here again?"
-
@gwp1 said in Need help figuring out how to delay a reset on reaction:
Essentially, don't try to do things with "one big beautiful ruleset"
Seriously. It can't be done, but sometimes I swear I've paired it down into so many individual functions, I forget how it all works together. When I'm troubleshooting, I have to go back and look at the rules, and think "what was I trying to do here again?"
said in Need help figuring out how to delay a reset on reaction:
@gwp1 said in Need help figuring out how to delay a reset on reaction:
Essentially, don't try to do things with "one big beautiful ruleset"
Seriously. It can't be done in one, but sometimes I swear I've paired it down into so many individual functions, I forget how it all works together. When I'm troubleshooting, I have to go back and look at the rules, and think "what was I trying to do here again?"
-
@gwp1 said in Need help figuring out how to delay a reset on reaction:
Essentially, don't try to do things with "one big beautiful ruleset"
Seriously. It can't be done, but sometimes I swear I've paired it down into so many individual functions, I forget how it all works together. When I'm troubleshooting, I have to go back and look at the rules, and think "what was I trying to do here again?"
@tamorgen said in Need help figuring out how to delay a reset on reaction:
I have to go back and look at the rules, and think "what was I trying to do here again?"
I have the same problem, and I wrote the darned thing. Use the comments. They really help.
-
Also, for me a virtual device instead of checking for rule states seems to be less prone to errors. So I have one for home status, guests, party etc and the rules are much easier to write.
@therealdb I use those as well. As you see in my AWAY rule there's a catch there using a virtual switch for my calendar integration. If a calendar entry has a specific keyword it turns the switch on. If the switch is on, AWAY knows not to fire.... VACA has it covered.
@toggledbits beat me to it: comments, comments, comments. I've lost too many years off my life trying to remember why this rule does what it does and how.