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

what are you trying to publish there is a virtual device driver here that gets published to a device type
and there is a smartapp here that gets published to an app. you are probably trying to publish in the wrong place.

this is already doneā€¦ use the routine for xxx returns and when someone arrives open the garage door.

I got the device installed fine. The smart app gives me a licensing error when trying to publish

how can there be a licensing error. I wrote it from scratch myselfā€¦ testing again now.

not sure what exacly you are doing or seeing as I cannot repro itā€¦ I just got code and changed name to test at end and saved and published fineā€¦
see attachmentā€¦

Ɨ startup failed: script14508086776051597704016.groovy: 231: expecting EOF, found ā€˜:ā€™ @ line 231, column 32. Obtain a copy of the License at: ^ 1 error

Is the error. I donā€™t have code line numbers in my Ide so unless I count them manually

there are line numbers (see above picture)
are you hitting save after pasting in the code before publishingā€¦ there is no line 231 it only goes up to 226

Iā€™ve been trying on my phone. Guess Iā€™ll try to do it from my computer tonight.

ive done it on my phone with chromeā€¦ ā€¦strange let me know if you get it working

Just tried chrome and it workedā€¦ Weird!!

So Iā€™ve gotten this working and have a thoughts/questions. I am currently utilizing a wemo maker to open and close my garage. I am using a tilt sensor to determine if my door is open or closed. Since the maker doesnā€™t have a direct integration into ST, I have to utilize IFTTT to activate the opener based on a switch or contact closure to operate the door.

I noticed that thisSmartapp will update the status of the virtual opener button if the garage door is locally opened. Iā€™m assuming with my situation that I will not be able to use the app because if the SmartApp changes the status of the virtual switch, that will trigger IFTTT to actually activate my garage door and stop its action.

Thoughts?

probably notā€¦ you could just put another tilt sensxor or even a cheap open/close door sensor on the garage door and add it to smartthings then use thatā€¦ they only cost 15-20 bucks or something.

I probably wonā€™t even bother then. Its been working fine how I have been using it, other than my virtual switch doesnā€™t update if the door was opened locally. I can still tell its open by the tilt sensor.

you can try to use your sensorā€¦ how long does it take to sync and read the correct status ā€¦ the timeout value is user seteable in the app just to handle the case where it takes too longā€¦ I or you may have to increase the upper limitā€¦ it would just take that long to figure out that the door opened or closed manually (or didnā€™t close due to some issue)
however if the device is not even in smart things you wont be able to select it in the app.

I also may be reading what you are doing wrongā€¦ because if the sensor reads open or closed already ie it responds fast the app will not try to open or close the door again.

yeah the wemo maker isnā€™t even in ST. I just use a virtual switch that triggers the door when turned on triggers IFTTT to signal my Wemo Maker to open the garage doorā€¦ then I have a rule that turns the virtual switch off when the garage door opens(based on the tilt contact).

Iā€™ve also tested it using your virtual garage device and I can get it to work the same with two IFTTT rules(one for open and one for closed) that essentially do the same thing.

My only issue doing that and using the app is when someone opens the door locally and causes the switch and sensor to be out of sync and the app tries to update the virtual garage door to open, it triggers my IFTTT rule to fire and reverse the door.

My hope is someday, the wemo maker will be directly integrated into ST. I have minimal programming experience so I am not smart enough to write a driver to do so.

@Lgkahn

Iā€™m using this app to work with my echo. Thank you for it!

One question though. I see in the code that it says push notifications are not required. However it is coming through as a required field for me.

Do you happen to maintain the latest version of this on Github? If so, can you provide the link? Thanks.

1 Like

Thatā€™s not the latest versionā€¦ it should look like this.

I am a noob and have been pretty successful making the conversion from my VeraLite to the SL and am very happy with the interfaces and integrations. That saidā€¦I have managed to mess this one up. :smile:

I have an existing outlet switch hooked up to a relay which works alone (and worked with Vera) along with a standard contact sensor (also working). But I cannot seem to get this Smart App to work.

If I was guessing I think my issue is likely with a device type versus devices. Both have the Simulated Garage Door Opener Template and everything here seems to refer to the ā€œmy device typeā€ section. However when I create the template and publish it there, nothing shows up in my devices to assign in the app. If I just add the ā€œmy devicesā€ template, it shows and I can set everything up in the appā€¦but it doesnā€™t work.

The funny thing is the app fully acts like it is working, but nothing happens with the door. If I manually open it the app does catch that and update statuses. Also, garage door does work if I manually hit the switch device directly.

Guessing my problem is with the difference between device and device type, but not 100%. Also want to make sure in the preferences that I leave the device as virtual and do not actually associate it with the switch (or other device).

Appreciate the help!

first delete everything all your devices remove and re-add
then you should have 2 devices added 1 relay or switch that sucessfully opens and closes the garage doorā€¦ if a switch you will have to add a smartlight or other rule to turn off when it sees it on.

that is 1 device the device type is the type of entity. and should be a stock switch or relay

the next device is the sensor or the door it should either be an open/close door device type or a tilt sensor.

make sure the switch can open and close the door and the sensor senss open and closeā€¦

once all this is work ing with stock device types (no custom device type in your ide)

now create a new device type (not device_ for the virtual or simulated garage door as outlined aboveā€¦

then create a new Device in the ide that uses this simulated device type.
(or you can just create the device directly and change its type to the simulate garage door opener) however, there will be a 6 second timeout if you dont use the custom version and it will not work with alexa.

anyway then finally create the smartapp from my code in the ide/

then go in the phone app and add a new smartapp of my app and configure.