SmartThings Community

Creative ways to set night mode on alarm?


I have set up my change to Night mode with Motion Sensors and Rule Machine (note: No longer available for new installs. Check out CoRE if you do not already have Rule Machine.)

Here is my setup. It works great for us.



I have a “In bed” routine that I trigger by Alexa every night that turns all of the lights off in the house. I have a motion sensor in the bedroom, if no motion is detected for 1 hour then turn on Smart home monitor but the bedroom sensor is not included in the security sensors. If motion is detected after 5 am, run the routine “Good morning” and disarm smart home monitor. Works great for me! :slight_smile:


(Scott Shell) #10

I have a number of motion sensors throughout my house to control and automate lights.

I use a “Things Quiet Down” routine that looks at the motion sensors in portions of the house that we won’t be in after going to bed.

I know it wouldn’t work for everyone but it works pretty well for use since the dog sleeps in the same room as my wife and I…

I will also be installing a Enerwave SC7 in the bedroom that can be used to set scenes and run routines which could be done with a button press when we are ready to go to bed in the evening.


(Kevin) #11

Are SmartThings Routines officially supported by Alexa now (I don’t see it), or still using the virtual switch/group method? Thanks in advance!



Yes, I am using a virtual switch to run the routine, sorry for not mentioning that earlier


(Chris) #13

If you set up Ask Alexa, you can directly control routines and modes with voice commands


(Brian Smith) #14

I have it activate two ways…

Motion Detection - if there is no motion downstairs for an extended period of time after a certain time, it runs Goodnight.

I also have a Flic ( attached to each nightstand that when single pressed activates the routine as well. The Flic runs through IFTTT and I have an old iPhone that is in a dock downstairs that we use to control our Sonos. So, it is always on and the Flic softawre is installed there. I’m hoping that when bluetooth is finally activated on the hub, it might be able to work directly. But, IFTTT has been very reliable.

So, I can either manually do it or have it automatically happen if I forget. The cats tend to prevent it from automatically activating, so I’ve just gotten in the habit of pressing the button as I get in bed.

1 Like

(Ben W) #15

Your sensor must not detect movement in the bed. I have a sensor and rolling over triggers a motion event. First night I had it the motion trigger light was pretty bright.



It did take some trial and error but my motion sensor is on the floor, assuming that no motion needs to be tracked up high. Perfect location was under my bed based on the shape of the room

1 Like

(Nicholas Wilde) #17

I’m using Rule Machine (or CoRE) to look at devices that are commonly on when we’re awake at night (certain lights, TV, motion detector, etc.) and when they’ve been inactive for a certain period of time, the house goes into Sleep mode which is associated with SHM. I then monitor those same devices for activity while in Sleep mode and if any of them turn on, I change the house back into Night mode which disables SHM. My house has four main modes; Home (daytime and home), Away (daytime or nighttime), Night (home and nighttime), and Sleep (home, asleep, and nighttime). All of these modes are associated with SHM.


(Jimmy) #18

I’m in the Alexa->virtual switch->Goodnight routine camp. Use a fixed time for the good morning routine since our 2 year old wakes up at the same time every day. I also have a contact sensor on our bedroom door that disarms and re-arms SHM when in night mode in case we need to get our 4 month old, let the dog out, midnight snack, etc.

1 Like

(Ben W) #19

Interesting… No Pets I am assuming. My dog triggers my motion sensor.

But this is something to think about in my son’s room.

1 Like


destructure00, thanks for the post. I setup IFTTT and figured out how to make a virtual switch and make IFTTT set smartthings to night when I plugin my phone, but how are you able to only set it between certain times?

Thanks for helping!


(Chris) #21

You can do this with either the Smart Light app or CoRE, they both allow you to set restrictions on activities. I personally am using CoRE since I am working with a combination of my phone and my wife’s, but Smart Lighting would work too if you’re just using one phone. So in your case, for example, your Phone Charging switch would trigger a Bed Time switch, but only during a fixed time window. Then you set up your Bed Time switch to trigger the Goodnight routine.

Here’s a screenshot of the restrictions in Smart Apps

Here’s a screenshot of the CoRE piston I’m using to trigger the Bed Time virtual switch, which then triggers the Goodnight routine. Each of the Chris and Jody charging switches are set by IFTTT. Hope this helps.

Here’s the final piece where the Bed Time switch sets different routines.

1 Like


I use Routines to trigger night mode. It turns off the lights and sets the thermostat temp based on the time I set. When I go to bed earlier than the set time, I just tap the routine in the app. I normally check my phone for battery amount, messages, calls alarms etc right before going to sleep anyway so tapping the app is no big deal.

I have a spare motion detector I might set up in a box on the night stand to trigger night mode and good morning mode.


(Joern) #24

Hi destructure00

your solution sounds very interesting. Could you please explain how do you trigger if your phone is charging or not? How do you set the virtual “Phone Charging Switxh” to on or off?

Thanks in advance


(Chris) #25

I use IFTTT on each of our phones. The recipe says if the phone is charging, turn on the virtual switch, and if it’s not charging, turn it off.

Since I needed to consider both my wife’s presence and phone and mine, I am using CoRE to conditionally set the “Bed Time” virtual based on who is home and what the charging states are. It’s set up with a mode restriction of Home only (so if we are on vacation and someone is house sitting, it doesn’t shut everything down on them when we go to bed), and a time restriction of 9:00pm to 5:30am.

Then I use the “Switch activates home phrase” smart app to run the Goodnight routine when the Bed Time virtual switch turns on.


(Joern) #26

Thanks for the very detailed and hepful description. One additional question from my site?
Why do you use the “Switch activities home phrase” smart app instead of changing the mode directly with CoRE? Should also work directly in CoRE?



(Chris) #27

Good point. I think I set this up originally before I had installed CoRE. Maybe I can consolidate now and eliminate a step.


(Joern) #28

Yes I think may be better to use only one simulated switch (for each phone) and changing directly from CoRE.
Thanks for sending the CoRE logic you developed. Afrer the Then path there is an Else path to switch the “Bed Time” off, isn’t it?