Deadbolt Locked/unlocked as Open/Close

I would like to add my Schlage deadbolt (Camelot touch screen) to SHM, but it doesn’t have open close capability. Is there a way around that limitation? Using ethayer’s z-wave lock code.

Locks are missing from SHM. It’s a weird omssion. We can hope they’ll add locks soon, it’s hard to imagine a security monitor that doesn’t check to see if the doors are locked.

2 Likes

I know, right? I was hoping there was a workaround. Maybe open/close could status could be piggybacked in the device type, but that’s waaaay above me

1 Like

…and the v2 hub was to be released Q2, right? :wink:

2 Likes

I already did this for myself a while back to work with SHM. Just add a new Simulated Contact Sensor in the IDE and then use this smartapp to link the two.

/**
 *  Lock to Contact Sensor
 *
 *  Author: SmartThings
 *
 *  Date: Jan 17 2015
 */
definition(
	name: "Lock to virtual contact sensor",
	namespace: "rhworkshop",
	author: "Andy Rawson",
	description: "Opens or closes a virtual contact switch when a lock is locked or unlocked",
	category: "Convenience",
	iconUrl: "https://s3.amazonaws.com/smartapp-icons/Developers/whole-house-fan.png",
	iconX2Url: "https://s3.amazonaws.com/smartapp-icons/Developers/whole-house-fan%402x.png"
)

preferences {
	section("When this lock is locked or unlocked") {
		input "master", "capability.lock", title: "Where?"
	}
	section("open or close this contact switch") {
		input "contacts", "capability.contactSensor", multiple: false, required: true
	}
}

def installed()
{
	subscribe(master, "lock.locked", lockedHandler)
	subscribe(master, "lock.unlocked", unlockedHandler)
}

def updated()
{
	unsubscribe()
	subscribe(master, "lock.locked", lockedHandler)
	subscribe(master, "lock.unlocked", unlockedHandler)
}

def lockedHandler(evt) {
	log.debug evt.value
	contacts.close()
}

def unlockedHandler(evt) {
	log.debug evt.value
	contacts.open()
}
2 Likes

Ok, I’m probably missing something pretty basic, but after installing the virtual contact sensor and this smart app, how does the smart app know to watch my deadbolt?

No, I forgot to mention the other part of it since I set it up a while back. You also need to setup 2 new routines that arm or disarm the SHM when the contact is opened or closed.

well, that I get. But it is not updating it’s open/closed status in sync with the deadbolt.

Hmm, can you open the Live Logging in the IDE and then go into the smartthings app and reconfigure this app where you select the lock and the contact sensor then after that cycle the lock to make sure everything shows up in the logs?

Got it sorted. For some reason the config didn’t take in the app. Ran through it a second time and it’s working.

Thanks!

This community is awesome :smiley:

2 Likes