Creative ways to set night mode on alarm?

I have done this 2 ways.
I used tasker, sharptools on the phone with a virtual momentary button in smartthings. Trigger on plugged in for good night. Then trigger phone unplugged for good morning. Worked well as long as I am the last one to bed.
Right now we are testing / using an alternate method for goodnight. I took an old phone and set it up on our headboard. I set up a custom screen using smarttiles with 3 buttons using the whole screen, Good night, ceiling light, ceiling fan. Then we can trigger it from the bedroom once there. Then everything locks up and turns off.
I had also experimented with using gentle alarm (my alarm app) to trigger Good Night (alarm on) good morning (alarm dismissed. )
I am in the process of trying to change how and when good morning triggers depending on if I or my wife will be up first. My week days off she would be up first. I have it hooked to Google calendar so smartthings knows when we work by virtual Switches being on or off. Been working alot lately so haven’t finished it up yet.

I have not built one of these yet but I think that’s the coolest way to do that…
Instead of controlling lights you set scenes.

1 Like

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:

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.

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

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

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 (https://flic.io/) 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

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

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.

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

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!

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.

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
Joe

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.

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?

Thanks