Edit an Example DTH?


I’d like to utilize an Ecolink (Schlage) Door/Window sensor to be a doorbell sensor. The idea is to connect a remote reed switch via the internal screw terminal block and place it near the electromagnet inside the doorbell. Should work.

The problem is that the icons won’t match ist function. Also I’d like to add a 30 second delay for returning the icon from a ring state back to its idle state.

I want to create a new DTH “From Template” but the “New Device Handler Form” is not working correctly. The next best is to create a new DTH “From Example” DTH for “Ecobee Sensor”. This example has functionality that my Door/Window sensor does not have, like “Health Check” (or does it? Battery level perhaps?), “Temperature Measurement” and “Motion Sensor”.

There are other examples like “Open/Closed Sensor” and “Z-Wave Door/Window Sensor” that may be a better basis from which to start. Truth is, I’m not quite sure where to start.

Any help would be appreciated.

For adding a delay perhaps use a Virtual switch. It can be set to activate when the ecolink sensor closes and stay closed for a preset amount of time.

Not sure creating a custom DTH is necessary but I would think stating with the Zwave Door/window sensor would be the best option. I use a couple of the Ecolink sensors and that is the DTH I use for them, and it is in the list of examples.

Some of the links in the templates section don’t work, but you can find the entire list of ST handlers here: https://github.com/SmartThingsCommunity/SmartThingsPublic/tree/master/devicetypes/smartthings


Thanks for the replies guys.

@Terminal, the virtual switch sounds like a good option. When you use the Z-wave Door/Window Sensor DTH what capabilities do you add/remove?

@krlaframboise, is there an easy way to tell which DTH a device is using?

The name shown in the “type” field of the device details screen should match the name listed on GitHub.

1 Like

Also remember that at the present time all custom code, even a modified official DTH, runs in the cloud, not locally. You may not care about that, but many people do, so it’s just something to be aware of. :sunglasses:

Also, by the way, lots of people have done similar doorbell projects. :sunglasses:

If you’d like to see any of the existing project reports, go to the quick browse list in the community – created wiki, look down near the bottom of the page for the “project reports“ section and then choose the list for “doorbells“.


Thanks @JDRoberts.

Does code running in the cloud have more latency? I would imagine so.

The main difference here is, unlike the Aeon, I’m using my existing doorbell more similar to the Nexia (which has several bad reviews and costs much more). Some of the code may be quite helpful, for instance notifications.

1 Like

Usually it has more latency, although not always. Mostly, it can’t operate unless both your Internet is working and the smartthings cloud is available.

Often people prefer to make sure that their doorbell has a locally operating option so that it will work even if the SmartThings cloud is not available. But you can’t get any notifications locally, so it may be moot if that’s the primary purpose of the sensor.

This is what I’m using as a doorbell sensor - z-wave door contact sensor and remote Reed switch. This sensor is particularly well suited because it has a screw terminal block for a remote switch built in. I’ll just place the remote Reed switch near the electromagnet in our doorbell and presto!

1 Like