[2.3.1.139 C7] Error setting Variable Color Bulb

I was trying to perform a "set color" in a new RM5.1 rule....

I selected "CustonColor" then tried to toggle the "Variable Color" and it refused to toggle on.

When I clicked into the "rgb" constant blank--the rule blew up with an "Unexpected Error" of "Error: String index out of range: 3".

I have spent about 2.5 hour editing this rule so far--now, I get that error every time I try to edit the "Run" actions in this rule. :frowning:

The log shows this:

Note: I can enter the rule far enough to 'see' the RM code. The "Set Color" line is not visible.

I was able to re-create the issue--by creating the following rule:

  1. The toggle will not toggle

  2. Type "55" in the RGB blank and press enter/exit that field. The rule blows up immediately.

(I know it's a bit risky--but I was able to export the corrupted rule, find and change the evil "55" to "#112233", save it, then the rule imported and I was able to delete that line and continue on with my editing).

@bravenel Any chance this could get on the list to be looked at for the next version?

There apparently isn't "error checking" for the RGB constant field to prevent an invalid value from making the entire RM App unable to be opened/edited.

And, the "variable RGB" toggle doesn't seem to work.

This is on RM5.1.

Thanks,

With respect to variable RGB, there was a typo in the code, fixed for next release. As for checking the string for validity, that too has been added. The string must be formatted #123456 or it will just set the color to #000000.

And, in the case of variable RGB, that must be a String variable, and it too must be formatted correctly, with the same validity test applied when the rule runs (but not when set up).

3 Likes