Motion and Mode Lighting Part 2?

Hello, I see the other similarly titled post but I am having a slightly different problem. I have my lights come on at sunset using a Rule Machine rule. The same rule has them turn off at 11pm. The Motion app also has a rule to turn on the same lights for 5m when it detects motion, after 11pm. I have a restriction set to be "on" between 11pm and sunrise. However, "on" does not mean that the rule is disabled unless it's between those times, but that it won't turn the lights ON until it is between those times. However, it has no problem turning the lights OFF. I end up with having my lights turned off at random times whenever they are on and there is motion, most noticeable between sunset and 11pm when they should be on all the time.

The Motion settings:

The log showing the ON action being ignored outside of the time restriction, but the OFF action still taking place:

Screenshot 2022-08-16 022949

This looks like a bug to me. The restriction should disable the rule outside those times. The fact that it's constantly checking the time to see if it should do something seems inefficient, and is also causing this issue.

What may be the issue is that your rule for between 11PM and Sunrise is the sunrise of today and not the sunrise of tomorrow you are thinking to use. Hence that rule is active from sunrise till 11PM, and not from 11PM until sunrise the next day. I do not have a way to fix it on Hubitat as I am new, but I made the same logic error in other places.

I don't think it's a bug as much as it's just not what you would expect to happen. The restriction explicitly calls out that is restricts turning on as opposed to restricting the entire rule.

You have to also time restrict the "turn off" side.

1 Like

Interesting, ok! So it looks like my assumption of the ON "bug" was correct, except it was a feature.
I missed the corresponding OFF restriction, in the same place where the delay is set. I've updated my rule, will let you know how it goes.

1 Like