Automation to tell which direction I'm going through the laundry room

My laundry room sits between the garage and the rest of the house, and is the main way we tend to come and go. I want to have the automation do different things depending on the order the doors open.

This is what I have so far, and it was a little finicky but I thought it was working as long as I didn't test back and forth too fast, but when my wife came home it didn't turn on the light. Any ideas on how to improve reliability or maybe I'm being stupid about it and there's a better way to do this?

Have you tried turning on all logging for the rule to see what happens when you wife comes home?

In my case it would drop the waf level because she would feel followed by my toys.

On the serious side, take a look at the Direction Alerter app from BPTWorld.

It works for me, but I have Motion Sensors, not Contact Sensors.

Note: I just saw it can be programmed with Contact Sensors, or a mix of both.

How would I go about installing that? It says the developer migrated it to EventEngine and then stopped maintaining all their apps. When I try to import the zip file it says it is missing files or something

One potential issue i'm seeing is that you don't have any timeouts on your waits, so if someone enters from one side and exits back out the same side, the rule is going to sit there and wait for the other contact to open, which may cause issues depending on the next . If you add a timeout, you'll need to add a condition after the wait so the timeout doesn't make the action happen. e.g.:
Wait for event: Inner Garage Door Contact Open - timeout 00:01:00
IF Inner Garage Door Contact Open THEN Off: Hue...

Also, to ensure one full set of actions processes completely, you can set the rule's private boolean to false at the start and back to true at the end (and add to required expression). That way when one door opens, the other one opening won't re-trigger the rule. With the timeouts and conditions in place as described above, if someone enters from one side and exits the same side, the waits will timeout and the rule will finish and be ready for the next full cycle.

2 Likes

Try bptworld-Hubitat-old/Apps/Direction Alerter at master ยท loverso-hubitat/bptworld-Hubitat-old ยท GitHub

Can you explain a little deeper how the conditions are supposed to look? You're exactly right, and it hasn't been triggering every time if someone doesn't go all the way through. I don't know if a condition of if the same door is open after the timeout would work to exit the rule as we don't leave the doors open (we use the laundry room as a sort of airlock to keep the cats from getting into the garage). Is there a way to cancel the rule if the door is opened again at all during the timeout or after?

Oh also that bit about the private boolean, I understand what a boolean is, but how would that tie in to the rest?

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