Zone Motion Controller (stuck active) Part II

Problem: Zone Motion controller instance staying active long after the activity timeout for all of the motion sensors has expired.

Purpose of this Zone-Controller

  • Determine when all motion in the house has stopped for at least 30 minutes.
  • The output of the zone controller is used as a switch in TWO rules.
  • Auto Arm the House and Auto Exit House Cleaning mode.
  • The nature of these rules means they don't fire on a schedule, and are sometimes infrequent, harder to realize when a problem exists.
  • I don't use zone motion controllers for my lighting automations, I made my own rules.

Zone Controller is configured as follows:

  • Motion Aggregation
  • 30 minute activity timeout
  • A LOT of motion sensors

Configuration Details for my Z-wave motion / lighting hub

  • Hub C-4
  • Platform: 2.1.4.130
  • Physical Devices: ~150 z-wave devices
  • RM: Approx 100 rules
  • Typically runs very quickly, and very predicable response times
  • Versions: Zone Motion Controllers: 2.0.4 Motion Zone: 2.2.8

When I didn't received notification of my house auto-arming, I reviewed the websocket logs and found the following:

  • No motion on any sensors for 88 minutes => zone controller stays Active
  • No motion on any sensors for 279 minutes => zone controller stays Active
  • No motion on any sensors for 114 minutes => zone controller stays Active

All Hubitat logs and events are captured in a SQL server, if anyone would like a look at them to help debug this.




I had 3 of my Iris Zigbee motion stay stuck in the Active mode. What I did was take out the battery. All was good after that.

I have had a few get stuck. I know that GIANT table is not easy to read (too big) But several times during night, there were MANY hours of no sensor activity, and the Zone Controller stayed active.
Took a long time to track all this down, hoping someone can assist in getting to the bottom of this.

To be completely honest with you, I think you are not getting responses because you are providing WAY to much information. Most users on the forum do their best to assist others but they have limited time to assist. I have seen a few of your posts and tldr definitely applies (at least for me). We appreciate details to the issue but they need to be presented in a short and sweet manner for easy ingestion. Save the big data till later possibly if more details are requested.

P.S. most user can't read SQL and I don't believe it necessary to help resolve your problem.

Good luck. I hope someone is able to assist.

Stephan

I know exactly what you are saying.

but when I have posted a quick "Need help" I was told there is no detail, I can't help you.
Too little, too much?? Hoping that someone has found a solution to this problem. Maybe one of the staff will see there is a problem and look into it.

Also trying to be thorough, and demonstrate this is not contrived data.

Thanks Stephan.

