New smart app to link the virtual/simulated garage door device with two actual devices

Syncs a Simulated garage door device with 2 actual devices, either a tilt or contact sensor and a switch or relay. The simulated device will then control the actual garage door. In addition, the virtual device will sync when the garage door is opened manually, \n It also attempts to double check the door was actually closed in case the beam was crossed.

  1. create a virtual device (see elsewhere for instructions) for device type use the simulated garage door.

You can also create a modified version for yourself I recommend decreasing the runin time to 1 sec, otherwise it takes 6 secs before the door starts closing or opening when you toggle the simulated device icon. (That is what I did)

  1. install this smart app.

  2. select your relay /switch, and actual garage door sensor in the app, Also select the virtual one twice in the app. Once for the sensor (to get the current state), and once for the door control to actually be able to toggle it.

See picts below.

It also optionally can send text or notifications

It also double checks (in 15 seconds) after opening or closing and will resync for some reason if the door didn’t really close ie beam crossed, or didn’t really open for some reason,

github same version


This is great. Thanks for filling the gap for Smartthings. Installed and working for my 2 garage doors. Now I can use the night routine to actually close the garage doors. Before I had to do it with a separate app. Again Thank you.

no one else using this… any other feedback?

Going to give it a whirl now.

So just got it all setup and took the risk and opened and closed my garage door here from the office :). Probably not a totally good idea but hey the door opened and closed just fine. Watched the logs in the ide and everything looked good. I then set this up for my goodnight routine to automatically shut the door for me if its open and to also automatically shut it with the goodbye routine as well. We will see how well this works. I don’t want to use the I’m Back to open the door since sometimes it thinks that I left in the middle of the night then I came back when in reality my phone was on my nightstand all night lol.

those parts were pretty easy the cool part was having it auto sync if you open or close it manually

I just gave this a go and the garage opens fine but when I close it the tile will say closing then switch to closed and then the door starts to physically close. When it closes a message appears that the door didn’t shut and it is syncing and the door re-opens. Seems I cannot close it with this app. If I manually close it the app updates and shows correctly that it is closed.

The only thing that would cause this us a problem with your door sensor . Double check what sensor you set in the app. Make sure it is working and reading open and closed when you manually work the the door and there is no delay.

Also if you didn’t use a custom simulated door device type as I recommended. There is a 6 sec delay be for closing and it expects the door to be closed within 15 secs before checking. If sensor us working OK change time outs in the app from 15 to 25 secs
If that fixes it I will make the delay a user seteable parameter.

I did notice that the door was not closed enough to have the tilt sensor in the closed position when i was getting the sync message so i changed the time in the app to 20 secs and now it is working fine. I guess my door is a little slow.

One other question, When i hit the close icon the status tile goes form closing to closed rather quickly (less than a second) then the door starts to close. Is that normal or should that update to the actual sensor status?

ok new version up there with the timeout user seteable as an input option… default is 25 instead of 15 so it should work even if you don’t create a custom simulated door device type reducing the 6 sec to 1 or 2.

As for the state changing to closed quickly. that is kinda by design and why you change the timout in the simulated app.
unfortunately the way the smartapp works the actual door will not start moving until that timeout expires… if you put 6 secs back in it will go to closing wait 6 secs then actually start closing which is not really desirable experiment yourself.

Anyway version 2 posted with user seteable timeout… and also made the other inputs mandatory as it wont work without them.

Seems to be working good for me now. This is a lot easier for my wife rather than having the relay and sensor separate in things. Thanks.

unfortunately there is no way to hide that I know off the relay and sensor in things… do you know a way… so they still appear. although you can create another room and move the sensor and relay out of the actual room into the dummy room so they don’t appear there.

Oh Yeah, I wasn’t complaining… The way I had it setup prior was it had to be accessed individually in the things list or the room. What I did now was remove the relay and sensor from the Garage Room and added in the virtual device. It is a lot cleaner now.

Same here… misc room with my presence sensors and now the garage stuff and other various things.

Also good to know it works with a tilt sensor as I actually have a regular door ie open close sensor with magnet on the one garage door.

Thank you very much @Lgkahn for your awesome work on this. It works great the user preference for the time out is a nice addition.

Yeah I would agree the resync when manually opening and closing the door was a neat little treat I noticed.

I have created the virtual device and installed the the SmartApp and everything appears to be working great. Thank you. Now the only thing I need to do is to customize the simulated door device type to decrease the run in time to 1 sec. The problem is I have no idea how to do that. Could you provide the steps you took to make that change?

Go into my device types in the ide,

  1. select new device type
  2. select from template
  3. select the simulated garage door device in the list
  4. make your changes to the code… recommend you also change the name so you can tell the difference from the stock one.
  5. go to my devices in the ide
  6. select your virtual or simulated door device
  7. select edit
  8. in the device type pulldown change it to your own custom device type you setup earlier with the change ( it will be in the bottom of the list)
  9. save changes
  10. retest

Complete 100% green noob here with new ST hub and a few devices.
No smartapps installed at this point. Still trying to wrap my head around all this.

I am particularly interested in this app though since I’m not very pleased with the basic ST functionality of the garage door setup. I have a door sensor installed on the garage door and installed a relay (LFM-20) on the garage door motor assembly. Using the ST app, it works, but I don’t like it. I have to hit the open/close button twice and it’s just…weird otherwise.
The way you’ve written this app pretty much makes it work the way I want it to work too.

So problem.
I got the virtual device created.
Next, I got to step #4 where I’m supposed to “make your changes to the code”. Not sure what that means though. I was assuming that I was to simply delete the existing code for the simulated garage door opener template and replace it with the code for this custom app. However, when I do this and then click ‘create’, it generates an NPE:
“Java.lang.NullPointerException: Cannot get property ‘locationDTO’ on null object”

What am I missing here?