One comment on your notification. Shouldn't you have a DoorClosed trigger too? Otherwise when you leave the door open, and unlocked, it will notify you, right?
tfrontDoorClosed and tFr_unlocked and (tFr_unlocked ; Now >5:00)
We don't use my front door so in my case if the door is unlocked, open or closed, for more than 5 minutes I want to know.
I have a schedule for our garage entry door that excludes our normal home times from notification.
For Nutshell, I have 4 different scenes running my door lock right now.
1. Front Door Opens - When my door sensor trips (open) - Action Cancel my Countdown timer
2. Front Door Closes - When my door sensor untrips (closed) - Start my Countdown timer
3. Front Door manually locked - When I twist the inside lock or push the lock button outside - Cancel the Countdown timer
4. Front Door Auto Lock - When the Countdown timer expires, lock the door and notify me.
I think the countdown tickers are probably overkill. Look at my example again.
tfrontDoorClosed and tFr_unlocked and ( tFrontDoorClosed ; Now >3:00) and (tFr_unlocked ; Now >3:00)
The first two are true/false. The latter two compare the timestamps from the last time the events were true.
1. If the door is open, tFrontDoorClosed is false and the whole expression is false.
2.When door closes, it sets the tFrontDoorClosed timestamp which is evaluated by the first NOW statement, so it can't be true until 3 min after door closed.
3. When it is manually locked, tFr_unlocked becomes false and the whole expression is false.
4. Have lock scene triggered by the PLEG condition as a device property or use luup code. Include notification as needed.
Now this kind of expression isn't exact, it might take 3:01 or 3:59 to trip. NOW() is only evaluated once a minute for all conditions, which is where the wobble comes from.But an average of 30s of drift isn't make or break issue and it keeps the load on the unit down. One precise timer isn't an issue but after you write a few dozen rules with them they add up, chewing clock cycles and slowing down other functions.