Ghost actions in 'Mode & Motion App' , Inconsistent behavior in C-8

I've been experiencing some erratic behavior with my C-8 since I got it a few months ago, including a couple of instances where it froze, which I've detailed in another thread. My most frequently used automations are 'Mode & Motion'; I avoid the 'Lightening' app due to its over complexity. The same rule worked just fine for years in C-7.

The issue I need assistance with is outlined below. As shown in the logs, after the automation is executed, an additional step occurs where the device is turned on again and set to a brightness level of 27%—although this percentage varies at times. Additionally, while the LED does turn off and remains off physically, the system status incorrectly shows it as 'on'. Consequently, when motion is detected again, the light fails to turn on because the system erroneously believes it is already active.

app:12922024-02-18 09:09:09.280 AMinfoStairway LED Strip was turned on
app:12922024-02-18 09:09:09.269 AMinfoStairway LED Strip set to 27
dev:4202024-02-18 09:09:09.236 AMinfoStairway LED Strip was set to 27% [digital]
dev:4202024-02-18 09:09:09.233 AMinfoStairway LED Strip was turned on [digital]
app:12922024-02-18 09:09:08.946 AMinfoStairway LED Strip was turned off
dev:4202024-02-18 09:09:08.884 AMinfoStairway LED Strip was turned off [digital]
app:12922024-02-18 09:09:08.781 AMinfoTurning off lights
app:12922024-02-18 09:06:08.791 AMinfoDelaying off for 3 minutes
app:12922024-02-18 09:06:08.755 AMinfoMotion inactive: Stairway Motion Sensor - Bottom
dev:2392024-02-18 09:06:08.668 AMinfoStairway Motion Sensor - Bottom is inactive
app:12922024-02-18 09:05:51.320 AMinfoNot turning on, already on
app:12922024-02-18 09:05:51.317 AMinfoMotion active: Stairway Motion Sensor - Bottom
dev:2392024-02-18 09:05:51.278 AMinfoStairway Motion Sensor - Bottom is active
app:12922024-02-18 09:05:36.933 AMinfoDelaying off for 3 minutes
app:12922024-02-18 09:05:36.895 AMinfoMotion inactive: Stairway Motion Sensor - Top
dev:4212024-02-18 09:05:36.870 AMinfoStairway Motion Sensor - Top is inactive
dev:4202024-02-18 09:05:13.300 AMinfoStairway LED Strip is 45% [digital]
dev:4202024-02-18 09:05:13.297 AMinfoStairway LED Strip is on [digital]
app:12922024-02-18 09:05:12.220 AMinfoStairway LED Strip set to 45
app:12922024-02-18 09:05:12.206 AMinfoStairway LED Strip was turned on
dev:4202024-02-18 09:05:12.178 AMinfoStairway LED Strip was set to 45% [digital]
dev:4202024-02-18 09:05:12.176 AMinfoStairway LED Strip was turned on [digital]
app:12922024-02-18 09:05:12.044 AMinfoSetting dimmers [Stairway LED Strip] to 45
app:12922024-02-18 09:05:12.039 AMinfoMotion active: Stairway Motion Sensor - Top
dev:4212024-02-18 09:05:11.980 AMinfoStairway Motion Sensor - Top is active
dev:4202024-02-18 09:05:05.984 AMinfoStairway LED Strip is off [digital]
app:12922024-02-18 09:05:05.910 AMinfoStairway LED Strip was turned off
dev:4202024-02-18 09:05:05.876 AMinfoStairway LED Strip was turned off [digital]
app:12922024-02-18 09:05:05.531 AMinfoTurning off lights
app:12922024-02-18 09:02:05.416 AMinfoDelaying off for 3 minutes
app:12922024-02-18 09:02:05.379 AMinfoMotion inactive: Stairway Motion Sensor - Top
dev:4212024-02-18 09:02:05.353 AMinfoStairway Motion Sensor - Top is inactive
app:12922024-02-18 09:01:49.772 AMinfoNot turning on, already on
app:12922024-02-18 09:01:49.768 AMinfoMotion active: Stairway Motion Sensor - Top
dev:4212024-02-18 09:01:49.728 AMinfoStairway Motion Sensor - Top is active
app:12922024-02-18 08:59:11.362 AMinfoStairway LED Strip set to 27
app:12922024-02-18 08:59:11.352 AMinfoStairway LED Strip was turned on
dev:4202024-02-18 08:59:11.325 AMinfoStairway LED Strip was set to 27% [digital]
dev:4202024-02-18 08:59:11.323 AMinfoStairway LED Strip was turned on [digital]
app:12922024-02-18 08:59:11.156 AMinfoStairway LED Strip was turned off
dev:4202024-02-18 08:59:11.112 AMinfoStairway LED Strip was turned off [digital]
app:12922024-02-18 08:59:10.871 AMinfoTurning off lights
app:12922024-02-18 08:56:10.824 AMinfoDelaying off for 3 minutes
app:12922024-02-18 08:56:10.786 AMinfoMotion inactive: Stairway Motion Sensor - Bottom
dev:2392024-02-18 08:56:10.740 AMinfoStairway Motion Sensor - Bottom is inactive
app:12922024-02-18 08:56:00.332 AMinfoNot turning off: additional motion still active: Stairway Motion Sensor - Bottom
app:12922024-02-18 08:56:00.326 AMinfoMotion inactive: Stairway Motion Sensor - Top
dev:4212024-02-18 08:56:00.296 AMinfoStairway Motion Sensor - Top is inactive
app:12922024-02-18 08:55:49.460 AMinfoNot turning on, already on
app:12922024-02-18 08:55:49.457 AMinfoMotion active: Stairway Motion Sensor - Bottom
dev:2392024-02-18 08:55:49.419 AMinfoStairway Motion Sensor - Bottom is active
dev:4202024-02-18 08:55:12.111 AMinfoStairway LED Strip is 45% [digital]
dev:4202024-02-18 08:55:12.104 AMinfoStairway LED Strip is on [digital]
app:12922024-02-18 08:55:11.214 AMinfoStairway LED Strip set to 45
app:12922024-02-18 08:55:11.187 AMinfoStairway LED Strip was turned on
dev:4202024-02-18 08:55:11.117 AMinfoStairway LED Strip was set to 45% [digital]
dev:4202024-02-18 08:55:11.113 AMinfoStairway LED Strip was turned on [digital]
app:12922024-02-18 08:55:10.844 AMinfoSetting dimmers [Stairway LED Strip] to 45
app:12922024-02-18 08:55:10.839 AMinfoMotion active: Stairway Motion Sensor - Top
dev:4212024-02-18 08:55:10.788 AMinfoStairway Motion Sensor - Top is active```

Are those Hue lights? Another user had a similar issue using Room Lighting with Hue. I don't think they figured out the root cause of the issue. You need to figure out where the change is coming from as it is not the Motion/RL app. The user tried both the built-in and CoCoHue integrations.

The Motion app has a turn on if already on setting that may work. Room Lighting also has a 'force' option.

Nope, it's a COB LED Strip hooked up to a Zwave controller. The thing is, this rule was working just fine for a good two years, right up until I switched to the C-8. I've tried scrapping it and starting from scratch, but no dice—same headache. And it's not just this one; I've got a few other rules that also play up now and then. But it's the 'Motion and Mode' rules that are really giving me grief, working one minute and going on strike the next.

The Motion app has a turn on if already on setting that may work.

Don't think that would fix the issue is because LED is turns off initially (correctly) by the rule but then device status gets set to 'on' by the Ghost action a second later. So when the motion triggers the rule again, LED doesn't turn on because, the device status already 'on' E.g. from log

app:12922024-02-18 09:09:09.280 AMinfoStairway LED Strip was turned on
app:12922024-02-18 09:09:09.269 AMinfoStairway LED Strip set to 27
dev:4202024-02-18 09:09:09.236 AMinfoStairway LED Strip was set to 27% [digital]
dev:4202024-02-18 09:09:09.233 AMinfoStairway LED Strip was turned on [digital]
app:12922024-02-18 09:09:08.946 AMinfoStairway LED Strip was turned off
dev:4202024-02-18 09:09:08.884 AMinfoStairway LED Strip was turned off [digital]
app:12922024-02-18 09:09:08.781 AMinfoTurning off lights
app:12922024-02-18 09:06:08.791 AMinfoDelaying off for 3 minutes

This appears to be a device issue, not an app issue. Notice that the log entry for the event that sets it to 27% is not coming from the app.

Do you suggest to exclude and reinclude to fix or is there another easier fix?

I don't have a clue about this. You're not the first to report something like this.

Does this happen if you set the device from its device page with the same setting that the app sets?

One other thing to be aware of, and I don't know if this is relevant in your case or not: Bulbs sometimes don't support all values of level and color temperature. If you set a bulb to a non-supported value, the bulb actually responds with a slightly different value. I see this all of the time with color temperature values. It as if the bulb has less resolution internally than the values sent via commands.

No, I don’t think so. I’ll explicitly test it and report back.

Another thing to keep in mind is that this was working just for almost 2-3 years until recently. Only thing that changed was upgrade to C-8 from a C-7.

Yes, it does seem to happen if I turn the device on/off from the device page

So this is a device / driver issue, not an app problem. I have no idea why these devices do that. What driver is it?

It was using using 'Generic Z-wave Smart Dimmer' driver. I incidentally changed it an hour ago to 'Generic Z-wave Dimmer', to check if that fixes anything. I don'r recall changing driver in past though, it was what was initially set to when I had originally added the device, I guess!

I believe the Hubitat code,drivers or apps have fundamental issues and can not provided a consistent action outcome. I have added the same zwave devices through makerapi to home assistant and using home assistant rule engine its action are 100% CONSISTANT EVERY TIME but the same device using hubitat rule engine or lighting rule app have inconsistent actions i.e some time lights will remain on when motion has stopped etc (simple lighting rule example).. This could be easily fixed by checking the requested action state has been reached and if not then retry requestion action state for 3 times (or similar) then if still not in requested state write error to log. In the current state it seems that if hubitat has missed timing for and action or device does not respond hubitat does not check requested state and does not re-try to get the device into the requestion action state, which results in in-consistent outcomes e.g sometime lights turn on when motion detected and some times lights dont turn off when motion is inactive (simple lighting rule example) Which is not at all acceptable for the WAF.

Changing to Generic Z-wave Dimmer seem to have solved the issue.