I am trying to use my 2.x rules and the javascript snippets that I had developed. Very probably this is explained somewhere, as I am for sure not the first one having these problems, but I did not find the instructions.
I have two problems for now:
- .rules: triggeringItem is not passed to the rule anymore, the variable is zero. Can I replace that with another item?
- .js: All my javascript files start with the following lines:
- load(Java.type(“java.lang.System”).getenv(“OPENHAB_CONF”)+’/automation/jsr223/jslib/JSRule.js’);
- var ThingUID = Java.type(“org.eclipse.smarthome.core.thing.ThingUID”);
These not work anymore. I understand that the second line should have the new namespace org.openhab.core.thing.ThingUID or something like that, but that doesn’t work either.
I would be very helpful if someone could point me to the instructions that I have missed.