Closed boc-tothefuture closed 3 years ago
Yes adding more docs is still TODO so it's good to have an issue for this (see https://github.com/openhab/openhab-addons/pull/8772#issuecomment-711142955). :+1:
def log = LoggerFactory.getLogger("jsr223.groovy") log:set TRACE jsr223 Hello world from Groovy is not logged, not does the engine appear to be loaded by the ScriptEngineManager.
To see logging, try instead:
log:set TRACE jsr223.groovy
I used it the same way in my Hello World example in https://github.com/openhab/openhab-addons/pull/8772#issue-505004457.
That didn't work.. I had to go into the user interface and install it that way. Does that do something different than a bundle:install ?
@boc-tothefuture the UI installs the feature. If you only install the bundle, dependencies are not installed (so it might work or not, depending on other installed features).
Issue is that I did an install, but not a bundle start.. 🤦
@wborn do you want to close this issue or leave it because more documentation is needed?
PR https://github.com/openhab/openhab-addons/pull/8772 added support for Groovy rules. However, it does not explain how to use this with file based rules.
Expectation: Groovy rules work the same as Python, JS, etc.
Actual: Rules do not appear to be processed (nor does the script engine appear to be loaded).
Steps:
mkdir -p conf/automation/jsr223/groovy/personal/
Hello world from Groovy is not logged, not does the engine appear to be loaded by the ScriptEngineManager.