Motion lighting turning off too soon.... sometimes

So I have some hallway lighting that delays for 1 minute usually but not always. The log below shows it working correctly, below the red line, and incorrectly above.

Here is the rule:

@bravenel I'm wondering if it is because I have the door contact sensor also turning the light on. Is the delay not engaged if other things trigger the light to come on? That would seem like a bug to me if so.


You could be right about the contact sensor, though I wouldn't personally see it as a bug, more so just a difference in design to what you were expecting.

What if you turn on the "Allow contact sensors to trigger" option above the motion sensors, could that do what you need?

If the contact sensor isn't included in ML then it has no knowledge of another trigger, and thus can't be expected to handle it; i.e. ML is subscribed to the motion sensors, not the light.

1 Like

Doh! Probably! Didn't see the forest for the trees. I'm gonna say that probably will fix it! Thanks!

1 Like

I wonder though if the door is left open will the lights stay on until closed. Time to experiment.

1 Like

I'm expecting the idea of the setting at the top is so the contact sensor can trigger the rule just like a motion sensor.... And as I type this I see where you were heading, in the same way a motion sensor remaining active.... I would like to think no.... The contact sensor can give you a quicker trigger and then motion takes over....

Yup, there was an issue there, the light shouldn't have tuned off regardless of your contact sensor selection. If the problem can be replicated, you can expect a fix in the next release. Thanks for your feedback.


I'd be interested then to know the expected behaviour. I don't mind how it works, just interested because it feels a little ambiguous. Unless I am misunderstanding what the bug is....

Does the door being opened reset the delay?Does the door remaining open keep the lights on? How does the selection of the contact sensor in the activate on section compare to the option I pointed out earlier at the top of the screen?

It's not clear what happened, or what any bug might be.

Ah, I see, you were acknowledging there is an issue and committing to fixing it, but that hasn't been done yet. Thanks for clarifying Bruce.

That's not what I said. I don't know what happened with your system. I don't know if there is a bug or not (Bobby jumped the gun a bit by saying there is one). If there is a bug, I don't know what it is. Yours seems a very isolated incident, and not one that we can replicate.

Ok, thanks. It's actually @tivomaniac 's issue, I just jumped in to ask a related question. But my question isn't important. I'll leave you guys to work through it.

The way @tivomaniac uses the contact (to only turn on) it would not cancel the timer. However, the issue here is that second motion sensor should have canceled the timer, and it didn't. I tried to replicate the problem yesterday to no end, and couldn't, thus we don't know what the bug might be. I updated my post from yesterday to reflect the testing. Will send @tivomaniac a PM to get more details about his hub, as it seems to be a rather database issue, than an app issue.

1 Like

No worries, glad to see you following this up. Like I mentioned to Bruce, I was only wanting to confirm the intended behaviour when using these options, not that I was experiencing the same issue, only that this discussion prompted some questions about how the contact sensor options should be used.

Again, like I mentioned to Bruce, not wanting my questions to get in the way of troubleshooting @tivomaniac 's original post, treat my questions very much a secondary concern here... Keep up the good work :slight_smile:

1 Like

Just to clarify the rule above would turn on the hall light based on motion or when the door opened as I was having some lag sometimes with the motion sensor so I added the door contact to also turn on the light. I subsequently noticed that the light seemed to be turning off too soon. Sometimes while I was still in the hall and moving.

1 Like

Whenever I’m using more than one motion sensor, I use the Zone Motion app to aggregate motion sensor events. You can also add the contact sensor to the zone using the contact-motion app on Hubitat’s github. I’ve done this with a couple ML rules and it’s worked perfectly.

1 Like

The way you have it set up the light will not turn off based on contact sensor. Every room in my house uses Motion Lighting set up exactly the way you have it, for the same purpose, with one or more motion sensors in each instance, and never experienced the same issue you presented.


Hello Bobby, I'm having similar issues where my dimmer isn't listening to my delay commands. As you can see in the screenshots, it sends a command for a 10min delay, then 1min later it turns off.

Screenshot 2022-04-22 073503

Can you replicate this consistently? If so, when you have a chance, could you please trigger the delay, then as soon as you see the message in the log, go to App Settings and take a screenshot of the "Scheduled Jobs" section.

Is this a Zooz dimmer? I ask because I’ve seen occasional strange behavior like this with my Zooz 77 dimmers. It has for me always shown in the device event log as a physical command (when nobody was around to physically trigger it). I haven’t reported it to Zooz because it isn’t something predictable or that I can replicate. It’s pretty infrequent for me, but troubling enough to not use them in bedrooms.

Download the Hubitat app