Can not make test.groovy jsr322 example work

Hi,

I try start using the Groovy JSR233 implementation for my rule automation.
I picked Groovy as I am using it regularly on my day job.

Nevertheless I have not been able to make the test.groovy example work.

My setup:

  • New OpenHAB 3.1 openHABian installation
  • Groovy addon installed: Groovy Scripting - Automation | openHAB
  • /etc/openhab/automation/jsr223/groovy/core/test.groovy created as explained here: JSR223 Scripting | openHAB
  • I also tried /etc/openhab/automation/jsr223/test.groovy and the inbetween variations
  • I enabled DEBUG org.openhab.core.automation loggin

Now I see in the logs:
[DEBUG] [rt.internal.loader.ScriptFileWatcher] - Enqueued file:/etc/openhab/automation/jsr223/groovy/core/test.groovy
But that’s it.

I do not get the log output from the test.groovy neither I see anything happening after the file has been enqueued.
I guess something should happen after that :slight_smile:

It must be a very basic thing I miss here to make it work.

Any help is appreciated.

Greetings,
Maik

I started to work as expected after I rebooted the whole system :upside_down_face:

There’s not many Groovy info here, would be nice if you’d share your further experiences.

JĂĽrgen

There’s not many Groovy info here, would be nice if you’d share your further experiences.

BTW I’m also starting with OpenHAB in general and jsr223 groovy in particular, I just figured out how to create a “library” groovy file, posted here: Groovy scripts: how to import another groovy file? - #8 by ndru

1 Like

Just as a general information:
I actually stopped now using Groovy and instead switched back to standard rules usages.
There are much more resources and examples available for rules.
I also realized that my requirements are not as complex as I thought, therefore rules are just fine for me.