[RELEASE] Virtual Garage Door Opener/Controller with Relays and Tilt/Door Sensors

dth_garage
smartapp
garagedooropener
dth_sensors
rboyapps

(www.rboyapps.com - Make your home your butler!) #21

Tagging the DTH author @erocm1231. Maybe Erik can suggest how to get the child devices to show up as Relay Switches.


(Joel W) #22

I sent Eric a message, but I am not sure I explained this properly.


(www.rboyapps.com - Make your home your butler!) #23

In the meanwhile you can just edit the SmartApp and on line 109 change:

capability.relaySwitch

to

capability.switch

That should let you pick a switch instead of a relay switch.


(Joel W) #24

That did it. Thanks. Works perfectly. Now if there is an update I will loose the change correct?


(www.rboyapps.com - Make your home your butler!) #25

I’ve been investigating some more and it like most relay switches are also exposed as switches so I’ve updated the SmartApp to pick a switch instead of a relay switch which should make it more broadly compatible with a wider range of devices.


(www.rboyapps.com - Make your home your butler!) #26

Virtual Garage Door Manager SmartApp - v01.00.01

  • Allow use to capability “switch” instead of “relay switch” for broader compatibiity

Virtual Garage Door Controller Device Handler - v01.00.00

  • < no change >

(Joel W) #27

Works like this, would have been easier if Eric could update his device type.


(Joel W) #28

Wouldn’t it be nice to have the garage door icons animated. You can see it going up and down. I know not possible with the SmartThings platform.


(Jason) #29

I just did a dry run - not connected to doors yet, but very pleased since I can see it will work perfectly! I have one of the Vision dual relays, and a pair of Ecolink tilt sensors. I wasn’t sure how the relay would respond since it is a two end point device, and because I did not know if I would have to make them momentary on my own. Very please to see the dual relay will let me control both garage doors with this, and that the momentary setting concern is unnecessary since it clicks on and off quickly on its own! Nice! My Iris garage door opener has become a finicky pain in the butt and I am looking forward to replacing it!


(Joel W) #30

Now working for two days, works perfect with my home brew relay system using the Inovelli dual channel smart plug.


(JIm) #31

@RBoy, I want to disable operation unless in a certain mode. Looking over your code, if I put an if statement for the mode to control the relay.on() on line 287, should that do the trick? Or is there someother places I need to do that also?


(www.rboyapps.com - Make your home your butler!) #32

Please explain and we’ll see if we can add the feature. Are you looking to limit which modes the garage should operate? If so wouldn’t that be more appropriate for the SmartApp calling the on/off rather than in device handler? (essentially this set is a device handler for multiple virtual garage devices)


(JIm) #33

Yes, I want to only allow the garage door to open/close if in a certain mode, basically if my mode is home. I only have 1 door, so multiple at this time is not an issue.

I was looking in your smartapp code and it appeared that on line 287 is where you turned the relay on.

Maybe an alternative is to add the “Set for specific modes” in the app.

I had an issue this morning, my own fault, but that is what is precipitating this request. It’s possible my wife could make the same mistake and that would be bad for me.


(www.rboyapps.com - Make your home your butler!) #34

That would be better way to address it however in this case the SmartApp is just a Service Manager for creating and managing the actual devices, it’s an extension of the device handler (not a true SmartApp).

I don’t know of any device in SmartThings that disables itself in specific modes. The real question is which SmartApp send the open command and wouldn’t that be the right place to configure mode limitations? This is more of a design principles question.


(JIm) #35

I’m not using another smartapp to send the open/close command to your app. I have a button on an ActionTiles screen that is just the control button from your app. Come to think of it, I guess that is part of the DTH, not the smartapp? So that probably wouldn’t work.

I may have to create a simulated device and use it instead. Then condition it.


(www.rboyapps.com - Make your home your butler!) #36

ActionTiles is definitely a SmartApp and not DTH. However it’s unique because it’s an interactive SmartApp (unlike other SmartApps) but however in this case it’s an “Extension” of your ST Mobile Things Dashboard (albeit with a MUCH nicer and more intuitive interface).

The way to look at this would be, suppose you have clicked on the door unlock button or turn light on button - it should respond as that was a user action (accidental or not) and the device should not second guess a (physical) user action intent. The purpose of modes is to limit SmartApp actions (which run in the background and ActionTiles isn’t a background app but rather an extension of a physical user action).

I know these are subtle differences but they make a big difference in the usability of the setup. Putting a mode limitation the service manager could create a lot of confusion if the only job of the service manager is to create a DTH/physical interface for the device.


(JIm) #37

Let me explain what happened. I had a smartplug that I was using to turn on/off a coffee pot for a couple hours each morning. We were no longer using that pot so I took the plug to re-purpose for the garage door opener. I removed the scheduling for the coffee pot from the smart app, but it apparently was still scheduled. So at 5:45 this morning our garage door opened and set off the alarm. I still don’t understand why the scheduling didn’t get removed, but that issue has since been resolved. So in theory that shouldn’t happen again. If I haven’t missed something somewhere else that I don’t remember. I did unplug for a couple days the relay I am controlling so if it happens again at least the door won’t open. When I’m sure all is ok, I’ll plug it back in.

But it got me to thinking, it would be nice to totally disable something from working during specific modes. In fact that would be something very handy in every DTH that controls something. Not necessarily for a given mode, but a means to disable some device temporarily if needed.

So for my case, I can create a simulated relay, use that in your app, then have a routine in one of my apps that controls the real one.

One other thing I noticed. Do you have some sort of refresh timer that checks the door sensor? It seemed if I told the door to open and it didn’t, it always said opening. I did a manual refresh and it reset itself.


(www.rboyapps.com - Make your home your butler!) #38

Yes it implements polling so when the platform next polls the device it it will reread the door sensor state and update the current state. Maybe that can be done by the service manager every 5 minutes instead of relying on the platform since the polling is not always reliable.

EDIT: Done in v01.00.02


(Chandler Newby) #39

@RBoy Mentioned before, but is it possible to use the acceleration sensor of the Samsung multi-sensor to more quickly report the opening/closing state?
For example, if my garage door is open, and I push the physical button to close it, the acceleration sensor could tell SmartThings that the door is in the “closing” state before the tilt sensor would tilt.

[RELEASE] Virtual Garage Door Opener/Controller with Relays and Tilt/Door Sensors


(Jason) #40

You can set security parameters in ActionTiles. I have a PIN set for the garage door so it won’t actuate until after I put the PIN code in.