5iver
(Scott Rushworth)
December 29, 2019, 6:44pm
2
This was previously reported. There is definitely something wrong with the Groovy’s default script scope. I have an idea of what is happening, but I have not gotten back to this.
I just updated from 2.4 to 2.5#1535. I now have the following errors in the log for my groovy rules:
Script3.groovy: 142: unable to resolve class SimpleRule
Script3.groovy: 146: unable to resolve class Action
I have checked if I have to adapt something due to the reintegration of ESH, but could not find anything. Is this a regression or have I overlooked something?
There is also this Groovy issue…
I have started to convert my rules to groovy. The rule itself works as long as the system is already up and running. But if I restart openHAB, I get
MissingPropertyException: No such property: itemRegistry
When I then touch the script file, it parses correctly. It looks like the scripting engine is not completely initialized when the rule is loaded. Is this a known problem, am I doing something wrong, or should I create an Issue?
Edit: just for reference, here is my rule file:
itemRegistry…
Jython is a much better choice for scripted automation.