- Platform information:
- Hardware: armv7l, 2GB, 32GB sdcard
- OS: Linux openhabian 5.10.103-v7l
- Java Runtime Environment: OpenJDK Runtime Environment (build 11.0.18+10-post-Raspbian-1deb10u1)
- openHAB version: 3.4.2 Release
- Issue of the topic: I want to do changes on “Things” and therefore want to use a call like:
But I always get an error log when executing the rule like:
Script execution of rule with UID 'solar-5' failed: The name 'osgi' cannot be resolved to an item or type
I tried using: “import org.osgi.framework” in front of rule file. But no success
The same problem occurs with any other example code using “Java.type(…)” calls telling me Java not known.
Strange thing is, that in VS Code all the autocompletion stuff on these work beatiful, suggesting proper methods etc. But my rules do not know these
Thanks for helping me on a such a basic question!