SmartThings Community

Poor Mans Garage Door Opener help


(Rob G) #3

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.


(Joel W) #4

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.


(Rob G) #5

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 ?


(Andy - United Kingdom) #6

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?


(Rob G) #7

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


(Andy - United Kingdom) #8

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.

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-


(Rob G) #9

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


(Rob G) #10

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


(Andy - United Kingdom) #11

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


(Andy - United Kingdom) #12

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


(Rob G) #13

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 "


(Andy - United Kingdom) #14

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)


(Rob G) #15

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 ?


(Andy - United Kingdom) #16

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?


(Rob G) #17

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


(Andy - United Kingdom) #18

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.


(Rob G) #19

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


(Andy - United Kingdom) #20

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.


(David) #21

Not sure if will give you tight enough control but I have been using the Power Allowance feature to turn off an outlet after a set period of time - set in minutes. One app turns on an outlet that controls a space heater if my garage is too cold, and the power allowance turns it off after 45 minutes.


(Andy - United Kingdom) #22

Dave
Unfortunately I don’t think the native ‘power allowance’ app will not let you input less than a minute.
Rob is wanting 20-30 seconds

Btw… I have an app for your garage heater too :slight_smile:
(Assuming you have some kind of temperature sensor in there)