GOSUB/Call

Has adding the ability to create subroutines in a rule that can be called ever been considered? I realize I can create routines via a separate rule that can be run from a rule, but it annoys my programming skills to create basically a global subroutine that is only needed in one rule. I’d rather have it in the same rule. I’m probably just being anal and overthinking, but I’ve been trying to combine my many rules into one per room/light set and I’m seeing a use for this capability.

Part of my learning Rule Machine was discovering I was not able to do things with sub routines, or arrays, or build other data structures. But once I figured out how to use what is built into Rule Machine, I found I could do all I needed to do. Having said that. Have a try at Groovy (java like) for your advanced needs. Its what they are building Apps and drivers with.

No doubt rule machine can do pretty much everything I need, but I could see some cleaner rules with less redundancy that requires extra time to modify. I suppose once I get this consolidation done and stop having fun with rules and new stuff, I'll be just fine.

That is why I moved to writing all my automation logic into custom apps and virtual drivers. I used to use Webcore, which is much better than Rule Machine for the data structures available, and the for ability to call other pistons with parameters like a method or subroutine. What I couldn't do is call a piston and have it return a value to the calling piston. So I moved on to Groovy coding where I can just call a method in my app or driver with parameters, and get a return value.