How to check for broken rules?

Hi guys and gals. I am running a C-7 hub running platform 2.4.4.146

I was trying to figure out how to check for broken rules. It is probably something simple but for the life of me I can not find it. I stumbled across it a month or so ago but I can not remember where it was.

Thanks in advance and God bless all of you.

One more thing, I am using the apps:

Basic button controllers
Basic rules
Devices health status
HPM
Hub dashboards
HSM
Better laundry monitor
Motion and mode lighting apps
Notifications
Zigbee map 3.0.4
Mode manager

I think that's it.


Open Rule Machine to find this button. As for the other apps, AFAIK no such utility, sorry.

Lol. I do not have rule machine installed. I do have basic rules installed and I can't find it there.

It is not a feature of Basic Rules. That's why you don't see it there.

1 Like

That's too bad. I believe it should be a settings option to check for all broken apps, not just in rule machine. There are many apps that would benefit from this option, not just on rule machine. Most of them are built in apps I installed.

That's just my two cents; maybe it is worth something to look into.

2 Likes

I'm going to try installing rule machine to see if it will check all apps or just apps in the rule machine app. I will let you know how that goes.

Ok, I did that and either I have no broken apps or the rule machine app can not check for all broken apps.

If anyone knows the answer to that, please share.

Thanks

Rule Machine can only check for broken rules that were created in rule machine.

It can’t check other apps.

3 Likes

Thanks for the help.

I do wish habitat support could add that feature to all built in apps so we know in each app how many rules or apps are having errors and not being able to search for them manually. As it stands now, we have no idea there is a problem since we are unable to check and repair

I hope this makes sense.

@ hubitat support

2 Likes

Easiest way to check for issues with an app is to look at the logs for that particular app.

4 Likes

Oh, I have looked at the logs, and tell me nothing but the chit chat about things like power reporting but nothing to look for broken rules.

Unless anyone can find a way to do this, I am probably going to have to live with it unless I get lucky.

Why would @hubitat not put this option on all built in apps so we can catch problems before they get out of hand?

If I knew how to wright and xo.pile apps I would not be asking about this problem.

Well, I guess it is what it is, only one app can check for broken rules (in the rule matching app) and all the other built in apps are out of luck so to speak. No wonder there are others out there trying to something like this.

Well, good night all. Talk again later today.

I admit I'm struggling to understand the real need for this... When I build a new rule in any app, I test it and then monitor it for a while to ensure it's behaving as I intended (and fix whatever needs fixing along the way).

When troubleshooting a rule (in any app), all of the corresponding logs are key to help nail down the issue. Then I tweak the rule, rinse, repeat until the rule works as desired.

I acknowledge it's possible that a system update could result in a breaking change to existing rules (either inadvertently or intentionally), but I thinks that's rare... In that case, I'd come to the community here to get more info about the change and then I'd go fix the affected rule(s) as necessary.

I myself am leery of that "find broken rules" option in RM... I recall Bruce rather begrudgingly implementing it, but I don't remember the surrounding circumstances at that time and I don't think it's been documented what that feature is actually checking for.

I suspect it's not checking nearly as much as folks may think it is, so I don't use that feature -- for me, it's not helpful unless I know what it's doing.

6 Likes

Logs have a lot of options to filter by device and app.

So if you can learn to work with log filters, that can help focus on log events that you’re interested in seeing.

I think you may be making assumptions about what exactly this feature in rule machine does.

I can’t claim to know exactly how it works, but I assume it’s checking for “broken” rules in a very specific context that means something for rule machine, but simply doesn’t apply to how the other built-in apps work.

It would be great if the hub could automagically tell us all sorts of info about devices and/or automations, and proactively to stay ahead of problems.

Maybe someday a generative AI bot will be able to monitor the hub logs for us.

4 Likes

Maybe we should back up a bit: what does a "broken rule" mean to you? In Rule Machine, it is a specific thing that will show up in the UI sometimes when editing actions (usually because you removed a device without heeding the warning to remove it from apps first). Basic Rule doesn't do this, hence the question.

9 Likes

I seem to recall broken rules I had not logging at all because - well. the rule was broken.
Check for broken rules seems logical to be a system task, not an app task specific. I like this idea.

2 Likes

Presumably that is why someone requested that a feature be added to allow for such a check. And so it was added to Rule Machine.

But it checks for an app-specific disruption in the user’s UI experience, as Robert noted:

i comnmented as a previous poster suggested 'just check the logs'.

1 Like

Thanks everyone. It seems the logs is the way to go then.

One last question. As @jshimota suggested, will broken rules show up in the logs when the rule is broken? Would that show up as an error in the logs?

I am just trying to understand this platform a little better.

The reason I was looking into this was because the day before yesterday we had a series of blackouts during a storm and many of my room lighting apps stopped working. It took all day yesterday to repair the rules.

I had Zigbee buttons that stopped registering in the hub while watching the status of each one. I also had 5 or 6 motion sensors that stopped working.

With the buttons and sensors not talking to the zigbee radio, that meant my power plugs and sengeld bulbs to stop responding even from the devices own setup page.

I tried to use the repair apps option, and it did not do anything. On some of the bulbs, I had to actually re-pair them to the hub before I could even get them change states. Same with the power plugs.

The power switches mounted in my fixtures did connect back to the hub on their own, so those room were better at behaving as expected. ( I could still see and control them from the home screen in the hub.

It also took hours of re-pairing to get the battery motion sensors and battery push buttons to finally re-pair and start working.

It was a pain that many of the battery operated devices (buttons and motion sensors) and a few mains devices (sengeld bulbs and some Third Reality power plugs) had to be re-paired and in some cases (for battery devices) had to even be deleted and then re-paired from scratch and then repaired the apps from scratch before they would start working again.

So I guess I just have to watch the logs, if in fact the logs will show as errors.

Everything does seem to be working now that I went through all of that.

As a side note, my hub never lost power during the storm itself because of the backup power supply it is connected to, but the apps and devices just went squirrely.

Thanks everyone for the info and suggestions. I will keep an eye on it for the next few days to see how it behaves.

It sounds like the problem wasn't with your rules, but with devices no longer responding.

As a suggestion, there's a user app called Device Activity Check that's available through Hubitat Package Monitor. It can be used to determine if devices are dropping off. The thread for this app is here: [RELEASE] Device Activity Check

6 Likes