Can’t tell for sure but I’d guess you didn’t properly configure the whitelist as is needed for executeCommand().
People, please, again: don’t post any of your issues in this thread unless you have identified them to be specific to 3.1 and a generic problem to potentially affect everybody, i.e. not caused by your config or rules. Open your own thread, please.
Hi all! in my case I had to rollback to 3.1.0 M5 again since after updating (done the upgrade and then after it failed I did a complete install from start) OH didn’t show any of my things.
I’m using a things file. The file was the exact same used in M5, in fact after the rollback I used the same file.
The only “customizations” I’m using is that I use the Sony TV binding, but I don’t think that it is the issue since if it doesn’t work it just doesn’t work but OH will work anyway (happened before). I also use a script for Tuya lamps.
Saddly I cannot upload the log because I had to rollback and didn’t back it up but this error was shown (it was larger, this is just the beginning that I rescued from my google search history)
I found another issue. I needed to add/download the additional add-ons which are not in the official addon repo again into the addon folder. Otherwise they won’t recognized. In the milestone builds this was not an issue.
I cannot find the threads here in the forum right now, but afaik using startup text (DSL) rules should be avoided due to different issues that can come up. examples are timing or things like I am experiencing where builtin libraries are not loaded when the rule is executed (I had to introduce a sleep so that logInfo is available).
Another example: system started did work for me on OH 3.0.2…
Florian, did you find a solution ? I get the same issue with OH 3.1
I searched all fora for openhab to find a solution, but nothing seems to work. The remark that we have to whitelist isnt explained either, the key question is which classes do exist and if needed to whitelist, how to do that.
Script execution of rule with UID ‘e475b81b79’ failed: org.graalvm.polyglot.PolyglotException: TypeError: Access to host class org.openhab.core. is not allowed or does not exist
It’s not so much “should be avoided” as “limitations should be understood”. And yes, there can be timing issues in relation to other system services also starting up.
There’s no problem with self contained tasks like setting up some variables, or starting a timer for later actions.
As you figure it out I’m certain contributions to the docs would be most welcome.
Most of those issues were fixed in OH 3. OH 3 introduced startup levels which makes it possible to delay the execution of startup rules until the rest of OH is ready. However the way that system started rule triggers changed. In OH 2 when you reload a .rules file it will trigger the system started rules. That is not longer the case. Instead system started rules only run when the system started. If OH is already up and running and you load a .rules file, the system started rules will not trigger again because the system has already started.
There was an issue to add a new rule loaded trigger but I don’t know the status of that.