[BUG? 2.2.4.147] - Is this a Motion and Mode Lighting app bug regarding "Don't turn off if already on"?

This is related to [BUG? 2.2.4.147] - Is it a Motion lighting app bug when turning on two lights, and one is already on, the other does not turn on? - #37 by dave7 where I finally get all the lights to always come on by checking "Do turn on if already on" but then added the option "Don't turn off if already on" and it is as if the "Do turn on if already on" option is now ignored.

I turn on a couple lights using the dashboard or an Echo. They are Cree bulbs called Living Room Lights.

Then I trigger the motion sensor where the Motion App should turn on these bulbs as well as some Front Lights. But the Front Lights do not come on when the Cree lights are already on, even though I have the "Do turn on if already on" option set.

It seems as if the "Do turn on if already on" option is ignored if the "Don't turn off if already on" option is set, If I do not set the "Don't turn off if already on" option, all the lights come on as expected, but they all get turned off as well even though I had the Living Room Lights already on.

Actually, when I first turned the "Don't turn off if already on" back off, the "Do turn on if already on" still did not work until I updated the motion app to first turn the "Do turn on if already on" option off and then had to update the app again to turn "Do turn on if already on" back on, for it to work again.

Bottom line, I cannot seem to use the two options at the same time when having multiple lights for a sensor to turn on.

Here is a screenshot and a log...

app:2292020-11-27 12:39:23.062 am infoNot turning off: not if already on

app:2292020-11-27 12:39:23.048 am infoMotion inactive Garage Sensor

dev:2022020-11-27 12:39:23.014 am infoGarage Sensor is inactive

app:2292020-11-27 12:39:09.044 am infoNot turning on, already on

app:2292020-11-27 12:39:09.012 am infoMotion active Garage Sensor

dev:2022020-11-27 12:39:08.921 am infoGarage Sensor is active

dev:2002020-11-27 12:38:48.709 am infoKitchen Zigbee Repeater is on [physical]

Hi @bravenel can you have some input on this? Thx

If you think about it, those options probably are, or should be, mutually exclusive.

Why should they be mutually exclusive? I figured that "Don't turn off if already on" meant it was remembered if something was already on, so leave it on when time for the motion sensor to turn off the lights that it had turned on. For instance, I manually turn on my Living Room lights, then the motion sensor goes off and turns on some lights including the Living Room lights that are already on, but then after the time delay, I don't want the motion sensor to turn off all the lights including the Living Room lights that I had already turned on.

Also, what does the "Don't turn on if turned off manually" option really mean? Doesn't make any sense to me since highly likely a light was turned off manually sometime or another before a motion sensor goes off wanting to turn it on.

It means that if the lights are turned off manually that motion activation of the lights is disabled until the lights are turned on manually.

You should bear in mind that the expected main use of Motion Lighting is to replace the use of switches turning lights on and off in those areas. But, people have different use cases, and this was a requested feature.

"Don't turn off if already on" is essentially the flip case. If the lights are off, but turned on manually, then disable turning them off from motion inactive, until they are turned off manually.

You didn't show enough information in your first post for me tell what's going on there. Please use screenshots for logs, not copy paste. I would need to know the sequence of events that preceded those events, and the state of the devices. You could post the Application State from the App Status page.

Sorry, but that seems at odds with logic given lights are often turned off manually. Why would you even have a motion app associated with the light if motion was disabled just because you turned it off? And turning it on enables motion again? It's already on...

Really, all I am trying to do is to turn on a couple separate lights via motion, but to not turn them off after motion becomes inactive and any delay, if they were already on when motion went active.

Based on how you describe the two options, "Don't turn off if already on" and "Do turn on if already on", I think my solution is to have separate motion apps turn on each light I want on, via the same sensor tripping, and to use "Don't turn off if already on" to not turn any off that I already turned on, just because motion also wanted to turn it on. Does that make sense?

If you don't want this option, don't select it. Some people use this. They want to stop the actions of Motion Lighting, for example, when putting a child to bed. So, they turn off the switch, that disables ML until they turn it on again. Not sure why you'd say "It's already on", when what we're talking about is disabling ML by turning the lights off.

You should use the "Don't turn off if already on" option.

I guess I'm not following what your misunderstanding is.

What I meant by that was it seems odd [to me] that you would have to turn it on manually to enable a motion sensor to be able to turn it on, because you just turned it on. What good does the motion sensor do at that point?

I use that option now but I can only use it if I have a single light I want to turn on per motion app. I apparently cannot use it along with the "Do turn on if already on" option which I need if I have multiple lights I want to turn on and one is already on. So my solution is to have multiple apps, each turning on one light from the same motion detector, and both having the "Don't turn off if already on" option.

The whole point of that option is to disable the turning on by a motion sensor. The option is invoked by turning off a switch. So how else are you going to cancel that option other than by turning on that same switch?

You keep saying that you just turned it on. No, this option is activated by turning the lights off with a switch, and then motion activation is enabled again when the switch is turned back on manually.

So you turn the switch on to enable motion turning it off, then wait for some motion, which turns it on, but not really since it is already on, but then, after the motion goes inactive, and the delay ends, and the "Don't turn off if already on" option is not set, the light turns back off? And if no motion, the light stays on forever until you turn it off manually, in which case motion will never turn it back on...not intuitive to me at all.

How would you do what I want to do which is 1) turn on a couple of separate lights upon motion even if any are already on, and 2) turn off the lights that were not already on before the motion, and after the motion and delay ended? The only way I can figure to do this is with a separate motion app for each discreet light I want to turn on because of the effect of the "Don't turn off if already on" option negating the "Do turn on if already on" option, and which you suggested were mutually exclusive with each other if I understood you correctly, in which case they should not both be allowed to be set at the same time.

That's why I said the two options are not compatible.

It may not be intuitive, but given that you only have a single device being used to disable the app, and that device only has two states, if the app is going to allow that device to disable it then that device put in the opposite state is the only possible way to re-enable the app.

I'm going to look into this.

As you said, probably with multiple app instances. Motion Lighting cannot be made more complex than it already is without breaking it, and it is perhaps already broken with certain combinations of options. More app instances are free.

I'm a bit at a loss to help because I don't use light switches any more in those rooms where I have Motion Lighting. I do use button controllers to enable and disable ML, and selectively turn lights on or off, but not light switches. My own approach to these things is to try to keep things very simple. Complexity creates its own problems, and I think you're banging up against that. ML can't do every conceivable lighting automation in a single instance.

1 Like

Thanks for explaining. To me my scenario is normal for outside motion sensors :slight_smile: and fortunately I can do what I want with multiple app instances. Am curious though if the source code for the Motion app is public or proprietary?

All of the built-in apps code is proprietary.

Figured. Thanks for all of your help!

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.