Where's the code for the Z-Wave Virtual Momentary Contact Switch DTH?

Hi. I’m using the FS20Z-1 as a relay to open my garage door. It works find if I push the button on the relay then press it again quickly (acting as a momentary relay). If I go into the IDE and change the device type to Z-Wave Virtual Momentary Contact Switch it goes a bit nuts by opening and closing over and over. I THINK the issue is that the relay isn’t getting a momentary command quick enough. Is there a way to shorten the amount of time the relay is turned on then back off again?

Nevermind I figured it out. I was correct that the length of the momentary switch was too long. I created a new device handler from the existing Z-Wave Virtual Momentary Contact Switch and adjusted the delay time from 3000ms to 1000ms and things are perfect!

1 Like

good job. Too many people ask a question and then don’t close with the answer. 3 seconds is pretty long for typical momentary.

1 Like

I’m using the zwave virtual momentary contact switch with an LFM-20 on my garage door opener. Works great but with one issue. It only responds to “on” and “off” events, not “open” or “close” events.

This doesn’t matter much programatically, but it’s a but annoying to have to tell alexa to “turn the garage door on” when you want to open or close it. I’d like to modify the DH to support “on” and “off” instead of “open” or “close” but I don’t know where to look for the code for virtual handlers. Anybody have any ideas?

You can modify the DTH if you like, but the fastest way to make this change is to use an echo routine (not a SmartThings routine). This allows you to use pretty much any verbiage you want that isn’t an instruction for the echo device itself. For example “Alexa, Open the pod bay doors” :sunglasses:.

You just set the routine to do the same switch that you were going to do.

The only difference is that you must always use the exact phrase you define for the echo routine.

Sweet! I didn’t know you could do that. I haven’t gotten too much into the alexa app.

Do you know if you can also create device name “aliases” for names in SmartThings? So lets say I have an st light names “walkway light”. I’d like to be able to refer to it in alexa as either “walkway light” or “sidewalk light”. Something like that?

Yes, that’s very easy to do in echo. ( note: anytime you see me say echo, I usually mean “ALEXA,” but because I use voice recognition software if I say that, my own devices will activate. :wink:)

Echo allows you to set up groups, and a device can be in as many different groups as you want. So you just create the group name.

For example, we have one small room in my house and we are three housemates. One of us usually says “study” another typically says “den” and the other usually says “office.” We all understand that we are all talking about the same room. So when we set up the echo devices, we just made multiple groups with the same devices but different names, and now everybody can use the name which is most natural to them. And it’s fine to have a group with just one device in it. So that one is easy. Again, see the echo help on the Amazon site for details. And if you run into any problems you can contact their technical support, I have always found them very helpful. :sunglasses: