Using a virtual switch to control room specific mode?

I’m looking to get started on this app, but figured I shouldn’t waste my time if someones already developed something similiar. The basic scenario would be to have a virtual “motion” switch. My attic is used for guests right now and not much else the rest of the time. I’d like to have a switch that controls the lights via motion sensor, until the guests turn the virtual switch off (with a minimote) then the lights stay off. In the morning they could turn the switch back on with the minimote to resume normal function. I would normally accomplish this with modes, but I want the rest of my house to function as normal, so different people could go to bed at different times. I’m sure people have encountered this problem before, and I’m interested to see what kinds of solutions have been developed.

@bravenel has posted something similar to the forum A couple of times, hopefully he’ll chime in, but he does this with a virtual switch. Works well.

There have been several variations on this, depending on specifics of your use case.

It sounds like you want motion activated lights, where through some simple mechanism the motion activation can be disabled, and then later, re-enabled. Is that correct? A further subtlety is whether you want to use the motion becoming inactive to turn the lights off. If so, then one way I’ve done that is to simply turn off the light manually as the key to disabling motion-on. Then later, turning it back on and allowing the motion-off automation to turn it off, restores it to normal functioning.

But, there are other ways, and your idea of a Minimote would work very well. Your idea of using a virtual switch would work, that the Minimote would turn on and off to enable and disable the motion logic. You would still need a little custom app and another virtual switch to intercept the motion on / off events and filter them based on your enable /disable condition. Easy to do. Advise if you want help with the code – not much to it.

See the code in this post for an example of a similar use case: Disable lights turn off when motion stops

2 Likes