Curious Thought about RM4

Just a curious question about RM4. I've learned a few things over the weeks and have been successful in recreating most of my rules in RM4. I've been reading the forums and learning as others post, and as RM becomes more refined and robust, it makes me wonder if there is an etiquette that should be followed. That app that shall not be named basically struggled because it was running all the time. Bogging things down. Using resources. Is there something that should be avoided in RM as to not recreate the issues that were had by all?. Sometimes I wonder if I will cause issue with rules I've written because sometimes we take time to figure something out, but it may not be the best way, but the only way you can see the logic and cause great but terrible things to take place. I mean, has anyone created something that's shut things down?

2 Likes

The first thing I know is that with any event driven system polling should be avoided. Event comes in, decision(s) made, action(s) taken. The hardest part is that our environment can't be easily fit into a simple Boolean structure and complex conditions come into play. At what point should complex conditions become a burden on the system?

Yes it's hard to give absolute answers to your type of question because everyone's world is different. My take today with Hubitat is if the rule in rule machine has complex calculations, variables, and decisions that maybe it's a candidate for a app vs a rule machine rule. I haven't reached that level yet but I did on SmartThings and it's out of the box implementation. But when converting to Hubitat I found that the developers of Rule Machine built conditions and actions that were lacking in the other platform, that remediated my need to have long and deep nested programmatic type executions.

Enjoy your journey with RM4 ad Hubitat.

Interesting in what you say. Do I understand that a custom app could be faster execution than a RM4? Assuming a complex operation.

It is possible depending on the implementation methodology. In a design language like Rule Machine where you abstract the events, conditions, actions and then have to "convert" them into a common execution pattern, it can and does in some cases create overhead. I have to do this at work with business rules and decision modeling. There is a diminishing return when the decisions tables become un-maintainable or expand to the point where you end up with contradictions. In these cases we have to write custom application for efficiency.

With the Hubitat though, both custom applications and Rule Machines share the same resources, CPU, Memory, Storage, and I/O. Moving to an application sometimes is like rearranging the deck chairs on the Titanic it's not going to resolve in the end. But generally building a dedicated application will introduce more efficiencies.

1 Like

I was chatting with some friends and everyone fell in love with webcore. We ran everything in webcore. Even the small stuff. Maybe that's where a weakness is? Putting all of your eggs in one basket? If something only warrants a simple rule, then it would not make sense to put it into something that handles small commands. Like simple lighting. Things aren't together and troubleshooting becomes a task, but It just keeps me curious if things need to be more diverse to keep balance in the hub. I am an overthinker, though.
As an example, this evening, my rules are a bit slow. One that I admit I do expect immediate hub response to doors opening, etc. That's not happening today. And up until yesterday, I've spent my time converting to RM4 with some stacked rules. Ping - theres the can of worms. Did I open one? Or is just an anomaly? The rule in question is in simple lighting. A simple rule that turns on an overhead light whenever I open the pantry door. Well, didn't fire tonight.

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