Has someone observed and solved the same problem.
A fresh install of openhabian and JS Scripting.
My text based js scripts in ‘OH-conf’/automation/js will not detected. I can’t see an entry in openhab.log after saving the rule. The rule is the simplest sceleton:
rules.JSRule({
name: "my test script",
description: "test ...",
triggers: [triggers.GenericCronTrigger("0/6 * * * * ? *")],
execute: (event) => {
console.log('this is a test !!!!!!!!!!')
}
});
I have installed openhabian and OH snapshot (openHAB 3.4.0, Build 3218). ECMA262-11 scripts created in UI are working fine.
btw: Changes at item-, thins-, sitemap- files are observed.
There were a couple of changes to the file watcher last week. Try this in the release candidate and if the problem persists, post to the 3.4 release thread.
@J-N-K
I am a little confused.
My intention is to use JSscripting. I have installed the JavaScript Scripting add-on. Do you mean to install this add-on from the marketplace.
I think the issue is there is a problem with the JS Scripting file watcher when the Nashorn language isn’t present. In Java 17, Nashorn is no longer included and needs to be installed separately. There is a Nashorn add-on on the marketplace.