Need help with Door lock


#1

I’m pretty new to webcore and it’s been great so far.

I’m trying to get my front door lock to only lock when the door lock sensor contact is closed. My problem is I don’t want the door to lock every time the sensor is closed, only to lock when an automation or a command tells the door to lock. I want the door lock to check the contact sensor before it locks. So if I give it a command to lock and the door is open then it won’t lock.

Currently every time the door is closed it sees that the contact is closed so then it locks the door.

I have a contractor working at my house and he leaves the door open while he is working. But if I swing by the house to look at the progress and then I leave it will “lock” the door while the door is wide open. So I installed a contact sensor to check the door is closed before it locks. And now I’m left with the issue that the door locks ever time my kids go outside , etc

Thanks in advance for the help.


#2

I dont think you can get exactly what you are trying to do… the contact sensor is binary Open/Closed

You could do something along the lines of

If DoorContact STAYS Closed for X Min
with DoorLock
Lock
Endif

but still probably not perfect

I’d be interested in seeing how this could be solved for other needs :slight_smile:


#3

What is the “it” in that sentence? What is locking the door when you leave? Is that a WC piston that you wrote? Because if it is then I’m thinking it could be modified to work as you want. If the “it” is something else though…well, then that might be difficult to accomplish. So…back to my initial question…what is the “it” you’re talking about there?


#4

Unfortunately the “it” is a automation from the smarthings app that locks the door when i leave.


#5

Well, if you can remove the SmartApp and replace it with a WC piston then you could get this to work.

As long as WC can see the lock, and the commands are in there to lock it, then you’d be all set.

IF Presence changes to not present
AND contact is closed
Then lock door.

You could even add other logic so that if the door does eventually close (say when the contractor leaves) that it locks itself.

But unless there are options in the smart app to account for the contact sensor you’re not going to get this to work…unless you do something funky like let the Smartapp lock the door but then run a WC piston 2 minutes after you’ve left which unlocks the door if the contact is still open… Funky but in theory it would work.


#6

Thank You!! Webcore is awesome i just need to get used to it. Now if i can find a way to stop the door from locking is the door is not shut all the way while we are home. My wife tends to walk in the house and not completely shut the door so later that night when i shut things down and lock the door, the door lock ends up jamming because the door isnt completely shut