I have an automatic door lock but no door sensor so I made this app to save me a little money. It’s pretty simple and this was the first thing I was hoping to set up when I bought an ST. It can turn on switches when a door is unlocked and turn off switches when a door is locked.
@dlee I actually added this in there a couple days ago but I didn’t have a chance to upload the change yet. I was trying to figure out how to make the preferences look a little nicer but I haven’t had time. The code with the delay is up there now.
@brianless I’ll add this in there when I have some extra time.
@dlee Whoops. I just reread your post and that’s not what I did. Usually I lock the door after I come in so I didn’t think of having the light turn off after just unlocking.
@brianlees No. I just need to take some time to rearrange the code and add some error checking in there. I just finished adding it in. Now I just need to get the only run during a certain time of day working.
@texaszman There’s some videos but I haven’t found anything quick and simple. You basically need to log into the developer’s IDE and then create a new SmartApp under My SmartApps. Fill in the required information (it doesn’t matter what you put because it will be overwritten). Overwrite all the code with the app you want to create and then Publish -> For Me. Click the + on your phone and then the app should show under My Apps.
Sorry for bumping an old thread…I was just searching the forum for something like this, thank you for the code!
I have a newbie question which I am hoping someone might be able to help me with. I added + installed this app via the Web Ide, but I am curious if once installed this will show up anywhere in the mobile app? i.e. is there any way to use the mobile app to reconfigure/edit the settings I installed via the Web IDE (say I want to add another switch or add a delay or something). Thanks!
Wanted to say thanks for this simple code. I made a small change to reverse On and Off, and am using it with a virtual switch and Amazon Echo. I have a virtual Switch named “Front Door Lock” When the switch is on, the door is locked and when it’s off the door is unlocked. So I can say “Turn off Front door lock” to unlock the front door, and “Turn on Front door lock”.
I found this smart app yesterday and it solves a problem I’ve been having for awhile - namely setting the mode when I return home (to HOME during the day, and EVENING in the evening).
There is one thing that would make this absolutely perfect for me - the ability to change the STOP TIME to SUNSET.
How hard would it be to add that to this smart app?
Could someone post directions for a novice (me) to do that?
I know how to copy code from GitHub and create smart apps on IDE (including turning on OAuth) … I just don’t know what the code is for SUNSET, and where it would need to be added with this smart app code.
Any help would be appreciated. And if not possible, I can certainly live with this just being active from 8am until 6:30pm everyday (and adjusting the end time monthly as the seasons progress).