[2.3.5.121] Possible Bug with Iris V1 Sensors and Time Since Event

@bravenel I have been experimenting with the Time Since Event and found a possible bug when using it with a contact sensor. When I first select a contact sensor it lists the Time Since as (?). I can reset it by cycling; however, after a while the Time Since changes back to (?). I haven't seen this behavior with motion sensors but haven't spent much time working with them. Here is a rule I created just to test it to the point of failure. Notice the Time Since is reporting (?) after the last run.


1 Like

First of all, there is nothing special about contact sensors for Time Since Event, and RM makes no distinction between those and any other device that has string based attribute values, e.g., motion, switch, etc.

The "?" gets displayed when there is no return from querying the device's last event. So the first thing to look at are the device events from its device page. See if there is anything odd there. RM pulls the last event, and gets the time out of it. So, I'm wondering what those events look like.

It would be helpful if you could post a screenshot of the Events from the device page. What driver is in use for the contact sensor?

I'm using the built-in Iris V1 Contact Sensor. Here are the events from around the time the "?" was returned.

And here are the closed events

Tell me if I'm correct or not: This doesn't always fail -- only fails sporadically?

I've run this example three times and it's failed all three times. It's also failing in two other rules (and a second test rule) that I was incorporating Time Since Event into. That's why I created this test rule.

I guess what I'm asking is if the failure is consistent. Does it always fail at exactly the same point?

No, I was looking for that but the last time it failed it didn't take as long.

I also have another test rule where the motion went inactive and the contact closed within a minute or two of each other. The motion is still valid many hours later.

No way to know exactly what is going on with this. It's very unlikely to be an RM bug, per se. My guess is that its some funky interaction between the rule and fetching the event history from the device, like some cache interaction. The code it basically searching the event history for the right attribute, and when it finds it pulling the date out of that event. If there is no date, it returns "?", and obviously the Time Since comparison will fail. Whatever it is will probably not be easy to find.

What driver is the motion sensor?

Is all of this on a C-8? I would be suspicious of the Iris V-1 device having something to do with this.

Motion sensor is using built-in Generic Zigbee Motion Sensor. This is all on a C-5. I have some Iris V-1 motion sensor that I'll check to see if they have the issue too.

When we get past our current C-8 related endeavors, we may dig into this. Like I said, (a) it will be very hard to find, and (b) do something other than polling.

Looks like it's a V1 issue. Sorry I didn't catch that sooner. Probably not worth much effort for V1 devices. I have other ways to make this work.

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