Lights on when coming home when its dark

I’ve been looking and have not found a simple app that will turn on a light when I’m on my way home, only when its dark, using a presence and lux sensor. I would like to be able to pick the lux threshold as well as how long the light stays on.

Does this exist? If not, could someone write one?

Rule Machine will do this.

1 Like

I have a Smart Lighting instance that does that.

  1. Select lights to turn on
  2. What you want to do: On
  3. How do you want to trigger: Mode Changes
  4. Turn on when mode changes to: Home
  5. Only during certain times: 30 mins before Sunset ending at Sunrise

Works great if you have an I’m back routine that triggers automatically when “Someone Arrives.”

1 Like

Thanks but I want to use a lux sensr and I do not want it to be a mode change. For example, if my wife is already home but I am on my way home from work, the mode would not change.

Where can I find the code?

search is your friend…

LOL, sorry, was being lazy. Found it and I’ll give it a try.

Thank you Mike.

The ST app crashes every time I try to install it…

If your wife is home would the light already be on?

I have a similar Smart Lighting automation created, but with a door sensor. Turns on the garage lights for 10 minutes between sunset and sunrise when the garage door opens.

1 Like

The app is solid, several hundred users at least including me, there’s two distinct apps that need to be installed.
You need to follow the install instructions to the letter.

This is how I have mine set as well. I also have mine set to turn on the light X minutes before sunset if the mode is home, which might help OPs concern that the lights wouldn’t trigger if his wife is already home.

Using a lux sensor seems needlessly complicated for this scenario. Your home gets dark the same minutes before sunset everyday. For this use case I’d set up a “Turn on lights when sensor arrives, but only X minutes before sunset.” As for how long the lights have been on, you can check the Activity Feed to see when they were turned on.

1 Like

I’ve found that the sunrise and sunset functions are very unreliable for me. My lux sensor is always spot on and I can also trigger lights when it get dark from a storm.

Ok, so I have the app set up properly after using the instruction this time. Now, I still have not been able to figure out how to set up what I need. Just to recap:

Turn on a light when anyone arrives in any mode when lux is below 20. Turn off the light after 10 min.

This is a very powerful app but I do not have the hang of it yet and I would appreciate help setting this first on up.

Thanks everyone!

1 Like

Yea, sunrise and sunset as event triggers are notoriously unreliable.
I’m with @onetrav on this one and for the exact same reason, overcast, storms.
The real test condition for lighting is LUX levels, I use it to drive the dimmer levels of all the dimmers in my house as well.

1 Like

I have this exact rule running
–Create a trigger, include all your presence sensors
–Create a condition on illuminance < 20
–Select the single condition (illuminance) as the rule
–set actions for true: turn on these switches and also turn on/off after delay

1 Like

Thanks Mike. That was exactly what I had!!! I guess we will see if it works tonight.

Thanks everyone. This Rule Machine app is pretty awesome! Should cover lots of my odd ball requirements.

Lights did not come on. Here are my settings. Any ideas?

sure, lux isn’t less than 20…
under define conditions the current state [true] or [false] is shown, so it’s not passing the lux test.
I use a lux sensor that’s outdoors so the interior lighting doesn’t mess with it.

I’m good now. Street light shines on the sensor so I just changed the threshold.

Thanks Mike.

1 Like