Rule Machine Help Needed

Hi All.

I have this Rule in Rule machine that isn't functioning as I expected. Basically this rule keeps sending on commands even after motion stops. Please note, the switch is a hue group.

So here is the odd thing. It doesn’t look like it was Rule machine sending all of the additional on commands. I have an app that runs a call to a webserver which runs a hue api command to set the scene. The App says when ever the Kitchen switch is turned on send the command to the webserver to set the scene. It looks like there was a loop going on. So kitchen turned on, which sent the command to set the scene. When hue set Hue API set the scene it looks like the Kitchen Device got updated to another On state. This caused the hue API to get sent the scene command again… which then updated the device to ON again. It just kept looping.

Does anyone smarter than me know why the device would keep getting updated to ON even though it was already in an on state?

From what I’ve seen, HE processes the command regardless of the actual state of the device. I actually liked this because my Harmony api app (I use the ported Connect app now) did not sync with the activity state and I could still control on/off. I see how this could be problematic in other scenarios though.

1 Like

I agree @stephack. I use this “send off even if you think it’s off” a lot. I can’t see how “extra” commands hurt anything, other than when they cross over to excessive and clog the Z(*) Radio channel. It’s symmetrical to the Polling issue. (How often is too often?)

In this case it's causing extra traffic on my network that isn't necessary. If it was zwave traffic, I wouldn't care.

Don’t take our word for anything @Keo. Reach out to support or staff. There’s probably a simple solution to your problem.

With the Physical Events not reporting 100% of the time, there is no way a driver should ignore a request to turn on() or off() if it thinks a light is already in the correct state. We don’t want devices getting ‘stuck’ in a state.

@Keo, you mention you’re using an App, which I assume is custom? If so, you should be able to modify your custom app to not send redundant requests to your webserver.

I am not sure I agree with the assumption that it's multiple on requests. I created a virtual switch and assigned that to my app. In this case it's called Kitchen Scene. I updated my rule machine rule so it trigger the virtual scene switch when motion starts and then turns off both the Kitchen switch and the Kitchen scene switches after motion has stopped for 3 minutes. If it were a case where a motion event was sending an on command I would expect multiple requests to be sent with my virtual switch as well.

With the above configuration, I only see one on event sent.

After looking into this a little more today it looks like what is happening is that my api call even though it's calling a scene and the on state isn't technically changing, is forcing an update to the kitchen group in HE. When that update occurs it is trigging my app again which is causing a loop. It's actually pretty impressive that HE is getting the update instantaneously. Regardless.... The above configuration resolved my issue.

1 Like

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