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

Our reno is mostly complete so have moved back upstairs where a new hub and all our new HA devices live. Have set up some basic motion/lighting using the simple lighting app for the closets (Aeotec MS 6 + Zooz Toggle Switches). Everything works pretty well but would like to play around with some additional customizations. Paused the lighting rule, created a Rule in RM and simply put it does not work...my sensor shows it detected motion but the light does not turn on. I can turn on/off from dashboard and the Lighting rule works.

I am really scratching my head over this one.. I can try a trigger but I wanted to do the rule cancel thing for the timeout. What am I missing?? Note: I am using @csteele's custom aeotec driver.

I'm tad embarrassed because I thought I had a general sense of what was going on but maybe not. Indeed have written some drivers etc so definitely know enough to be dangerous.

Looks correct and pretty straight forward to me.

What do you see when motion goes true in the RM and system logs?

Also, what do you see in the device event table? I haven't looked at that DTH, but if it is not set to do a isStateChange on the motion activates/inactivates event it might not work, even if the RM rule is right.

Might want to try it with the built-in driver for a test, to rule out any chance it is simply a driver issue.

Your condition device and action device are the same. Do you have motion sensors and switches named the same, or is your rule trying to turn on a motion sensor rather than a light?

3 Likes

I didn't notice that. Good question.

App events and Logs for the rule are your friends. Especially the latter, as you can see if the motion events are hitting the rule as you expect, and if it is responding as you expect. That will point you to the failure.

sorry am out and about but will be home a little later. Will swap out the driver, initiate logging and check the naming. I do have long names in order to keep things organized. Thank you for responding!!

Actually they are not.. I am just using really long naming in order to keep things organized.

Upstairs Main Left Closet &
Upstairs Main Left Closet Sensor (sensor part is hidden!)

I think you should first check to see if you have the right device assigned to both parts of the rule. Unless your motion sensor and light are named the exact same thing, your either looking for motion on your switch or trying to turn on your motion sensor. :slight_smile:
27-12-27-42

A switch would not show up with "active" from a selection that only finds capability "motionSensor", and a motion sensor couldn't show up for an action to turn on.

He just has the same names for the devices, which is ok, and not a problem for this rule.

I don't know what capabilities or commands are added to this driver. So, it's possible that there's a switch capability added to the Aeotec MS 6 driver, isn't there?

Also, just in general, wouldn't your recommend naming devices differently? Seems it would help avoid confusion.

I think there is a char limit on the display.. I verified the device name again. Also I suspect the system uses device id or something else more system related.

Okay. As long as you checked. Just stuck out as "different" so wanted to confirm.

No, Rule Machine and other apps use capabilities. So Ryan is correct that if you put capability "motionSensor" in a switch driver, or capability "switch" in a motion sensor driver, you could have problems.

Interesting.. I was referring to how devices are referenced but I think the driver does have a switch capability. mmmm

If you're trying to debug things, change the device label to something simple so you can identify it easier in the rule. Like Light and Sensor. Just the label and just temporarily so you see if that's your problem. The device label will be what's displayed in the drop-down lists in Rule Machine. My rule is always go back to basics when trying to figure out a problem.

If you're referring to how the system, in the background, determines which device to control, then yes, I believe you are correct. It doesn't care what the name or label of the device is just what the network device ID (or some other ID in the database) is. That's what allows you to change the device label without screwing things up.

I'm still out but can get to things via vpn in a somewhat limited way. I renamed the light to actually say 'Upstairs Main Left Closet Light' for better clarity.

So its very strange.. I renamed the light switch and it showed up in the motion sensor condition!!!! Note: its a generic z-wave switch with no motion attribute.

I suspect because the light was named 'Upstairs Main Left Closet' and the sensor was named 'Upstairs Main Left Closet Sensor' something in the UI got confused maybe..... Now that I renamed it things are looking better.

1 Like

I will send a screen cap when I get home..funky looking.

spoke too soon the light disappeared from the condition.. now just blank.

Have you added or removed different devices from the conditions in this rule? At this point I'd be tempted to delete the rule and start over, and make sure the condition and rule stay in sync when you rebuild it.