Since I updated to 2.0.2 I've been having issues with the built in motion lighting app. Some of my lights appear to be controlled only some of the time. I didn't make any modifications to the rules, I only ran the update. My lights now appear to randomly get stuck in an override mode either on or off. I don't touch the switches or control them in any other way -- only the motion lighting app controls them. Sometimes they will turn on with motion but never turn off again. I manually turn them off with the switch but then they don't turn on again the next time motion is triggered. Is this possibly because I have mix of hue and z-wave lights in some of the rooms?
Also since updating to 2.0.2 I've noticed strange behavior with Alexa integration. My virtual switch that controls night mode always says "night mode is not responding" when I try to turn it on via Alexa. Despite that it is sometimes turned on, other times not.
Edit:
It definitely seems like an issue with the changes to overrides. If I manually turn off lights at the switch I see "override ended" in the log. As soon as motion turns the lights back on I see "override initiated by (light name)" and then when motion stops "not turning off: disabled by override". It seems that when the app turns on my lights it also thinks it should start an override. This may be a device specific thing? It seems the overrides are getting started by my Leviton z-wave dimmers (models VRI06-1LZ and VRMX1-1LZ).
Perhaps the app needs to be revised so that it won't start an override if there is an input within a couple seconds of the app being triggered? It seems like my dimmers might be over reporting as soon as the app changes their level and the app takes those extra reports as override commands.
Here is a log example:
[app:16](http://192.168.1.58/logs/past#app16)2018-12-16 10:35:45.212 pm [info](http://192.168.1.58/installedapp/configure/16)Not turning on:
[app:16](http://192.168.1.58/logs/past#app16)2018-12-16 10:35:45.206 pm [info](http://192.168.1.58/installedapp/configure/16)Motion active Drew Office Motion
[app:16](http://192.168.1.58/logs/past#app16)2018-12-16 10:35:31.890 pm [info](http://192.168.1.58/installedapp/configure/16)Not turning off: disabled by override
[app:16](http://192.168.1.58/logs/past#app16)2018-12-16 10:35:31.885 pm [info](http://192.168.1.58/installedapp/configure/16)Motion inactive Drew Office Motion
[app:16](http://192.168.1.58/logs/past#app16)2018-12-16 10:34:09.936 pm [info](http://192.168.1.58/installedapp/configure/16)Not turning on:
[app:16](http://192.168.1.58/logs/past#app16)2018-12-16 10:34:09.929 pm [info](http://192.168.1.58/installedapp/configure/16)Motion active Drew Office Motion
[app:16](http://192.168.1.58/logs/past#app16)2018-12-16 10:33:59.290 pm [info](http://192.168.1.58/installedapp/configure/16)Not turning off: disabled by override
[app:16](http://192.168.1.58/logs/past#app16)2018-12-16 10:33:59.288 pm [info](http://192.168.1.58/installedapp/configure/16)Motion inactive Drew Office Motion
[app:16](http://192.168.1.58/logs/past#app16)2018-12-16 10:31:44.784 pm [info](http://192.168.1.58/installedapp/configure/16)Override initiated by Office Lights
[app:16](http://192.168.1.58/logs/past#app16)2018-12-16 10:31:44.773 pm [info](http://192.168.1.58/installedapp/configure/16)Override initiated by Office Lights
[app:16](http://192.168.1.58/logs/past#app16)2018-12-16 10:31:44.674 pm [info](http://192.168.1.58/installedapp/configure/16)Setting color to hue:14 sat:100 level:100
[app:16](http://192.168.1.58/logs/past#app16)2018-12-16 10:31:44.618 pm [info](http://192.168.1.58/installedapp/configure/16)Setting dimmers [Office Lights] to 1
[app:16](http://192.168.1.58/logs/past#app16)2018-12-16 10:31:44.598 pm [info](http://192.168.1.58/installedapp/configure/16)Motion active Drew Office Motion
[app:16](http://192.168.1.58/logs/past#app16)2018-12-16 10:30:01.077 pm [info](http://192.168.1.58/installedapp/configure/16)Turning off
[app:16](http://192.168.1.58/logs/past#app16)2018-12-16 10:29:01.056 pm [info](http://192.168.1.58/installedapp/configure/16)Delaying off for 1 minute
[app:16](http://192.168.1.58/logs/past#app16)2018-12-16 10:29:01.034 pm [info](http://192.168.1.58/installedapp/configure/16)Motion inactive Drew Office Motion
[app:16](http://192.168.1.58/logs/past#app16)2018-12-16 10:28:27.966 pm [info](http://192.168.1.58/installedapp/configure/16)Override ended by Office Lights
Do you have just Enable override with dimmer level change enabled or do you also have Override for level only enabled? If your dimmer is causing this like you suspect, then enabling Override for level only should allow the lights to still turn off.
@bravenel I am having this issue with Motion Lighting since 2.0.2 as well. This is happening in my master bathroom. No configuration changes have occurred in this zone in the last 4 months or so.
Devices:
Multisensor 6 usb powered.
Ecolink motion
Homeseer 200 series dimmer.
From looking at the logs it looks like motion lighting app is turning on the switch @ 100%. When I look at the log for the switch it turns on and is set to a lower percentage. This time 38%. Then it gets another set to 38% which causes an override, so the switch is never turned off. Dimmer is set to 38%.
Yes I do have override turned on but override for level only turned off. This is the behavior that I want and that previously worked correctly. I don't want to override for level only -- there are times that I want the override to keep the lights on until manually turned off. This bug has definitely caused the Habitat WAF to take a nose dive
@DeveloperDavidB It seems likely to me that my theory is correct. When some dimmers are changed they also immediately send (one or more) status update(s) back to the hub which the Motion Lighting app is interpreting as an override coming from the user making a change.
I haven't seen the source code for Motion Lighting anywhere. @bravenel Would you consider putting it on GitHub so we can submit pull requests?
I think what is going on is that override is getting kicked on by some lights reporting intermediate levels while ramping up. For the interim until we work out a fix for this, you could turn override off completely (under Options for on). Your suggestion about allowing some time to pass is not a bad one, but by no means an ideal solution to this issue.
Unfortunately, override is simply a very tricky problem. Originally it relied solely on a device reporting a “physical” event of a level change. This suffered from devices that don’t report “physical” reliably. This latest release was an attempt to get around that issue, only to step in this other mess with devices reporting during the ramp up.
Upon receiving an update that might trigger an override poll the device (maybe after a tiny delay). If the polled value is different from the reported value then you can assume it is an interim update while ramping up and ignore the override. I suppose this depends on the details and reliability of polling status on different devices.
Yeah, this won't work for a number of reasons, the asynchrony becomes a large issue. The best solution is probably to just suppress override sensing for some number of seconds, perhaps a settable value that defaults to 5 seconds. Someone could want to use Motion Lighting with slowly ramping lights, and this will blow override up every time.
@bravenel any chance of a hot fix or releasing the source sometime soon?
I've discovered another bug as well. I went and turned off override for all of my automations but a bunch of them are completely non functional now. The logs show "not turning off due to override". I think that if an override is active and you disable override then the automation is hosed because it gets stuck in a permanent override. Perhaps it just needs a little code to make sure the state is valid for the settings when saving new settings (and update the state if it's not).
There are some fixes for override coming out in the next release, including being certain it is not enabled after you hit Done in the app.
In the meantime, to fix your issue with those instances, enable override, and manually turn off the light (or on and then off). That should correct the issue. Then, you can disable override again until this next release comes out.
@imagio, what device type are you using for the VRMX1 dimmer switch? I have a few of these and I just connected one to Hubitat and it connected as a fan switch, but I'm guessing that's not what I want. Do you have it connected as a generic Z-Wave dimmer?
Mine all connected automatically as fan controllers. Both the VRMX-1LZ and VRI06 did this. They seem to work just fine that way so I haven't looked into it. Seems to be a non-issue.
@bravenel thank you, the overrides work correctly now! A slightly unrelated question -- is there a way to manually toggle the override on and off either through a dashboard or Alexa? For example it would be useful to say "alexa (pause|resume) the kitchen lighting automation" if I know I want to disable motion lighting for some time.
You could use a virtual switch. Use it to disable Motion Lighting. You have the choice of disabling on, disabling off, or both. Then you just tell Alexa to "turn on xxx". I have one called Movie Time. When I tell Alexa to turn on Movie Time, it disable a Motion Lighting instance for the hall lights just outside our little 'theater' room.
That is exactly one of the use cases I was trying to solve! The pets frequently trigger motion lights in the hall when we are watching movies which can be annoying. Thanks for the example.
I spoke a little too soon. There are still issues with overrides in the latest version of smart lighting. Some of my lights are still getting stuck in an override when I have not changed their state. I haven't nailed down exactly what cases cause this yet.
@bravenel I'm still having the same issue where my lights get into override mode when they shouldn't. It doesn't happen all the time now, but it does happen once or twice a day to some of my lights. Could you possibly increase the delay or tweak whatever other solution you put into place? It almost works correctly now but isn't quite there yet. Not having override work correctly is dragging down the WAF haha