Hi there. I’m new to SmartThings and like what I see so far. I like to tinker and am trying to make rules that are quite specific. I’m experimenting with a lamp in my office. I would like to have it turn on when it senses motion - that part works great. But I would like to restrict it so it will only do it when it’s dark out. I’ve got it set up so it will trigger after sunset, but that’s only half of what I’m looking for. I’m often up quite early - before sunrise. I’m having some difficulty figuring out how to setup this last part. Can anyone assist?
Welcome! Tinkerers generally do very well with SmartThings.
What method are you using for the restriction: Hello Home Action, Shortcut Groups, Smart Setup smartapp, or custom smartapp? Different options are available with each.
It also depends whether you want the light to also come on during the day if it’s a certain level of darkness. There are community members who solve this with hardware by adding a luminescence sensor, which is the easiest way to tie it to the specific amount of light in the room.
But if you’re only looking for something that runs at night, then many people will just tie it to the mode, or a time range. For example, at my house, the mode "night " is different than the mode “asleep.” When the house is in night mode, motion turns on the overhead lights. But when the house is in asleep mode, motion just turns on a softer nightlight. That way somebody going to the kitchen for midnight snack doesn’t wake up the whole house.
So it also depends on the details of what you want.v
Thanks for the information. I am trying to configure this by using modes, but I’m not sure that’s the right approach. My initial thoughts were to have the usual Away/Home/Night modes but include Morning and Evening modes. The thought there was these would cover the “I’m awake, but it’s dark out” scenarios (i.e. before sunrise or after sunset). I don’t see anyway to set it for before sunrise - it seems to only support after sunrise. I guess ultimately a luminescence sensor makes the most sense, then that will cover heavy cloud cover in addition to time of day.
Based only on my short study of the app, it seems like it will get you most of the way to where I’ll want to go. It would be nice if it included AND, OR, NOT boolean logic. I guess that’s where SmartApps steps in. I’ll have to add that to my to do list…
It just depends on exactly what you want. Luminescence sensor is based on a specific measurable event: how dark it is.
Modes give you the option to change the value based on all kinds of different things, including just a manual decision.
At our house, for example, I change the smartthings mode from Night to Asleep when I go to bed. That could be at 8 pm or 3 am. It could happen while it’s still fairly light out in the summer. But that serves our purposes.
Oh and a hello home action let you set a before sunrise restriction, but I don’t think it lets you set the range with both a sunset start and a sunrise stop. So you have to pick either sunrise or sunset as the trigger to start the hello home action. You’d have to combine it with mode and use a second hello home action to change the mode.
So you can do it just using the SmartThings mobile app, but you have to set up two separate hello home phrases.
Thinking more about this, in order to give me the most flexibility going forward, personally I would probably think of this as three distinct rules.
A rule to put the house into “night” mode
A rule to put the house into “day” mode, which most people call “home.”
a rule to have motion turn on the light, restricted to only run in night mode
Then you can have lots of different ways of setting those rules. Certainly you could easily do it with the official mobile app using hello home actions.
So you might have a hello home action that is triggered a few minutes before sunset and changes the mode to night.
Then you have a separate hello home action that is triggered a few minutes before sunrise and changes the mode to home.
Finally, you have a third hello home action that turns the light on when there is Motion, but only if the mode is night.
Although that does end up requiring three separate hello home actions, it gives me a lot of flexibility, because I can then use those modes as restrictions on many other rules.
But there are many different ways to do this. Some people prefer to have the whole rule set in one custom smartapp. I like to break out the parts so that I can reuse each part. But there’s no reason to pick one way over the other, it’s just personal preference.
That’s actually how I have it setup now, but I’ll ultimately need to figure out a different way. The primary reason I am evaluating SmartThings is because I hope it will solve my programmable thermostat woes. I work from home and have a very dynamic schedule. The geo-fence seems like a perfect solution as it will adjust the thermostat based on whether or not I’m home. I’d also like it to adjust during sleeping and awake times. The automation aspect is a huge bonus.
Since I don’t go to bed at sunset, I’ll need a way to differentiate between awake while it’s dark and sleeping while it’s dark. The luminescence sensor seems like the best solution I’ve heard so far.
I very much appreciate the advice though, so keep it coming. Thanks!
There’s an official SmartApp somewhere called Smart Night Light that does just that! Sorry I don’t have a link for it.
[quote=“mgates67, post:1, topic:20516”]
But I would like to restrict it so it will only do it when it’s dark out.
[/quote]I use “lighten dark places” along with the weather station tile as my light meter. The tile uses your local weather to simulate a light sensor (or, you can just get a light sensor ) -
anyway, you can set things up so a light (or lights) come on when there is motion and the lux level is above a threshold (100 lux seems to work well for me - that’s dusk/dawn.) All my “automatic” lights use this approach, and it’s pretty much foolproof.
List of officially published smart apps: