How to change a door/window open/close sensor to smoke detector?

Hi all,
I saw here:

that you can use a simple open/close sensor to simulate the smoke alarm by connecting a relay to it. Is there any existing examples?
I got a $20 sensor:
and I am trying to learn to integrate it.

One quick question is, in the IDE, how do I create a special handler for this particular device that is different from the others? I want to keep on using the other sensors of the same type as normal door/window sensors.

Hi @Lun_Jiang,

Depending on your location US/EU/UK, I would recommend an integrated device from the start.
I am in North America and I love to tinker, but for the price of the existing hardware, you might buy something like this. I use it for my house and sanity.

there is no indication that the device you listed, Visonic MCT-340E, will read an external dry contact alarm in the way you want. It only reads its built-in magnetic reed switch contact.

The only dry contact sensor I have found, is not 99% reliable so I would not link it for fire safety.

I agree Zwave First Alert Zcombo is the best option - it will not link to an existing smoke alarm system.

If you do attempt to modify your existing smoke alarm system then you may interfere with its operation. Seems like a bad idea.

Does your smoke detector system have exposed NO or NC endpoints for an external reporting system? If so, then I would take a look at the ST_Anything project. You can use this to read the output of the smoke detector. It has custom DTHs for all different types of devices.

1 Like

I made one especially for the EcoLink sensors a couple years ago:

GitHub: vseven - SmartThings_VSeven - master

I probably need to update them for the new app…I haven’t yet.


Hi Vseven,
That is exactly what I want to do, unfortunately I bought a different sensor:
And now I’m trying to work with the deviceHandler for it:
I’m not sure where this leads me but my first question is about getting rid of the "//capability “Contact Sensor”
I’m quite concerned because in the file it lists:
tileAttribute (“”, key: “PRIMARY_CONTROL”) {
This obviously is just displaying, but there are several other functions that work with the contact sensor:
private Map getContactResult(value) {
log.debug ‘Contact Status’
def linkText = getLinkText(device)
def descriptionText = “${linkText} was ${value == ‘open’ ? ‘opened’ : ‘closed’}”
return [
name: ‘contact’,
value: value,
descriptionText: descriptionText
I’m not sure how to work with them. Is there any tutorial for simulators?

Ok I’m also starting to watch videos to figure out how to program these things.

If you compare my DTH to the original EcoLink DTH you’ll see I made very few changes. You should be able to duplicate the same changes. Or try my DTH and just see if it works.

Your z-wave ecolink handler won’t work for his zigbee Visonic sensor. But he could make the similar capability changes to the default smartsense open/close handler and have it work.

Hi guys,
I have been working on this but I’m stuck with zigbee simulator.
Is there any easy accessible example of simulation on zigbee window/door switches?

Very tempeted to just go for this one:

What do you guys think?

1 Like