Best practice for motion-detected and user-operated lighting?

Without delving into how to achieve this in WebCoRE, I wanted to see if there’s a consensus on how the user-experience should be for a smart-light which we want to be motion-activated and user-operated.

For example, suppose that I’ve got a motion-activated dimmer which, upon motion, sets the light to 25% and then turns the light off after X minutes of no motion.

  • Clearly, we wouldn’t want the motion to set the light to 25% if the light were already brighter than that.
  • What if the light were already at a level lower than that?
  • Should the auto-off action be skipped if we sense that the user has adjusted the brightness away from the auto-on level? Or should we only skip auto-off if the motion detector isn’t what turned the light on?
  • If so, should we only suspend auto-off if the user has set the light to brighter or if they have set it to dimmer, too?
  • If the user manually turns the light off, should that prevent motion auto-on for X minutes?

I realize that people aren’t going to have 100% agreement on these answers, but I’m just trying to get a general feeling for which behaviors strike people as particularly intuitive or un-intuitive (where the motion-sensing portion seems to be fighting against you). Were there any rules like this that people found worked particularly well or poorly?

Different people have different ideas about this. Seriously, there are going to be people who love one option that someone else absolutely hates. :heart_eyes::rage:

You can see some good discussion about this, including the differing viewpoints, by looking at the discussions that came up regarding a smartapp from several years ago that automated bathroom lighting

1 Like

By the way, for the specific example you gave, our household handles it a bit differently. We have lots of people coming and going (we are three housemates). We need things that are intuitive, handle a lot of different situations, and that work for people who are just visiting.

simplifying the rules designed by using two devices

So for a situation like you are describing, we would have two different devices.

We would have a nightlight that has a lux Sensor, is only activated by either motion or voice or opening the app, and that automatically comes on with motion as long as the room is dark and turns itself off after X minutes of inactivity.


Then we would have a separate room light which can be turned on either from the switch or by motion (or voice or app) but which, when turned on from the switch, always comes on to 75%. And when turned on from the switch, cancels any existing pending turn off because of motion inactive.

Anyway, the point is if we just want a dim light, the nightlight takes care of that. That way we don’t have to have a really complicated logic for all the different light levels.

I’m not saying that would work for you, I’m just saying that’s how we would handle it. Sometimes it’s easier to have two devices with their own sets of rules than trying to do everything with one device. :sunglasses:

yet another option: change the choices on the wall switch

By the way, there are other people who would do a similar thing but using a button controller on the wall with different preset scenes. One for 25%, one for 50%, one for 75% etc. that way you are changing the behavior of the person using the wall switch by making them select the level that they want. But that approach tends to work better for people who live in the house than for guests. Choice is good.




Simple answer is to delve into webCoRE…


It all boils down elsewhere than you think :smile: Reliabily vs. ease of setup vs. maintenance and NOT so much on rule complexity. Confused? I am sure you are.

Here is the bottom line. Over the years, I started with very basic automation, then I discovered Groovy and later came Webcore. Starting simple was great, but then I was tempted to push the limits of automation, first by writing my own apps, then using webcore. It worked well, until the cloud hit a bump or two and things broke down and reliability plunged along with family acceptance factor.

Then I realized that the charm in home automation is not how complex your rule is, but how simple and reliable is. Sure, you can implement certain conditions with different light levels but what matters most is to know that lights come on when you need them and off when you don’t want them. And reliability like that can only be achieved with local processing. As much as I hate Smart Lighting, it is the only app I have been using for years now. You cannot achieve the level of complexity you want, but surely the lights will come on and off as you’d expect. And it might take 5 instances to achieve what a simple piston might do, but it can be done.


I find it best to work back front the intent. What conditions do you envisage? Write them down and then look for contradictions where situation A messes up what you intend for situation B. Once you have that it makes putting the logic together in webcore a little easier.

Personally I find the simple control of a device a little boring. It’s the automations that make life interesting.


As @JDRoberts says, “Choice is good”. I use SmartLighting for a bunch of simple stuff, however, if that’s all I had, I would not be still with SmartThings. If it was just a matter of turning on/off, a “dumb” occupancy sensor works better than anything I’ve used. Yes, I have them in closets, laundry room and a couple of other locations. However, I want Smart! Smart I say!!! :rofl::rofl:


LOL…You have to pick your battles. There are plenty of Smarts you can do in SmartThings that don’t tank your family acceptance factor, so you can do more and more “smarts”. If no motion for 5 minutes then dim the lights to 50%, wait 5 more minutes then turn off, can be done with Smart Lighting with fast response time and without internet. Now, that’s your challenge for the day. :slight_smile:

And besides your occupancy sensors cannot be restricted by time, lux, dim level, switch. You said you want “Smart”? I want whole house Smarter not only my lights.

This is a very timely discussion. My bathroom renovation is complete, and I’m trying to conceive of ways to operate smart lighting automatically and… ‘smartly’. To me, it should of course be off unless people are in there. But how to get that established - without being intrusive on peoples’ privacy??

Perhaps a combo motion/humidity sensor. Put it on the ceiling. If motion occurred within the last M minutes (perhaps five?) OR humidity is increasing or is staying above H level, then the lights stay on. This would account for sink/toilet use (motion), while the humidity sensing would handle the shower.

I’ll have to think on it.

How many switches? I have 4 switches and 2 motion sensors in my master bathroom. Humidity, motion and lux levels are all important. You want the fan to run at certain times, the lights to stay on long enough when you need them at appropiate times, and the proper light level during the night, so it doesn’t hurt your eyes…