Regular visitors will know I have had problems with a Frient motion sensor and using its illuminance sensor to trigger lights in my kitchen. I have given up on that ever working and won’t be buying any of their products in the future.
However, it occurred to me that I could get the same result by using the Night location mode in conjunction with the movement sensor. I now have a routine to switch location mode to Night at 30 minutes after sunset and another to switch to Home at 30 minutes before sunrise. The former works fine, but the latter never runs. It works fine if I run it manually.
I control my hall lights based on the brightness levels of my outdoor sensor.
I have two routines which run to switch on or off a virtual switch based on outside brightness.
I find this more reliable as brightness levels inside can be affected by interior lighting levels. Seems to work well enough for my needs. My hall isn’t the brightest so lights come on a lot except on sunny days.
Select the time period and confirm - In this step, please select “Until turned off”, once the team finishes, we’ll let you know so you can disable it again.
Have you re-saved the Routine since it first failed to run? We are not party to the implementation details of Routines and would be quite plausible for a Routine to be responsible for scheduling its own next timed execution, and so ‘stop’ if something prevented it working once. I don’t find that a particularly convincing thought, but it is plausible.
It has never successfully run. I have changed it from 30 minutes before sunrise to 29 minutes before sunrise and saved it. Let’s see what happens in the morning! It is obvious that it hasn’t worked if the light comes on, as I enter the kitchen after sunrise.
Indeed! Two routines set location mode to night or home as appropriate. A motion sensor uses Night mode as a precondition to switch on the kitchen lights when it detects movement. Simple as that. That routine seems to be working perfectly, I just need to get the location mode to switch to home so the lights don’t come on during the day.
Yes, that is interesting. I had considered a.n.other automation might be changing the Location Mode straight back again but I couldn’t think why it wouldn’t also do it when the mode was changed manually. If you add ‘Routines’ to the filter it should see if any Routines or Smart Lighting are getting involved.
Do you have anything going on to link Location Mode to the Security Mode/Home Monitor? I have Routines that change my Security Mode based on the Location Mode and I’ve just noticed that those Routines aren’t being shown in the general app History any more, though they can be seen in the History tab of the Home Monitor. That is worrying.
It does show the ‘Mode to Night’ Routine being activated, twice, just after the Location mode changes to Home. What’s that?
What I am rather expecting to come across is a Routine that says something like:
If
Location Mode is Home
and
Some other condition
Then
Set Location Mode to Night
The Location Mode would need to be a precondition in that case so only ‘Some other condition’ triggers the Routine. ‘Some other condition’ would have to be something that happens to be true when the Routine runs in the morning.
Great spot! No idea when I created it, but the routine was exactly as you expected. The routine set location mode to night if the time was between sunset and sunrise and location mode was home. That’s why it set it back to night when the routine set it to home 30 minutes before sunrise, but not when I manually run the routine after sunrise! I will check in the morning, but that looks like the solution.
It’s a virtual device you can create in SmartThings, you can then use it to control something in a routine or to store a state.
Here I have a virtual switch called “ItsBright” and I change it to “on” when the brightness level from my outside sensor goes above my chosen threshold.
I have another routine to turn the virtual switch off when it’s below the threshold.
Then I can control the hall lights by looking for movement detected on one of two motion sensors and itsbright is on.
Location mode is primarily intended for house states like home, away etc