Poor Mans Garage Door Opener help

So I’m trying to build myself a very basic & simple garage door opener and need some help with the ability to control the device properly.
The outline of the scenario is:
I am controlling a Zwave plugin lighting/appliance module that is in my garage.
The output of the module is connected to a 120V SPST relay,
the contacts of the relay are connected in parallel with my existing push button in the garage

So, from my ST list I see the device and can turn the outlet on, which in turn turns on the relay, which closes the contacts and opens the door, great , all is good.

BUT, what I am looking for is a way that I can toggle the module off automatically after some determined amount of time (say 30 seconds) so they relay (and contacts) aren’t always on. Yes, I know I could just manually toggle it back off, but was looking for an automated solution instead.

I can’t find any type of timer events that would trigger a toggle of the device back to off within a preset amount of time. The only timing events I can find are based on some event trigger (day, sun rise/set, etc) but those aren’t the right scenarios for what I’m describing.

Anyone got any ideas?
p.s. I’m a newbie at this and have no programming experience so if it requires writing some code to accomplish this I would need someone to help with that.

thank you
Rob

1 Like

Hi @Rob_G,

You need to change the relay Type to a momentary switch. It will turn on to close the circuit and than turn off after the garage door motor starts.
image

thanks, but i’m not using a Z wave relay, but a spare Zwave lighting module and an external relay. I’m keeping my costs minimal by using on hand components, so I’m looking for a programing solution at this point.

You need a momentary SPST relay and a piston from WeBCoRE to turn off the plug in a few seconds. I don’t think a virtual button would toggle the plug off when released. I never tried it.
Your SPST relay can work with a piston to turn the plug off in a fe seconds.

thank you,
as i mentioned, I’m new to all this and don’t have any programming knowledge, so all that was greek to me and I’ll certainly look into it further to understand what you suggested. Would this work within ST so when I turn on the module from the App, it toggles off after a moment ?

So… what you really need is a little smartapp that goes like this:

  1. You turn the outlet/light on
  2. The app waits for a configurable number of seconds
  3. The app turns the device off

Is this what you need?

oh god yes !! thank you for understanding !!!

Ok… here you go…

I just knocked this up so it might be a bit rough looking but you are welcome to try it .
Click on the link below to copy the code.

https://github.com/CobraVmax/SmartThings/tree/master/smartapps/cobra/timed-switchoff.src

And in case you haven’t done it before…

Please let me know how you get on (or if it needs ‘tweaking’ in any way)

EDIT: One thing to note… I can only test on IOS as I don’t have an android device to test with.
Seems to work ok in IOS

-Andy-

1 Like

I’m reading now, I’ll let you know sir. Thank you!

its not showing up in SmartApps/ My Apps , status shows published though

If you log into The ide then click ‘locations’ then click on your location - then go to smartapps does it show up there?

It should show as ‘Timed Switchoff’

If it does then it should be listed under ‘myapps’ with the same name

If it is not showing in the ide then you may have installed it under the wrong shard and will need to add the code again

I noticed that sometimes you need to close then re open the phone app to get it to refresh properly.

yup, got it now ! the only thing its missing is the ability to select the specific device … its showing red and "… you can’t currently add this "

Rob
It’s showing red because it’s not optional - you must enter something before the app can be saved.
Ok… you should be able to input a switch, lamp, outlet… anything that has the ‘switch’ capability.

Is this the only device you have?
What exactly is it (I just assumed that it was a switch)

its a plug in appliance module (Leviton DZPA1). I just assumed I would select it from the available ones shown in my system. So are you saying that I have to enter the device name (Garage Door Opener) into the code and then save & publish ?

Ok… I just googled it.
It’s a z-wave outlet so it should have the ‘switch’ capability as I had assumed.
When you click on the input ‘when you turn this switch on’ you should get a list of your devices to pick from.
Are you saying when you click this it doesn’t allow you to pick your device?

Btw… IOS or Android?

yes that’s correct, it doesn’t allow me to pick from my devices. Android.

I’m not really sure what is going on here… it works perfectly on my IOS devices…
I’ll have a look for you tomorrow (I’m in the UK and it’s almost midnight here)

There is a slightly different way to code the input which might work better for android… unfortunately I don’t have any android devices to test on.

ok, thank you very much Andy for your help so far. Its sooo close!
have a good sleep,
Rob

You’re welcome… but not much good if you can’t use it :slight_smile:
I’ll have a look in the morning for you and replace the code on github when I’ve updated it.

Btw when you copied the code from github did you click on ‘raw’ and copy that code?
If not, then it may have not formatted the code correctly.

1 Like