Help with lighting automation

Hello! Im trying to set a smart light option In smartthings. I Basically want to be able
To turn on 2 lights when We come home between a certain time. I can’t get this to work with the options in smartthings can anyone help? Why can’t I get a option to turn on when both presence sensors are gone and come back

You can’t with Smart Lighting, but you can with an automation in the new app:

Thank you! What’s the new app?

1 Like

It’s the shiny new v3 app available from the app store. The older app is known as Classic, while the new one is known as the “new v3” app. They have a different icons too:


New v3:

More info: (with more links)

1 Like

You could use the built in routine “I’m back” in the Classic app to do this…
Works just fine for me…

1 Like

I just downloaded the new app and I tried what you had e above, but I don’t want them in if I’m there. I want them to turn on as I arrive.

I tried this and can’t get it to work! How is yours setup?

If your presence sensors are working correctly then it should be straight forward. Works for me as well but mines is setup for either sensors.

Just edit the existing routine to turn on the things you like, and choose what will trigger the routine at the bottom…

I use my iPhones as the sensors. Are you using the old or new app?

Only issue is I want it only to activate between 6p-3a

Old App (Classic)

So how do you have it setup based on a certain time frame?

You can set a range in Smart Lighting. It’s at the bottom if you open up the options.

  1. Create a virtual switch that gets triggered by the I’m Back rutine…
  2. Create a Smart lighting automation that turns on the relevant lights (I use a scene, but individual lights can also be used), when the virtual switch is turned on. Set this Smart lighting rule to only run in the desired time window.

Example: For my hallway lights I’ve set this rule to only execute between Sunset minus 30 and sunrise plus 30.

I see your issue. The options are Someone Arrives or Everyone Leaves…You want when “X” and “Y” both arrives. There lies the issue…

This is a lesson in Triggers vs Conditions which SmartLighting does not allow for complex Triggers AND Conditions. This is a job for webCoRE which is an awesome rule engine that doesn’t have that much of a learning curve and pretty easy to setup.

Here is a simple Piston that you can import and it will work. You need to install webCoRE via the IDE and you can use the import code.

Quick breakdown:
Either presence sensor changes…This will trigger “activate” the Piston to watch out for the next 3 conditions.
All phones are present…This is half the battle but we also need a condition that stated that the phones were not present which is outlined in the next condition.
Finally the last conditions outlines the restriction which is time between X and Y.

Once all conditions are true which would only be evaluated if either phone changes to present or not present, then the Piston will turn on the light.

I am not sure if the same issue is in the New App but webCoRE has no issues with this simple Piston but impossible in the Stock Apps/Routines in the Classic App unless you are using Virtual Switches.

Thanks for the reply I decided to just leave it as is when either sensor leaves or arrives. Only issue now is 80% of the time the lights come on about a min after I’m already home lol. I have my barrier set for a half a mile so not sure what the deal is :pensive:

Are your phones on your Wifi? That seems to speed things up. Also, phone presence works much better when using the Classic App. You can have them both installed without issues.

Yes phones are connected to the wifi. I’m using the old classic app. Should the trigger happen when the sensor gets within my Geo fence?

No, for the trigger to happen as soon as you cross the geofence boundary your phone would need to be updating your location constantly, which would drain the battery quickly. The trigger happens when your phone updates it’s location and sees that it’s inside the geofence.

How often your phone updates location depends on the OS, settings, whether the screen is locked or not, what apps that use location data are running, etc, etc. Not sure about iOS, but it can be as infrequent as once every 4 minutes on Android.