Motion Disable When Lights Manually Turned On

Dumb question, sorry. How do I get to the App logs? I see "App Stats", but I don't
think that's it.

I figured it out. Here are the app logs. Every other time, the lights don't turn on, because the app thinks they are already on, even though the app turned them off last:

That feature isn't cleared by the app. It is cleared by the lights being manually turned off. So turn them on, and then turn them off, outside the app.

Not sure what you mean. In the above sequence, I wasn't touching the wall switch. Shouldn't the behavior of the app be the same each time in that case?

That app seems to be in a messed up state. Why don't you remove it and create a new one. Try it without the option of 'Don't turn off if already on' first.

Actually, I did that already. The app was working fine without the 'Don't turn off if already on' switch on. Once I turned it on I started seeing this behavior.

OK, I repeated the whole process to get logs for both cases. I deleted the app and started over. First without the switch on:


The behavior looks as expected for 4 cycles.

Now turn on the switch (no other changes, and no touching the wall switch):

Four cycles, with every other cycle failing to turn on:
image

Same behavior as before.

Evidently that option doesn't work as it should.

1 Like

Evidently. I wrangled another solution that seems to work, using the Rules and Simple Automation engines, but I wanted to flag this behavior for others so they can be aware. Will you open a bug for this?

What kinda switches are you using?

I was having similar issues with my kasa wifi switches because the state in hubitat wasn't always current when motion was activated (physical light was on but hubitat showed off or vice versa).

The motion and lighting "don't turn off if already on" would function perfectly as long as the state of the switch on hubitat was correct when motion triggered.

I eventually just built a rule in rule machine to accomplish the same thing, but added and a Refresh action at the very start with a split second delay before running the rest of the rule so the switch state would always be current. This was a lot more efficient than constantly polling my switches.

My dimmer in this case is a Zooz Zen72. I was also wondering if the state in the switch might be causing a problem. That being said, my alternate solution (using a Hub Variable as an override) seems to work perfectly, so I'm sticking with it.

Hi Guys

I've been searching for the same motion override lighting solution as @user876. I think the issue with hubitat is that there are so many options to choose from :slight_smile: Ialso tried rule machine, simple automation and motion lighting all without sucess. Until I read the post above from @bravenel. Clearly less is more for this simple application.

My applications is that I have patio lights controlled by a regular UK toggle light switch with a fibaro dimmer 2 behind it. I actually only need a switch but there as there is no neutral the dimmer does the job. This is programmed in simple automation to switch the patio lights on or off as required. I then added a Hue outdoor motion sensor and this was programmed again under simple automation to turn on the patio lights in evening mode or night mode on motion and switch off after 5 minutes of no motion. But as with the OP I discovred that when the lights were on at the switch any motion activation still turned them off after 5 mins. So I have now deleted just the motion simple automation rule and created a lighting and motion rule exactly as @bravenel suggested above. The solution works perfectly as intended so thank you for clarifying.

This is an old thread, but I'll post my solution in case it helps anyone. I wanted an override not only for manually turning on a light, but also when turning on by voice (which is what I usually do). The "don't turn off if already on" never worked correctly for me, or didn't cover all scenarios. This is a bit kludgy but:

  1. I have a rule that whenever any light turns on, a variable is set to true; let's call it "lighting manually requested."

  2. My room lighting rules include turning on a virtual switch when activated; call it "set variable with motion lighting." That switch has a 1 second auto-off.

  3. Another rule is triggered by the "set variable with motion lighting" switch turning on. That rule sets the "lighting manually requested" to false, after a 5 second delay.

  4. One more rule sets the "lighting manually requested" variable to false when all lights have turned off.

The net result is that the "lighting manually requested" variable ends up true if I turn on a light by voice or physical switch, and false if it's turned on by motion. I then add limits for activation and deactivation to the motion lighting rules: don't activate/deactivate when variable is true: lighting manually requested. That way the motion lighting rule won't be triggered if I've turned on a light manually. Once I've turned off all the lights, the last rule re-enables motion lighting.

Rule #1 above can also include scene triggers among the listed switches, so that when lights are already on and you then manually request a different scene, that will create a manual override situation and the lights won't time out.