Auto Lock door - only if light is off

so, i have been working this one out and i have run into road blocks.

My position:

IF back door unlocked for 30 minutes and back porch light off, then lock
IF back porch light on, then wait for t his to turn off then lock in the 30 minutes.

trying this one-- i will report back

I expect your second rule will work as describe in the first scenario.

I would create a separate rule for the 2nd scenario:

Trigger: Porch Light turns off and stays that way for 0:30:00
Action: Lock: Back Door Lock

Let me clarify better. It’s a little muddy.

If back door unlocked and stays that way for 30 minutes
Lock back door
But
The back porch light is on
Wait for back porch light to turn off then
Proceed with waiting 30 minutes before back door locks.

I’m new to this process and I tend to wayyyyy over think it.

You say

And then say

Sounds like you are wanting to wait 30 minutes regardless of the light being on or off. Not sure, by this description, how the porch light being on or off matters.

Probably old fashioned, but I will do it this way:

Triggers:
Light turns changed or door is locked/unlocked.

Rule:
Cancel delayed actions
If light is off AND door is unlocked THEN lock door delayed 30:00 (cancelable)
END IF

IF we have a gathering on the back porch, we will have the light on a night--- so i was trying it with light first and then adding motion later--- I was trying to simplify it and understand it before i got to complex. We have a poll and we are out there day and night...
In reality the end result would be as follows.

Back door unlocked and stays 30 minutes
lock back door
IF
Motion is present OR back porch light is on.
Delay lock until
no motion (20 minutes ) or back porch light is off.

I cant figure out how to make it work--- i have the it wrong and not sure if i need to delete and start fresh.

BTW there's cool little app in HPM called "auto lock." Worth checking out. Does what I think you need,

Any other way i did it, it did not work.. So
i changed it to the above.
I think it will work until a light is turn on or motion is active, then it will stale...

i had that --- am going to try it again--- i did not think it had everything i needed.. with motion but I'm checking now- TY

I wasn't thinking motion so much as the ability to enable and disable auto-locking based on a switch. But looking closer you may be right.

ok - remember why i moved to rule machine--- the app has all i need as you mentioned above but when I add the switch as a delay, i get an error. i have never gotten past that so i moved to rule machine.
Got the error to clear--- im testing this

1 Like

Not that I want to deprive you of the feeling of accomplishment when you figure it all out in RM.

1 Like

The problem with that last one is I think you want both motion sensors to be inactive not just one of them or you will lock yourself out. Also it will end up locking the back door right away if the lights are off to begin with and you unlock the door.

Think I'd make 2 rules here the main rule (using my devices but you get the idea):

So if the door is unlocked or there is motion or the light is turned on we trigger. That will get the actions going, including resetting any delays already running.

Then I put in a short delay assuming it could be a few seconds between unlocking the door and triggering the motion sensors. You would adjust that as needed. Then the first IF will be done if the door is indeed unlocked and we have motion OR the light is on. If that's the case we want the 20 minute timeout after no more motion and then we have it lock the door.

The second IF just checks for the door being unlocked but we didn't have motion or the light turned on so we just do a lock after 30 minutes.

On the other rule I'd just make it a simple:

I'd break this into it's own rule because trying to put it in the main rule will cause issues. If you try to trigger on the light turning on or off and then test as I have in the rule so far that part is good but how do you handle it turning off? You can test for it being off but you didn't know if it was triggered because it was turned off or it just happened to be off. Does that make sense?

Anyway I think that may do what you are looking for. Good luck.

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