Ring motion notification only if front door unlocked


#1

1) Give a description of the problem
I want to be notified about the motion that is detected by my ring doorbell, but only if the front door is locked.

2) What is the expected behaviour?
See above, but I have a smart lock that when unlocked, I do not want to receive motion notifications from ring. When locked, I want to receive notifications.

3) What is happening/not happening?
I am about 50-50 success rate on this working. About half the time, it works as expected, but the other times, I think the ring motion alert is being sent before the Lock gets registered as being unlocked. Then it sends the notification. My kids have odd work schedules so they come and go at different times, and I don’t need to know or be alerted when they leave. So I figured if I only alert when the door is unlocked, that would be better.

It is also possible that they are pressing the lock button from the outside when closing the door (setting locked = true), and then the Ring is again detecting motion, which is causing the notification.

I was wondering if there is a way to test against ā€œif the door was unlocked in the last X seconds, then don’t send the alertā€, and what would that look like?

**4) Post a Green Snapshot of the piston![image|45x37]


5) Attach logs after turning logging level to Full
OK - so I edited the piston after it not working correctly, so don’t at the moment have a log example of it not working… I can update later if needed…


#2

I know there’s the ā€˜stays locked…’ condition you can use but I’m not sure if it’s reliable. There’s also the age() function where you can check how long the lock has been in that state in milliseconds. Something like…

age([YourLock:lock])

Here’s an example from the eval console:

(expression) age([sim Lock:lock]) »»» (long) 30317609402
(expression) formatduration(age([sim Lock:lock])) »»» (string) 350d 21:33:40

Maybe something you can use in your condition.


#3

Thanks, Rey - maybe I am not advanced enough with WebCore, but I am not sure what to do with the info you posted - any way you could spoon-feed it a little more, please? I am going to go play with the ā€œwasā€ and ā€œstaysā€ options a bit too, though…


#4

I was thinking something like this… 60000 is 1 minute. You enter the condition as an Expression

image

or… make sure it is locked for more than 1 minute…

image


#5

OK - I think I got it - changed the ā€œif lockedā€ to ā€œif locked for at least 10 secondsā€ - that seems to allow me to exit, lock the door & get out of range before the motion kicks on again… now let’s see if the other 1/2 is that maybe the lock is not reporting in as fast as the motion picks up… :slight_smile: Posting below what I have in case it’s useful to anyone else. (left variable & device names in on purpose, as they shouldn’t reveal anything in this case…)

Thank you for the help!