OH3 js rules gone

Today I have got my hands on OH3 (m1 and latest snapshot). I noticed the next generation rule engine is installed out of the box and I can create rules via the new Webui, great!
I have two DSL rules stored on the file system which are also visible in the UI, but I miss all my jsr223 (Javascript) rules stored on the file system.
Do I have to migrate those somehow manually or is this a bug?

Did you try restarting openHAB after the first startup? I fixed this bug and it is available in the OH3 snapshot build:

Tried right now with latest snapshot docker image without success. Still only DSL rules are shown to me. From the logs I only see errors related to Influxdb (data type) and mapdb (serialization), which seem to be known looking at other threads.

I think I ran into your issue too while testing some Groovy rules yesterday. You can probably get your rules loaded by installing an additional feature on the Console using:

feature:install openhab-core-automation-module-script-rulesupport

So we need to add that feature by default or it will not load JS rules from files. :slight_smile:

There’s now a PR to fix this:

That did the trick. Now I just need to change the namespaces…
java.lang.ClassNotFoundException: org.eclipse.smarthome.model.script.actions.ScriptExecution
I guess it just replacing “eclipse” by “openhab”?

1 Like


Usually all you have to do is replace “org.eclipse.smarthome” with “org.openhab.core”
If that results in “org.openhab.core.core” you need to remove one “.core”.

You can also find these classes in the JavaDocs: