Different Actions for Different Times of Day for Lights


#1

Hi all - I’ve searched and can’t find this, but I’m assuming it’s out there and maybe this will be a quick suggestion from someone.

I have light switches turning on lights in my master bathroom based off motion. Simple enough.

My house goes into “Evening” mode on schedule every day at Sunset. During evening mode, I’d like my lights to come on at 100% brightness (no dimming).

Every night when I lay down in bed I use the “Good Night” action in Hello, Home to put my house in Night mode. During Night mode, I only want my lights to come on at 20% brightness.

Right now, I am simply using the “Turn on the light when there is motion” feature to accomplish the dimming overnight.

My problem is, that it doesnt allow you to set the dimmer to 100% during Evening mode, and 20% overnight. You can only set one dimmer level and then tell it what mode.

Smart Night Light looked promising, because it would decide whether or not to turn the lights on based on the lumens in the bathroom, until I saw that you can’t set the dimmers, and you can’t tell it to do different things in different modes.

Do I have to write a custom SmartApp for this?

Thanks!


(ActionTiles.com co-founder Terry @ActionTiles; GitHub: @cosmicpuppy) #2

The current “simplest” way to do this is just install multiple instances of the same SmartApp.

A switch/dimmer can have unlimited apps controlling it, even if they overlap. Yup… It can be hard to figure out what’s installed a running, but each instance of “Light Turn On Schedule” has an on-time, day of week, applicable to mode and dimmer level.

That app will depend on you using something like a Hello Home Action to set the mode (day, night, evening, away…).
… Terry


(Mike Maxwell) #3

I run my dimmers using an Auto Dimmer app I wrote.
It re-adjusts the dimmer levels (up and down) when a dimmer is turned on.
It has 3 Lux settings which map to 4 selectable dimmer levels.
Each dimmer also has an override feature allowing different dimmer settings per dimmer, should you need to…

You turn on your dimmers via whatever smart app you want, this app sees the ON() event then adjusts the dimmer level to the settings you specify based on the LUX settings you specify.

https://github.com/MikeMaxwell/smartthings/blob/master/AutoDimmerApp.groovy


#4

@tgauchat - yeah, I figured that might be it. So, in order to do that, I guess I actually need to create my “own” smart app (From Code) with the same code as the “Light Turn on With Motion” template, call it something else, and install it?

I don’t think the existing setup in the ST app will allow me to install the same app twice, right?

If I can do what I described above, I should be able to set a unique dimmer level for Evening, and then Night mode, with the two separate apps, as you described above.


#5

Hey @Mike_Maxwell - thanks for the note! That would be useful if I didn’t want the dimmer levels to be different based on the mode. Unfortunately, in my situation, the Lux level in the room is the same for half of Evening mode (say, maybe 6-10pm), as it is for all of Night mode (10pm - morning).

So, unfortunately, I can’t base the dimmer level on the amount of lux measured, because it’s 100% dark outside for like 5 hours right now before I go to bed (all of which I want 100% lights on for). I only want 20% AFTER I put the house in night mode, at which time it’s already been dark for several hours.


(Bruce) #6

@Luke_Perrie, I have an app that does this also, called Mode Lighting. It works with three modes, and adjusts the dimmer levels to 3 different levels based on mode. If lights are on at mode change, they are adjusted to the new level. It has motion activation, master and slave dimmers (for rooms with multiple dimmers), and a few other features. See this thread: Could use some direction on time-based dimmer.


(Bruce) #7

And, you can install as many instances of an app as you want. Apps that control lighting tend to have an instance per lighting area or room.


#8

@bravenel - thanks so much man! I’ll try your Mode Lighting app out and see what happens.


(Bruce) #9

It’s a work in progress. Private Message me if you need help… :smile:


(ActionTiles.com co-founder Terry @ActionTiles; GitHub: @cosmicpuppy) #10

Incorrect assumption, Luke! :smile: – Each SmartApp can have an unlimited number of instances installed, even all with the same name!

There are options when writing a SmartApp to let the user give them a unique name and/or icon, but that is not required to allow multiple installs.

So you should not need to create “two separate apps”!

Give it a try and let me know …


#11

Hey @tgauchat - thanks for the note! Here is the problem I run into: (screenshots below)

