Stuck Motion Detection Rule Machine Rule

I have 35 Philips Hue Motion Sensors that I use to automatically turn lights on and off in my house. Sometimes the sensors get stuck in a state, usually "active." I've given some thought on how to write a Rule Machine Rule that will detect these stuck devices so I can fix the issue, but my ideas seem ungainly. Before I "reinvent the wheel," has anyone done this, and, if so, can I get some tips on how to do this elegantly?

Considering that there is some amount of time that would indicate to you that a sensor is 'stuck', you could use a Notifier, Basic Rule or Rule Machine to send a notification. Just use a Stays time on the trigger event of motion active, with that amount of time.

Yes, I think a brute force method would be to write 35 rules and alert when active stays on for, say, an hour and inactive stays off for 1 day or more depending on the location. I just wasn't looking forward to writing so many highly duplicative rules.

One thought I had was to have one rule where I map each sensor to a bit and have historical bitmaps using system variables. For instance, when a sensor turns on I set the corresponding bit. At the end of the day I could report all the sensors that didn't turn on that day. I'd have another bitmap where I'd keep track of all inactive transitions for those that went active and report sensors that went on but not off. But this might get messy too because, without arrays, as I'd have 35 IF %device% = <> conditionals.

FYI, right now I just have a dashboard with all the sensors and I can look and see the ones stuck active. I have to walk the house to look for those that don't turn on. See below.

Anyway, I was just wondering if anyone dealt with this issue and if they had a slick solution.

I tried an EZ Dashboard for this, but the auto arrange feature really killed the usefulness:

Edit: add image of motion sensor debug dashboard.

@TheUsualSuspect Anything being yielded from investigating why they're getting stuck?

Only need a single app, one that notifies which sensor is ‘stuck’. You can put all 35 in one app.

I really don't know. I suspected that they might be going through some ZigBee repeaters (wired sockets) that had issues (also tended to get stuck), so I replaced the sockets. I also thought it might be a battery issue, and replaced a lot of the batteries with USB cords plugged into constant power. These two changes helped some I think, but some sensors still get stuck. It does tend to be the same sensors over and over again, so maybe I'll try switching a problem sensor with one that never had an issue and see if the problem follows the sensor.

1 Like

What make/model of sensor?

Philips Hue Model 9290012607