[Resolved / UI Anomaly] I guess I do not understand RM after all.. simple rule not working

So the only thing I did was rename the switch on the device page.. after that on the rule itself the new name was showing up as motion sensor then it disappeared and nothing was selected.. which explains the behavior..

To summerize if you have a device that is
named as a substring of another device funky things can happen in the rules. Seems like a UI issue not a system one..

I did not intentionally set out to do that..just forgot to add 'light' on the end of the device description when I paired it.

Thank you all for walking me through this.

2 Likes

Funky things brought on entirely by having a device driver with multiple capabilities!

Glad you got things working.

But the switch was the issue not the motion sensor?

The switch was superseding the motion condition due to the name I think.

I suspect the GUI code pulled in the switch because it matched the first bit of the motion sensor name (and the switch device was before the motion sensor device ID-wise). The system itself wouldn't take the device name so nothing really got saved for the condition and the rule would not fire..

It was an accident I swear!!! :grin:

No, it's based on capabilities, not names.

Yes of course that makes sense.

To test I renamed the switch back to what it was and tried again. This time it worked so yep I must have made a mistake. I could have sworn I selected the correct sensor. Indeed as I said in one of my earlier posts I verified the condition was set to the correct device even though it looked like it was not. sigh.

I am going to leave it like this overnight just to see how the maintenance functions handle the stuff..

Apologies for taking up everyone's time on this!!!

Sorry to keep harping on this but something is not right - my original screen cap does not make sense. If you look at it you will notice the device "Upstairs Main Left Closet" on the condition.

This is the generic z-wave smart switch which should be impossible to select for motion given it does not have motion capabilities.

My motion sensor is named "Upstairs Main Left Closet Sensor". To resolve my issue I renamed the light switch to "Upstairs Main Left Closet Light" and then had to edit the rule as the motion condition device (eventually) became blank.

So I do think there is an issue and am trying to figure out how to recreate it.. if I find something will let you guys know.

So I think I figured it out - not sure why I did this but the system happily let me shoot myself in the foot.

  1. Create a simple rule (don't need actions for this test) - just a light switch on/off condition.
  2. Save rule
  3. Edit rule, edit condition change capability to motion and click done. Do NOT change device.
  4. Edit condition again, don't change anything and click done.

Note: "Upstairs Guest Light" is a "generic z-wave smart switch"..

2 Likes

That does look like an issue to me. Nice detective work! Changing the capability for a condition should, IMHO, remove all previously selected devices and force the user to select from the new list of devices.

2 Likes

When I do the same thing, when I click done on the condition page, it comes back out and says "null" for the state of the motion. (Audio Alerts is a virtual switch).

28-08-42-28

Yep, edit the condition again and click done..doing it twice was what yielded the results you see in the screen cap..

Back to switch? Or to something else?

I was able to duplicate.... Turned my light switch into a motion sensor. Cool! :nerd_face:

2 Likes

No just edit and done.

Yup. Unfortunately, like we said up top, that will never be "true" because it's not a motion sensor. This is why naming your devices different things is good practice. :slight_smile:
28-08-44-46

I totally agree - the issue is if you have a large number of devices then naming becomes very important especially when there is no way to filter devices just yet (I've suggested a simple tag field in devices). You will end up with longer names though.

In my case I originally forgot to tack on the "Light" on my "Upstairs Master Left Closet" switch and that caused confusion when mucking around with the rules.

This is all very well and good. Back when RM was first implemented, there was no way to remove a setting, so once you'd made a selection, changing part of it would not affect the other parts selected. The advice then, still the advice now, if you're going to mess up a rule by changing parts of it, simply delete the rule and start over.

I understand the issue thoroughly. I have no intention at this time of fixing this "hole" in RM. It is not as simple as you might imagine to fix, as it requires the introduction of a lot of extra logic to know that a setting has changed -- namely, keeping track of every setting and testing every setting selection specifically to detect a change in the setting.

So, to avoid problems such as these, don't do what @erktrek and the rest of you have done. If you want to change something fundamental in a rule, remove the rule.

1 Like