I'm not sure what happened, but my rule doesn't appear to work anymore. This rule was created years ago, never touched, and I never had trouble with it. But it's not an often used rule, so I'm not sure when it broke. It could be many months ago.
It looks to me like the Private Boolean isn't being set. When I click Run Actions, I'm expecting the Private Boolean is False(T) [True] line to toggle, but it doesn't. The If else structure ensures that it always toggles. Is there another area in the UI for me to check and manually toggle the rule's Private Boolean? It's been years and I don't remember if there was a way to do it.
Refresh the page. It's not a dynamic page.
Thanks. I just tried this and refreshed the page after each click of Run Actions and confirmed that there is no change to the value of Private Boolean.
I don't want to recreate the rule in the modern Rule Machine... But if I do, can rules in Rule Machine reference rules in Rule Machine Legacy and vice versa? I really don't want to recreate all of my rules. These are rules I haven't touched in many years.
Please export that rule, and email me the downloaded file.
1 Like
Done. BTW, I had no idea exporting & importing capabilities existed in Rule Machine. This would've saved me so much time many, many years ago!
I don't seem to have the ability to create new rules in Rule Machine Legacy, so I created a test rule in Rule Machine with the if-else statement to toggle it's own Private Boolean and it works as expected. I can also see Private Boolean in the Local Variables box, whereas I can't see Private Boolean anywhere (except in the actions itself) in Rule Machine Legacy.
Maybe I can use the clone feature to create a new rule in Rule Machine Legacy to test this there. I want to test if something structurally changed that broke my once-working rule.

Just did the clone trick to create a new rule in Rule Machine Legacy and this works as expected:

Hmm.... More investigation needed.
When I clone the original rule, and re-set the the boolean setting to point to itself rather than the original rule, it still doesn't work, so it's not that specific instance of that rule that is broken.
I then used my simple test rule to set the original rule's Private Boolean and it works. I'm able to toggle the original rule's Private Boolean using another rule.
Hmm.. Even more investigation needed.
I had a hunch maybe something changed and broke the way Rule Machine Legacy handles nested If statements, but nope.. This works too:

Hmm....
So can you export a rule from RM Legacy and then import into RM?
Hey Bruce, is there any way to part accomplish this, or is it a rule re-write? Just out of curiosity rather than necessity 
This one rule isn't too difficult to re-recreate in Rule Machine, but I'm curious why it no longer works. That and this rule interacts with other rules and I kind of want to avoid Legacy-Non-Legacy crossing. I would want to re-create/migrate all of them at once and I just don't have a big block of time to dedicate to it yet. I'd like to put it off as long as possible, actually.
How long does it take to create a rule? What I've found is that people will waste more time fussing with things than it takes to just do it.
Look, Legacy RM has not been touched in years. I suggest not putting any more energy into diagnosing it, and just re-write the rule.
3 Likes
I think you're right, but it's not one rule. This rule is triggered by another and in turn triggers others. I played with it and see Rule Machine rules can reference Rule Machine Legacy rules, but not vice versa, so I will have to re-create some rules, but not all (at least initially). I will suck it up and do it as it seems I have no choice.
Have you tried re-creating that one rule?
I have discovered the root cause! In re-creating the rule in the new RM, I found the new rule also doesn't work which led me to find the culprit. It's getting hung up on my Custom Action line used to call a custom command, setDefaultLED()
, defined in the devices' drivers. However, one of the three devices is inadvertently running the official Inovelli driver (which doesn't have this custom function defined) instead of the one I customized. I can turn on logging and see the error in the log file. Should've look there first! Doh!
Thanks for the support and very sorry about wasting your time!
2 Likes
I'm glad you found it! Logs are usually your friend, but you've got to look at them to discover that. I seriously didn't think there was a previously undiscovered problem with Legacy RM, just because it's been around for so long. Not a waste of time...
4 Likes