Scripts: Blockly not clickable and other languages not showing

Hello,
I already have some experiences with OH and I wanted to extend the functionality in my home a little bit by using scripts. Unfortunately I was not able to create any script. I think it is something with the configuration on my system but I was not able to find any “switch” to activate blockly or the other scripting languages (currently I have installed Add-ons: automation-jsscripting).

If I click “Scripting” and “add” it looks like:
grafik
Nothing happens if I click on “Design with Blockly” and automation-jsscripting is not shown.

Any hints for my?

Many thanks in advance
Tom

  • Platform information:
    • Hardware: AMD/RAM: 8GB/500GB SSD

    • OS: Linux 4.19.0-8-amd64 #1 SMP Debian 4.19.98-1 (2020-01-26) x86_64 GNU/Linux

    • Java Runtime Environment:
      java version “16.0.2” 2021-07-20
      Java™ SE Runtime Environment (build 16.0.2+7-67)
      Java HotSpot™ 64-Bit Server VM (build 16.0.2+7-67, mixed mode, sharing)

    • openHAB version:3.1.0

First of all, a Script is just a special type of rule that doesn’t have any triggers of conditions and only a single Script Action. But it’s really just a rule.

So the question is what happens when you try to create a Script Action on a regular rule?

At a minimum you should see ECMAScript 51 and Rules DSL as options. Those just come with OH by default unless you’ve don’t something through the karaf console to remove them.

Do .rules files work?

Hello Rich,
thank you for your reply.
Also in the rules I cannot add any scripting. It shows:
grafik
If I click on “blocky” I get a text field with line numbers. If I add text and click save, it looks like that save is not working, if I leave the the editor it asks if I would like to exit without saving.

I created a file “test.rules” in the configuration folder and it is detected:
2021-11-08 18:09:12.700 [INFO ] [el.core.internal.ModelRepositoryImpl] - Loading model ‘test.rules’
But it looks like that it is not really processed because I expected at least a syntax error or something like this.
Kind regards
Tom

Not if the file is completely empty.

There is definitely something weird going on. It might be worth taking drastic actions.

Oh wait, Java 16? OH can only run on Java 11. From the installation docs

WARNING

Please note that versions of Java higher than 11 are not supported at the moment.

1 Like

Thank you soooooo much.
It is now working.
To be honest I read the advice in the documentation but thought it might work with the latest version as well. I installed Java 11 in parallel and selected this version as the default.

Again, thank you so much for the support