Three switches and a motion sensor

Iā€™ve never tried to set up a complex rule before and Iā€™m not quite sure which bits and pieces I need to put together to end up with rules that do what I want.

I have a bedroom with a ceiling light and two lamps (one on each side of the bed). I currently have a motion sensor that triggers during the day/evening to turn on the lights in the room. I also have three of the ERIA Smart Wireless Dimming Switches: one on the wall at the entry and one for each of the lamps. Everything is working with a combination of Button Controllers and Motion Lighting Apps currently, but Iā€™d like to put together a rule (or multiple rules?) that makes everything work with the conditions Iā€™m outlining below.

Iā€™m open to suggestions on these conditions, too. These are just something I came up with while thinking there has to be a better way to get motion sensors and switches working together to handle cases where someone is in bed or at a desk and only moving occasionally without having to worry about the lights going out, but while still maintaining the ability for the lights to go on and off for a minute when someone walks in to grab something.

  • If someone does any ā€œonā€ presses, I donā€™t want the motion sensor to turn off the lights if motion goes inactive, except possibly after a relatively long delay that would probably only happen if someone left the room without turning the lights off (say 15 minutes)
  • Iā€™d like each of the lamp switches to control their respective lamp lights only (maybe I could extend that later with a double/long ā€œoffā€ press to turn off all the lights)
  • Iā€™d like the wall switch on button to restore both of the lamps to their previous on/off and dimmer states, but with a second (or long) press, turn all the lights on while maintaining the dimmer levels
  • Iā€™d like the wall switch dimmers to only adjust the ceiling light
  • Iā€™d like the wall switch off button to turn off the ceiling light only, but with a second (or long) press, turn off all the lights (but keep the lampsā€™ on/off states and all three lightsā€™ dimmer states for future ā€œonā€ presses)
  • Iā€™d still like the motion sensor to turn the lights on if theyā€™re not already on (basically do the same thing as pressing the wall switch on button), but only for a minute or so after inactivity

Iā€™d eventually like to use whatever general pattern I come up with in other rooms if I buy more of the switches (right now everything else is just motion sensors).

Is this possible or am I overcomplicating things? Does anyone have any suggestions for me to play around with? Iā€™m fairly sure Iā€™m going to need variables to keep track of various states, but Iā€™m not quite sure where to start.

Welcome to Hubitat!!!

So, first of all, your ERIA "switches" aren't really switches to Hubitat, they are button controllers. The great thing about button controllers is that the action is taken when you press the button. If we were talking SmartSwitches, that would be a very different story.

What app are you currently using to control how your ERIA control your lighting? And what app are you using to control your motion lighting? Or haven't you gotten quite that far yet? Depending on what you have set up already there might be easier and harder ways to get where you want to go. But I can see this taking 4 RM 4.0 rules to set up.

So, what you have described is going to be a very complex set of rules to set up in RM. I would like to ask first, what type of lights are being controlled? Are these smart bulbs? Dimmers? lamp modules? If bulbs, do they have color or color temp that you might have to worry about?

You don't actually need variables to keep track of states, depending on what types of devices you are controlling. For example, most smart bulbs and dimmers will turn back on to their previous dimmer level if they are simply turned "on". But not all of them. So the types of devices you'll be controlling is going to be very important. The last thing you are going to want to try and do is to capture things in variables and reset them to that level.

Just as a side note, while you might think that you want lights to return to your previous level, I have found that more often than not I want them on to a particular level depending on the time of day. For example, if you walk into the room during the day and the motion sensor turns on the lights to their last levels but last night you had the lights low because you were watching a movie in bed, you would have to go over to each bedside lamp dimmer and to the wall switch in order to get all the light up to 100% to see well enough. That isn't very "smart" lighting. if you are going to control them all manually, then why bother having them at all.

Also, one thing to consider is this. If you are in the room already, the lights will be on. You won't have to turn them on via any swtich.

I'm not quite sure I understand this. So, you would only turn on the ceiling lights with the second push but the up/down buttons to control the ceiling lights?

I think you have some great ideas but the one thing I would reconsider is the "on to previous level" idea. I think that you are going to find that you want the lights to come on to a specific level depending on the time of day. I control this via modes. In day mode, my office motion sensors activates work lighting which is very bright. When the house is in Night mode it comes on to much softer lighting. And in Sleep mode, it comes on barely at all because I'm usually only popping in there because I left my phone on my desk and don't want the bright lights to blind me. So, you might want to consider something like that.

But if you give a few details on what type of devices each of the lights are, i could give you a few starting points to get you started.

Thanks for taking a look at this!

I'm using the Button Controllers app right now, which is working well for me. For the motion I'm just using the Motion Lighting Apps. They work fine together, but the problem that made me think about this whole situation is that when someone is in the room for a long time, lack of motion essentially "overrides" the button controllers.

Everything is Philips Hue bulbs. Only the ceiling one is a color bulb. The lamp bulbs are just white. I've been using the Hue app on my phone to control colors (and I've been playing with Dashboards).

I think you're right. I am already using modes and it would make more sense to configure levels based on the mode.

That's what I was thinking, but it may not make sense. I'm trying to figure out a logical way to use the "master" button controller to control both the ceiling lights and the lamp lights, but there may not be a clear way to do that.

I'd appreciate any pointers you can give me. Even just an idea of which parts of this to break out into which rules would go a long way toward getting me started.

"Three switches and a motion sensor" sounds like some odd love triangle, quadrangle love story movie title.

2 Likes

What do you mean? Have you looked at the "buttons to disable off" and similar options in Motion Lighting? I'd take a look the docs to see all the possibilities but with particular attention to this family of options.

Ha! I never noticed that. Thanks, you've just saved me a lot of trouble. :slight_smile:

1 Like

@bertabcd1234 beat me to it! But one thing I wanted to point out was that if you wanted to control your lights differently depending on the mode you are in and have different levels for the overhead versus the lamps, you might want to look at using RM for your motion control. It will definitely provide a lot of versatility to your options.

For example, you could enable a longer timeout when the buttons are pressed rather than totally disabling off. That way, the lights will still turn off automatically. Also, doing so, you can default back to the shorter delay as soon as the lights turn off. This can be done quite easily via a boolean variable, say "extended delay". Also, in RM you can set the delay by mode. So, you can have a different level of timeout based on what the mode is set to.

1 Like