We need details but they need to be easily ingested. Try to find a way to lay out the issue in bullet points and add a few small screenshots to show time stamps etc. I can tell you (and I'm speaking for myself only) I would never read what you have posted above until AFTER I completely understood the problem. I only reopened this thread because someone else replied and I was curious to know what they thought. Just my 2cents...hopefully I'm wrong and someone takes the time to read through and assist.

No problem.

It's not clear from your screenshots or descriptions, but you have a lot of motion sensors selected. Are you sure none are stuck as "active" for any reason (defective sensor, dead battery, etc.)? I don't know exactly what logic Zone Motion Controller uses but it likely checks the state in the entire collection of sensors here any time one goes inactive, so even with no activity per se, the virtual sensor could get stuck active because of that. Checking each device page is probably the best way to tell.

I agree with @bertabcd1234. The only way to confirm that a stuck sensor isn't the cause is to verify on the device page of each device (painful..I know). I would set a low timeout temporarily for testing purposes. This way you dont have to wait for long to verify that the zone updates correctly.

Another recommendation would be to split up your huge zone into multiple smaller ones. Not only would it give you more granular info into Motion of your home, but it would also make troubleshooting much easier.

I have multiple small zones and they have been working without fail for more than a year.

I've been using zmc, well since back in the day when I wrote it, 3 years or more anyway, if the zone isn't going inactive then there is a sensor stuck active...
The zone count down timer starts when the last sensor in the zone goes inactive.
A motion active event within the timeout window cancels the timer entirely.
I've had a zone stick active a few times when the sensor battery goes flat and I haven't replaced it in time.
Most of my zones have three sensors in them.

I have carefully reviewed all dashboards, events, logs, and reports. They are accurate. All of sensors sensors are off. Battery levels are 95% and above on all sensors. No sensors are stuck, and the zone controller stays active.

Previously, (last November), I used Zone controllers per room, with a small number of sensors each. I experienced a lot of similar problems, and switched to rule machine. Since then all of the room lighting has worked correctly. I didn't know Hubitat enough at that time to track down these problems.
Now that all activity is recorded to a SQL database it is pretty easy to see when devices trigger active / inactive. This zone controller should be off.

Any other ways possible reasons a ZC could get stuck active?

I have already tried rebuilding zone controller children in the past and the problem re-appeared. I removed all ZC children, and parent app and re-installed, problem continues. (Granted this was 3 to 4 major releases ago)

Example report shown below.

Motion Sensor Name Hours at current state State Time
Motion Sensor - 2nd Master Dome 1 inactive 2019-09-20 08:28:58.470
Motion Sensor - Basement Entry Dome I 1 inactive 2019-09-20 08:32:38.050
Motion Sensor - Basement Entry Dome II 1 inactive 2019-09-20 08:32:26.950
Motion Sensor - Dog Detector 1 inactive 2019-09-20 08:29:49.210
Motion Sensor - EDS Lab Desk 28 inactive 2019-09-19 05:21:07.587
Motion Sensor - EDS Laboratory Door 6 inactive 2019-09-20 03:22:18.227
Motion Sensor - Front Door Entryway Dome 1 inactive 2019-09-20 08:32:23.500
Motion Sensor - Front Entryway Atop Stair Dome 1 inactive 2019-09-20 08:32:18.397
Motion Sensor - Front Entryway Railing 1 inactive 2019-09-20 08:32:37.993
Motion Sensor - Master Bathroom Shower Dome 3 inactive 2019-09-20 06:02:35.630
Motion Sensor - Master Bathroom Toilet 2 inactive 2019-09-20 07:01:53.110
Motion Sensor - Oliver Twist Bar Bar Top 1 inactive 2019-09-20 09:02:12.103
Motion Sensor - Oliver Twist Bar TV 12 inactive 2019-09-19 21:57:03.623
Motion Sensor - Spa Door 28 inactive 2019-09-19 05:21:10.333
Motion Sensor - Spa Tub 41 inactive 2019-09-18 16:54:44.250
Motion Sensor - Theater 1 12 inactive 2019-09-19 21:57:01.363
Motion Sensor - Theater 2 12 inactive 2019-09-19 21:56:35.833
Motion Sensor AV 37 inactive 2019-09-18 20:24:12.500
Motion Sensor Garage 0 inactive 2019-09-15 06:06:18.413
Motion Sensor Gym Window 12 inactive 2019-09-19 21:57:01.380
Motion sensor Kitchen GE 1 inactive 2019-09-20 08:30:52.993
Motion Sensor Kitchen Lights Dome 1 inactive 2019-09-20 08:30:07.093
Motion Sensor Kitchen Multi 1 inactive 2019-09-20 08:30:47.390
Motion Sensor Kitchen Wall Dome 1 inactive 2019-09-20 08:31:36.850
Motion Sensor -Master Bathroom Entry 0 inactive 2019-09-20 09:01:33.090
Motion Sensor Master Bathroom Mirror 2 inactive 2019-09-20 07:01:56.467
Motion Sensor Master Closet 3 inactive 2019-09-20 06:46:28.123
Motion Sensor -Oliver Twist Bar Fireplace 12 inactive 2019-09-19 21:57:03.563
Motion Sensor Oliver Twist Bar Wall 1 inactive 2019-09-20 08:32:24.437
Motion Sensor Utility Room 16 inactive 2019-09-19 17:35:56.457

I've been using Zone Controllers since the app was released. The only time I have seen the zone stuck was when one of my Iris motion sensor got stuck in active/notActive....of course my zones are MUCH smaller (2 or 3 sensors per zone). I would recommend again that you pause any automations temporarily and set your zone inactive timeout to a few seconds so you can easily test multiple times in a short time period. Also look at your HE logs as all your sensors go inactive and see if Zone Controller shows any logs. Trying to view the problem in real time might help with a solution.

Edit - I will also create a "whole house" zone on my hub and see if I can replicate your problem. It may take a while since I have active kids in the house :rofl:

1 Like

My initial test with 12 motion sensors with a 5second timeout worked as designed (luckily the kids were sitting quietly have a snack).

@matt.klueppel how consistent is this problem...does it work sometimes, or is your zone constantly stuck in an active state?
I moved over a few sensors from my dev hub to bump the number closer to 20 sensors and so far so good. I will increase my timeout once my wife leaves the house with the kids later today.

In my case it typically works for a day or two, and then it hangs. Next time I catch it stuck I will immediately check the dashboard, and then each sensor's device page as well.

Lol...I figured it would be intermittent...love troubleshooting these types of issues/S.

I'm going to setup 2 rules, both with silent notifications. 1. Subscribe to all motion sensors and notify when all go inactive.
2. Subscribe to WholeHouse motion zone to notify when inactive.

They both should come in together. If I receive one without the other, I know something's up.

Here are my rules:

And the notifications:

I'll update on anything strange throughout the week.

1 Like

@stephack that was the exact test that I used to find this problem. Now I see it happen often. I have node Red send me Pushover notification now when I happens.

1 Like

Thank you !

@matt.klueppel, my test rules have worked perfectly for the past few days. I will leave them as is for a couple more days.