Iāve been working on flash rule for a Leviton DZPA1 switch module. The following rule results in the runtime error below. Not stating the rule is correct, just that the error results. (Rule operates without the repeat.)
(FW: 2.3.2.141)
Runtime error:
Also, formatting is a bit messed up when editing the repeat:
Try deleting the rule completely and starting from scratch. Make sure you aren't using the browser navigation or just leaving the page. Only use the navigation buttons in the page to leave (clicking 'done' until you're back at the main app page). I've caused some RM errors in the past by starting to create something (trigger, action, etc.) and navigating away without finishing it.
Both the issues that @Sebastien has indicated result from the same flaw with this rule:
There is no condition that stops the repeat.
Without fixing that issue, you will have multiple iterations of this rule run into each other - causing havoc; ultimately, this will slow your hub down to a crawl.
Notice buttons missing in the formatting image in original post. Using Firefox and if I zoom out, the buttons appear and formatting is correct:
Iāve rewritten the rule numerous times and experimented with while-repeat. Whenever the formatting was incorrect, the āCannot cast object '' with class 'java.lang.String' to class 'double' on line 8564ā error resulted. The following operates correctly ā not stating cause and effect, but something is amiss with the Firefox/HE/formatting:
When I first created the rule, I included while-repeat. It didnāt work whatsoever, so I removed the code to include what I thought was causing the problem for posting. If the rule had been looping, I think it would have done so after working the first iteration.
āCannot cast objectā is probably a bounds or instance error.
Regardless, my goal is to create a rule that will turn a switch on/off ("flash") when HSM is armed and a contact sensor is open before or opened after the arming. This rule accomplishes that (maybe thereās a better method):
This throws the same error as above. Only difference is a method to aggregate the contact sensors into a virtual switch using another rule. It should work, but it doesnātā¦
I just mocked up your rule. The only exception is that I'm not using HSM and it worked flawlessly. Have you tried swapping the HSM parts out for a virtual switch and testing?
Do you have logging enabled for this rule? If so, what action (or maybe trigger) happens right before or around the error? That may assist with troubleshooting. My guess is also re-entrant execution, but that's a guess without knowing more.