[OBSOLETE] Enhanced Z-wave garage door opener code (for Linear GD00Z and variants)

I’ve modified the ST default “Z-Wave Garage Door Opener” to better work with the “doors & locks” module. As far as I know, this would only be useful for the linear GD00Z device (and variants including the Iris opener.) This will allow you to select your garage door device as both the “open/close sensor” and the “garage door opener relay.” At that point, from within the “doors & locks” module, you can use “open and close it remotely” (and perhaps the other sub-modules that open/close the door.)

All this does is to add the “relay switch” and “momentary” capabilities to the type, stubs on()/off(), and defines push() to either open or close the door (depending on it’s current state.) It’s not a perfect implementation, as the “doors & locks” module might show the door as being “stopped” when that’s an invalid state of the Z-wave door opener.

To use: go to the ide, create a new device type, from code, copy this code in, save, publish->for me, then edit your garage door device to use this type (my z-wave garage door opener) instead of “z-wave garage door opener”

(raw link (use this to copy/paste from): https://raw.githubusercontent.com/garyd9/smartthings/master/my_z-wave_garage_door_opener.groovy

Edit: moved code to github

9 Likes

will this smart app allow the use of the garage door to be closed via changing to modes? like closing the garage door just like locking a zwave door lock when switched to “night mode”?

I attempted to use your code as written, but I think I’m doing something wrong. After I paste, I hit create, and I get the following:

Org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed: script14210364547131137697128.groovy: 306: unexpected token: … @ line 306, column 26. Edit: slight code cleanup… getting rid of comments and debugging code ^ 1 error

Any ideas what I did wrong?

Thanks. Steve

[quote=“fam_man, post:3, topic:9389”]
Any ideas what I did wrong?
[/quote]not sure. There’s only 304 lines of code, so it’s kind of odd to see an error on line 306. To eliminate the easy errors:

Are you creating a device type or a smartapp? (This is a device type)

Do you already have a device type by the same name (“My Z-Wave Garage Door Opener”)?

[quote=“tenzingsherpa, post:2, topic:9389”]
will this smart app allow the use of the garage door to be closed via changing to modes?
[/quote]This isn’t a smart app. It’s a replacement device type that allows the garage door device to be better handled in the “doors & locks” section of the mobile app. This theoretically enables to the following functionality of “doors & locks”: “Open and close it remotely”, “Open it when people arrive”, and “Close it when people leave.”

Take care
Gary

I am setting it up as a device type. I currently have a “Z-Wave Garage Door Opener”, but not with “My” in front of it. I have had problems in the past with copying and pasting code from within the thread. If I pull the same info from GitHub (for the “Z-Wave Garage Door Opener” for example), it works just fine.

Probably an issue with copying and pasting.

Thanks anyway.

added it to a github repo. See first post (as soon as I update it)

[quote=“fam_man, post:6, topic:9389”]
Probably an issue with copying and pasting.
[/quote]Try again - added it to github for you. (first post has the github and raw github links)

Take care
Gary

You can do that now via the existing ST app.

You can do what now via what?

Umm… @lmosenko, yes. However, the LFM-20 is a “relay switch” and not a “z-wave garage door opener.” This device type (in this post) is for the dedicated garage door opener type and NOT for the relay+sensor device pair. (See the first paragraph in the first post of this thread.)

ST’s “doors and locks” module actually supports a relay+contact sensor (two separate devices) better as a garage door opener than it does a dedicated z-wave garage door opener. The device type in this post is to help resolve that issue by making the dedicated garage door opener look more like the relay+sensor that ST better supports (by exposing methods and capabilities similar to what the relay+sensor pair would show.)

I was able to successfully add the device type now. I will test the device, etc once I get home. Thanks for the help!

1 Like

Thanks for this! I copy/pasted the code into a new Device Type and switched my Linear device over to that new device type, no problem. I went into the Doors & Locks dashboard app and edited the Garage Door entry, and was able to indicate that the Garage Door device is able to respond to open and close requests. So far so good. However, I still don’t have a shortcut to the Garage Door in the Shortcuts screen in the Doors & Locks dashboard app. Any thoughts on what I’m missing, here? Thanks again!

Once you’ve set up the “open and close it remotely” section in doors and locks, it should eventually show up. You might need to go into “edit door name and devices” to ensure that both the “open/close sensor” and the “garage door opener relay” are both configured.

It’s also possible that you’ll need to open and close the garage door from “things” at least once.

Obviously, I’m not entirely sure what it takes, but it does eventually show up. :smile:

Take care
Gary

It did indeed eventually show up, took a few hours. Thanks again!

@duncan, is there any chance to get these modifications included in the “built-in” z-wave garage door opener device type? All this really does is to add the needed capabilities so it works with the existing “doors & locks” built-in smart apps. (By simulating the capabilities for “Switch”, “Momentary” and “Relay Switch”)

(Or is this something I have to email support@smartthings.com for?)

(I have no idea how to submit the changes to ST.)

Thanks
Gary

Can someone help me through the process of getting this added. I’ve added the new device type code but not sure what I need to do from there. My Linear GD00Z-4 is currently setup and working as a Z-Wave Garage Door Opener but without the added functionality of your new code. So what do I need to do to switch it over? Do I need to delete the existing one first and start from scratch? or is there a better way. I’ve searched for the new device type on my phone but it never shows up.

When you go to ide.smartthings.com, and click on “my device types”, do you see an entry for the new device type? If so, also from ide.smarthings.com, click on “my devices” and you should see a list of all the actual “things” you have attached to your hub. From there, click on your existing garage door opener, then “edit” that, and change the “device type” to the newly added device type. After that’s saved, you should be good to go.

Gary

1 Like

Thanks Gary.

Will this allow me to have the garage door close at a set time or mode if it is left open?

If so, I don’t see where I would set it up. I already have it setup to text me if left open for 10 minutes.

Is this the option that I have to wait a while before it shows up?

Jeff, I don’t see options like that with the built in apps. It might be doable with a custom smart app