Getting Error when attempting to manage a Condition in Rule Machine

When trying to manage conditions for two of my rules (one is a copy of the other), I get the following error:

java.lang.NumberFormatException: For input string: "[-1]"

I tried to back-up and restore the hub to see if it would help, but it did not.

Is there anything else that I should try? Could there be corruption or a bug somewhere?

Sounds like something has broken the rule. I would try to recreate the rule from scratch and see if you get an error. There are too many things that can happen to a rule to break it, so I can't list them. Maybe just recreate a lite version of the rule.

I was hoping to avoid that...

I wish there was a way to write-out a rule instead of going through drop down after drop down! It takes so much time!

I agree. Especially when just starting out. Now would be the time to take a look at that rule and see if any of it could be moved to simple automation or motion lighting apps. It's always recommended to use those avenues first as rule machine can get very resource heavy. the K.I.S.S. method is the way to go here when ever possible. Perhaps if you post your rule, you can get some input on how to simplify it?

This won't necessarily help fix the rule, but what if you click on the settings cog icon next to the rule in the apps screen, that may give you some insight into what's going on. .

I suspect it is too complex to be setup as a simple automation rule... But that said, would love to get input! (It is a great way to improve!)

Here is the rule:

There's a lot of good information in there. Unfortunately, I don' t have the knowledge or experience to know what I should be looking for... yet...

I do see some -1 values in there, but not sure if that is what I should be looking for:

I can't claim to have had a plan on what to look for, was just hoping something may have stuck out, like the definition of your conditions...

Seeing that you have an echo in this rule which are you using echo skill or echo app?

It's actually "Echo Speaks". I have it running on another hub, and the devices are shared via Hub Connect.

I use it in a lot of my rules, to let the family know to close windows if it gets too warm outside, and when the AC turns on or off (again, to open/close windows).

It will also tell me when I am opening some windows that I need to keep an eye on the weather as there is a high probability of rain.

I suspect that if I know what to look for, something might very well stick out. Unfortunately, I don't... :frowning: Looking forward to the day I will though! :slight_smile:

It is really amazing the amount of knowledge that is gained by working through problems and setting up new rules, etc! There are always great folks in the community that have great insight! It is one of the things I really like about this platform!

1 Like

Yah .. should maybe get some input from @bravenel on this one. I fear you might have to recreate it, but probably best if he tells you that in case there's an easy fix. Like one click here and fixed. :thinking:

That would be awesome. He knows RM quite well! :smiley:

I'd say he does. :wink:

1 Like

I suspect it might be something to do with the variable,. Do you use them in any other rules? Also, have you applied any updates recently to the hub? There have been some updates to RM that may help with this...

Do you think that having the same variable name in two rules would be an issue?

Yes, quite a few. Didn't notice issues with them before though...

Unfortunately, I am on the latest version. (

I hadn't thought about that specifically, but may be worth changing the name in one of the rules.

Perhaps open one up and take a look. to see if you get the same issue

I guess that could go either way... Probably best for me not to speculate ..

Aside from that I'm out of ideas, sorry. Hopefully @bravenel can help you out

Good idea! I just did and can confirm it is not an issue in the other rule that had a local variable.

This is an odd issue, considering the rule seems to have no problems running... (Which is the important thing to me...)

1 Like

Perhaps it is the name then...

I deleted the copy and tried accessing the conditions in the first one, but no luck... I think that the name is ruled out. :frowning:

What specifically do you mean by this? Exactly what step caused the error?

Irrespective of the answer to that, you no doubt need to discard this rule. You'll waste more time trying to figure out what caused it (already have probably), than to redo the rule. Or, if this is a copy of another rule, make a new clone of the other rule.

Save/restore/reboot steps are very unlikely to repair an error such as this.