Hard crash in Rule Machine 4.0 editor


This will probably require a support ticket, but I thought I'd post the problem here, first, just to see if I've stumbled upon a problem with a known circumvention or solution.

I went to edit a rule the other day as I'd transposed two actions. My idea was that I could insert a duplicate of the second action above the first, and then delete the original second. I selected the insert option, and received the pull-down list of existing action actions, but when I clicked on the action to insert before, I received this error:

Error: Cannot invoke method tokenize() on null object

I tried this a couple of time, getting the same result, but at a certain point, I got the error when I clicked on the body of actions to edit them, one step earlier in the process. Rebooting doesn't help. Shutting down, powering off and restarting doesn't help. This only appears to affect this one rule. Any ideas, anyone?

Thanks in advance,

I think the fix when this happens is to delete the rule and recreate. Just at a glance have you considered creating a Scene to set all those lights the way you want?

I use scenes by mode for the public areas of the house with Transitions on mode changes to gently change the temperature of lights to match each mode.

Two suggestions I try to follow:

  1. When editing a rule I try to make a clone first, so if I mess it up, I can undo.
  2. Before you delete the crashed rule, open it side by side with a new rule, so you can easily copy it. THEN delete the bad one.


Yeah, that was my fallback position, simply to recreate the rule, but I was hoping that there was an actual fix or that this is a known issue with a fix pending. As for scenes, I have a relatively odd situation for a home automation enthusiast, I think, and I don't believe that would suit me.



Yes, that makes perfect sense, but I don't think it would have helped in this case as I believe the problem trigger was already extant when I tried to insert an action above an existing action. I just tried copying the rule to see if the copy is editable, but the rule and the problem were both copied. So, then, if the problem was, indeed, extant in advance of the fateful edit attempt, a copy before the first edit the other day would likely already have been bad. So, a support ticket it is. I think I'll simply leave the rule alone, rename it to preserve the evidence, and recreate it from scratch.


Nothing that's going to make you happy unfortunately. When this happens it's a sign that you messed something up in the past when your were writing or editing the rule. If you have a back up you can try and restore it then delete the offending bit that is broken but honestly it's probably quicker to record what you had before and re write the rule. I have had it once or twice, most of the time it's when I have removed something from the rule without realising. I tend to check the rule over again and work out if it could be done quicker/ easier before I write the new one.

Yeah, I've seen that, myself, and assumed that was the issue, but in the past, I've simply been able to work through the process. But not this time. In any case, especially if it's a known problem, the ultimate cause should be fixed, which is why I'll save the bad copy and open a support ticket. Thanks!

1 Like

A little off topic question but related to your rule. Do all those motion rules actually run the first time they are triggered after being resumed? Mine never did and I had to add another step to run the rules. But maybe this has since been fixed.

1 Like

Yes, they all run just fine, even in that case. Jeff