Overriding Reactor "night" scene

Hi.
I’m relatively new to Reactor. I am creating a “night” scene, where the bathroom light comes on, for 30seconds, @25% when triggered by a motion detector (sunset to sunrise). A variable I wish to add is if I turn the light on manually, (via the wall switch) at a higher brightness, I do not want the detector/scene to revert the light back to 25%. I need the switch to override the scene. I created the scene via creating a Motion ON and Motion OFF group, as per your YouTube video.
Thanking you in advance for your assistance.

Simon

Try adding another condition to your AND group:

[Device State] [Wall Switch] [Off]

Thanks Libra Sun.
It seems that I can only select a device (ie: light/relay/dimmer), not the actual light switch. I’m thinking I need to incorporate a “virtual switch” in this scenario, but not sure how?
Perhaps the sensor needs to trigger the virtual switch?

I was under the (perhaps mistaken?) impression you had a Vera-connected Z-Wave wall switch in use here. If so, judging from the screenshot above, I’d think that setup works.

That is, your Reactor routine might run when the sensor first detects motion (while the light is still off) during the assigned hours. Once the light is on, then your third condition goes false, hence the routine cannot fire again. Thus, if you were then to bring the light to full brightness manually (using the wall switch), then the routine would still be barred from running again.

Does this setup not work according to plan?? Am I missing something?

Be careful here, too… if the switch is in the “hot zone” of the motion sensor, you’re never going to successfully, consistently control it manually. The motion sensor will likely fire as you’re reaching for the switch and that goofs everything up. If the switch is in the hot zone, you need a different approach.

2 Likes

Thanks Rigpapa. Considering this scene is within a bathroom, yes, the switch is in the “hot zone” :frowning: Being the Reactor Master, do you think this is possible to achieve using Reactor, or should I consider a different approach? Prior to commencing this, I assumed this scenario would’ve been quite common for today’s smart home setups. TIA

Thanks Libra Sun. Yes, unfortunately I have a “dumb” switch controlling a dimming device. Turning the light on, or overriding the dimmed light via the push button is not a problem. The issue is re-triggering the scene (ie: stopping the light from dimming down to 20% and turning off after the allocated time) one the wall switch has been used.
The scenario for the scene is:

  1. Wake up middle of the night to go to the bathroom, and light turns on at 20% for 40 seconds. Finish your business, wash your hands and leave. Lights turn off.
    If movement/re-triggering occurs, timer restarts
  2. Walk into the bathroom at night, light turns on at 20%. Decide to have a shower, or require brighter lights, press switch and ramp lights up to desired brightness. Lights remain at new level. Manually turn light off upon leaving. Realistically, by manually turning the light on, the scene gets cancelled.

Not sure if this is too advanced for Vera? Hopefully there are smarter people on this forum than I.

In that case, I vote for letting your third condition be:

[Device State] [Bath Light] [CurrentLoadLevel] <= [20]

This would allow the routine to trigger/retrigger from a dimmed or Off state, while barring it from running any time you’ve brightened the light above 20%.

It is common, but it doesn’t matter whether you use Reactor or any other tool, the fact that the switch is within the hot zone of the motion sensor demands a different approach, at least for night-time use. If you don’t care about manual operation at night, then we can fix you up. So, what’s the story?

2 Likes

This should work you set the night time level in the run lua false activity.

2 Likes

Thanks for taking the time to respond. Yes, the manual operation is required, as showers etc usually occur during the "night " period. What do you mean by “demands a different approach”? Is this in relation to hardware or software??

Thanks ElCid.
I’ll definitely give this suggestion a try. Out of curiosity, where do you find these script examples? Not having a scripting/coding background, I really want to learn more, but the resources I find online seem very limited.

http://wiki.micasaverde.com/index.php/Scripts_for_scenes?fbclid=IwAR3oy-qGEcpPlOsvb5iWzYATwv3bdwep3Ol9peg4fNkAMjyo8rWwSJY_5FA

Think about this: you walk in to the room and before you can touch the switch, the motion sensor has tripped and turned on the light to the dim level. The light is now on. The switch is therefore on. So you cannot now turn the light on manually. It’s already on.

The only things you can now do manually are turn the light off, or change the brightness. In your night automatic cycle, you need to use one of those two possible actions to lead into a manual mode at full brightness. That’s why I mean by different approach – you need to align your thinking to the state the switch is in when you want to change it, and in your case, it will be on, because the motion sensor will always beat you to it if the switch is in its hot zone. Here’s how you might do those two things in Reactor:

  1. Use the Reactor “repeats” condition option on the switch so that if it is turned on two times within a short period (say 15 seconds) – that indicates manual on at full brightness. So you would walk into the room at night, the motion sensor would turn on the light dimly, but you manually turn it off and then back on. Your ReactorSensor sees this and sets the light to full brightness (it’s already on).
  2. Alternately, have your ReactorSensor watch the load level of the switch, and if it goes above 20% when in auto mode, it switches to manual mode at full brightness.

My personal preference would be #1. I use the “repeats” condition option for all kinds of things (e.g. turn off 2 times within 15 seconds turns off all the lights in the room).

I am an electrician i used to code many years ago.

This reactor will turn on light when you walk in at loadlevellast, you can then set the level to what ever you want. The reactor will then hold the new level till the trip resets. At which point the load level is set to the default.

I wrote the reactor myself, i did not find it any where.

Thanks Rigpapa. Your description/understanding of how the light can be changed is correct.
Your suggestion “Use the Reactor “repeats” condition option on the switch”, are you actually referring to the “switch”? My options are only the light (#5) and the sensor (#6). My switch is not a z-wave switch, just a momentary press controlling the dimmer.
The idea of monitoring the load level, and switching to manual mode (if above 20%) makes sense to me. Would this be achieved by adding script to the Reactor Expressions? Where do I add the “20” to the expression?
I understand I may be painful, and I really appreciate your guidance.

What type of device is it? Does it appear in the Vera device list? Can you control it?

Are you talking about an accessory switch that’s associated with the dimmer? The dimmer is the Vera-connected device then? If that’s the case, then anywhere I referred to switch, just think dimmer.

No, you can test the dimmer level directly with a Device State condition (or at least, I asumme you can, if it’s a device the Vera can see and is controllable).

2 Likes

Rigpapa, if we didn’t have to worry about social distancing (and if I wasn’t all the way down in Australia), I would be giving you a big hug ATM! Thanks for your tips. I have success!! I will definitely be trying to create more scenes via Reactor. Thanks!!

2 Likes