App to turn lights On when all are away

I can’t for the life of me find an app that will turn on a lamp (only when dark) when everyone leaves and off again when at least 1 person arrives.

You can do this in the dashboard settings of the light

The only option I see is to turn lights Off when people leave not On. Also don’t see a way to specify that it only fires when dark out.

Check out modes - I change home or away mode with presence and then the mode can turn lights on or off. The only way it’s going to knowing it’s far is if you added sunset or use a aeon motion sensation which has a light sensor but I have never used it

Thanks Jim but I’m still not getting it. I need the step by step Idiot’s Guide to SmartThings approach on this one.

@toneflacone - you can do exactly what you want in the “Hello, home” section of the app:

  1. go to hello home by clicking the red number (or empty dialog bubble if there are no new notifications) in the upper right of the main app screen
  2. click the gear icon on the bottom of the screen
  3. Click “Add Action” at the bottom of the list of whatever actions are there
  4. Give it a name
  5. Under “Turn on these lights or switches” select the light you want to come on
  6. scroll to the bottom and click the “+” next to Additional Settings
  7. Select "Automatically perform <whateverYouNamedIt>
  8. Select Everyone Leaves and select the presence devices

Then click done

Oh - sorry I just now saw that you only want this to happen if it’s dark.

For that you probably need to use an app…

You make an app that subscribes to mode switches, then set SmartThings to switch to “Away” mode when all presence sensors are not present. When the app gets notified that it entered “Away” mode, have it check if the current time is between sunset and sunrise and if so, turn on a light.

At present it’s not that easy to set up multiple conditions (if X and Y, but not Z) without writing an app.

Thanks Steve I contacted support earlier today and they said there currently isn’t an app to do what I want but they will submit it as a feature request. I still haven’t written any apps, but may give it a try. I agree, as has been said in other threads, that they need to add some IFTTT type of sensibility.

What I’m trying to do is make it appear that someone is home when the house is empty. It’s a common feature on many HA and Security systems. Some systems will even have lights turn on and off randomly over time so it is even more convincing.

@tonyfalcone - I had an app that did 90% of what you wanted anyway, so try this one out (I have not tested it):

For this to work, you need to have ST put you in “Away” mode when you’re not home. The way it works is this:

When ST changes modes, the app checks if the mode is to “Away” or some other mode. If Away, it will turn on the light if it’s night already or schedule the light to come on at sunset if it’s not already night. The lights will just keep coming on at sunset and off at sunrise until someone comes home (i.e., ST changes out of “Away” mode).

@Steve28 Very cool! I’ve never done any of this before. I joined github, what do I do next?

@AJF - I REALLY REALLY mean no offense but I think your a little over your head here.

No need to join git - your just going to copy that code into a new app you can make at IDE.smartthings.com

I think you need to do some reading in the support section to get a better handle on everything.

Then the responses will start to make more sense. There are great tutorials on creating apps and how to install them

https://support.smartthings.com/hc/en-us/categories/200058730-Build-with-SmartThings

@Jim I needed to join github to access Steve’s app. No offense back but you really haven’t helped me much in this thread except to say it can be done in Dashboard, in which it can’t be done because there’s no “Only after Sunset” option. Steve did exactly what I was hoping someone who knows more about this than I do; he made a list list of steps to try to get this to work.

As I said above, this is a very basic feature that all HA systems have. We, the customers, shouldn’t even have to write these basic foundation apps ourselves. They should be written by someone at ST. Is their entire business model such that the customers do all the work? I can understand giving users the ability to tweak their system suit their individual needs, and maybe share their apps with others, but the basic functionality should not fall on their shoulders.

And I don’t mind spending some time working on my system, but it can quickly go from enjoyment to a chore, which is where I’m at now.

Haha - actually I provided you with a link to resources that are very good at explaining " what’s next" as you asked.

You need to take the code and make your own smartapp.

AJF, remember this is still a growing product and community, and ST is working as hard as possible since launch. Some of the other HA systems on the market have had some time, years, to mature. Throw in iOS, Android, new devices, and mobility into that mix, and it gets even more complex; then add IP and BT devices in to stir the complexity pot up even more. How about IFTTT for that extra kick?

I’ve committed myself to ST, and the challenges it brings. My past developer experience and current job does help with creating some of my own device types and apps, and that’s the nature of this beast we call ST, and this industry. There are a lot of devices today that ST just doesn’t directly support, and it will require you to create your own device type until ST, or someone here, builds them for us. Once you finally have your devices in ST, you then naturally want apps to make them all work together. Depending on your needs those may not exist, just like what you’re experiencing today. You may have to create your own at times.

Your last statement will be one you’ll have to embrace, and to realize that the chores you work through will bring enjoyment when it all comes together just to turn on a light bulb.

@tonyfalcone - Hm. Weird that you had to join github to see my code - it should be publicly viewable.

In any case, Here’s some quick steps to get you going - you really should read through and watch the application development materials (there isn’t much which has been an issue for trying to learn, but it’s enough to get started).

  1. Log into the IDE (http://ide.smartthings.com)
  2. Click on “My SmartApps”
  3. Click the “+ New SmartApp” button
  4. Fill in something for Author/Name/Description and leave the rest blank or as-is
  5. Under “Choose a Category” select “My SmartApps”
  6. Click “Create”
  7. Cut and paste my code replacing what is already there
  8. Click Save
  9. Click “Publish”, then “For Me”

Now on your phone, go to Apps and Click the “+” sign, you should see the “My Apps” category, select that and you should see the app you just created.

Success! Thanks Steve. I just need to see if it works when we are all out. My mistake on github, I thought your app needed to be downloaded, not simply copied and pasted.

@JSC I understand what you are saying, and I would agree if this were some home grown system being put together by a bunch of hobbyists. But it’s being sold and marketed to mainstream consumers, as a finished product and it really isn’t. You guys know a lot more about programming than I do, so it comes much easier to you. I just don’t have the time nor inclination to put as much of myself into it as you do. At least not yet, but I may give it a try when things slow down a bit for me (self employed business owner). Anyway, thanks for the help.