So, I have my Dimmer Switch installed, of course, and named it “Master Bathroom Light.” I went through the setup in the ST app and configured it (I think using “Light Turn on Motion” to come on at 20% during Night Mode (it’s off the screen at the bottom of that one screen shot).

Now, what I need to do is use “Light Turn on Motion” again to set that app to turn on the lights at 100% when it’s in Evening mode (between Sunset and when I put it in Night Mode)

See screen shot - when I tap the "plus > Actions> Lighting > Turn on When There Is Motion >, it says “Already Configured - Master Bathroom Light.” So I can’t add the other Smart App!

How do I get that other Smart App (Light Turn on Motion) installed AGAIN so I can use it for Evening Mode?


(ActionTiles.com co-founder Terry @ActionTiles; GitHub: @cosmicpuppy) #12

Good question, Luke – I’ve done multiple installs with various other SmartApps, but each is a little different in the way they are configured.

So I’m going to do a couple of experiments and confirm if what I’m thinking of works, or if there’s an alternative workaround needed. Check back here soon :wink:.


(ActionTiles.com co-founder Terry @ActionTiles; GitHub: @cosmicpuppy) #13

@Luke_Perrie: BTW: Don’t hesitate to drop a line to Support@SmartThings.com anytime too, if you want – those guys have experience with these types of questions and are either experts and/or know the internal engineers to team up with to get you some options.

I’m just here because I enjoy the challenge and to expand my knowledge of the different ways to accomplish things with ST.

tty soon,
…Terry.


#14

Hey man! No need! I found a shared Smart App that literally does EXACTLY what I need. It’s called Dim and Dimmer. It lets you set the dimmer level per Home mode. Got it installed and it works like a charm! Thanks so much for your help.


#15

Also - thanks for that note on contacting ST support. I didn’t know that they would help with specific situations like this for “kind of know what they’re doing but not really” dummies like me :smile:


(Geko) #16

You can do this with my “Dim and Dimmer” smart app. It allows to set dim levels individually for each mode.

https://github.com/statusbits/smartthings/tree/master/DimAndDimmer

P.S.
I see you already found it while I was typing :slight_smile:


(ActionTiles.com co-founder Terry @ActionTiles; GitHub: @cosmicpuppy) #17

No problem – the range of questions and issues they must help with must be incredible. STs goal of “easy out-of-the-box setup” probably doesn’t apply to everyone, of course; but when it comes to the selection and power of SmartApps, that’s where they’ve got a big challenge to keep on top of all the ways to do things. Not sure Support would have known about “DimAndDimmer”, for example – so I know they’re grateful that we make these Community contributions and discussions.

A happy little SmartThings’s world :earth_americas:!

I’m going to take a look at DimAndDimmer myself, actually – and compare it to what can or cannot be accomplished using the published stock apps. Thanks @geko for chipping in!

…CP.


#18

@geko - hey man: Dim and Dimmer is working great for me! I just had a follow up question. So today, at my house, it was dark and rainy outside all day. I had my Dimmer levels set using your app (99 for Evening Mode, 20 for Night Mode, and 0 for Home mode, which is most of the daylight part of the day). So, this normally means that during the day, I don’t have my lights turning on. However, today it was dark enough to have them come on almost all day. Additionally, my Good Morning action triggers the house into Home mode at about 7am, and this morning, it was dark because I wasn’t in Night mode any more.

I have an Aeon multi sensor in the bathroom that can sense lux. Would it be an easy code addition for your app to have it check lux, either INSTEAD of house mode, or IN ADDITION TO?

For instance, the PERFECT situation for me, I think would be for the app to set the Dimmers based on the lux reading from the Aeon multi sensor. The only reason I have it based on Home modes right now is because they pretty much follow the amount of light for the day.

I would love to be able to say:

“When in Home mode (most of the bright part of the day), don’t turn the dimmers on UNLESS there is less than ( x ) lux in the room, then turn them on at the appropriate level for that House Mode.”

Said another way: "if there is motion in the bathroom during Home Mode and lux is below (x) amount, turn the Dimmers on at (x) level. Or, if there is motion in the bathroom during Night Mode, always turn the Dimmers on at (x) level (because I know it’s always dark during Night Mode).

This would take care of situations like today, where it was dark in the bathroom all day due to the awful weather outside. Sometimes, even when setting the dimmers based on Home mode, I still have to manually turn them on because it’s too dark in the room.

Does any of that make sense? Lol.


(Kyle Newton) #19

I’ve been looking for something like Dim and Dimmer - thanks!

I’ve noticed a problem, though – when I change modes it is turning on all the lights I have set up in dim and dimmer and setting them to the dim level I have set. Have you run into this? I would just expect the dim level to be set without turning on the bulb.


#20

Hey dude - same exact thing happened to me. Plus, I came to realize that Dim and Dimmer didnt solve my problem for when it was dark outside like on rainy days, because it didnt read the lux level in the room before deciding to turn on the lights or not.

I use Bright When Dark And/Or Bright After Sunset now, which checks the lux level first (off my Aeon Multi) AND checks mode before deciding when to turn the lights on, and at what level.

It’s not perfect, but its the best yet.