You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on May 17, 2021. It is now read-only.
Since openHAB 2.x overJSR223 for example javascript nashorn we could access these classes and use it for scripting:
org.eclipse.smarthome.automation.core.util.RuleBuilder
org.eclipse.smarthome.model.persistence.extensions.PersistenceExtensions
org.eclipse.smarthome.automation.handler.TriggerHandler
...
Since openHAB 2.5 access to these classes is broken. JSR223 is unusable.
Current I have tested access only with javascript language, but suspect the other script languages are in the same situation?!
Possible Solution
Probably I overlooked something. I don't assign any announcement or change to this serious behavioral change. I can't yet categorize whether it's an oversight, bug, or a architectural measure. I would very much like to learn about possible solutions! ;-)
Steps to Reproduce (for bugs)
Install openHAB 2.5 nightly and run a script, calling any of these 3 classes like in JavaScript:
var RuleBuilder = Java.type("org.eclipse.smarthome.automation.core.util.RuleBuilder");
Since openHAB 2.5 access to these classes is broken. JSR223 is unusable.
Current I have tested access only with javascript language, but suspect the other script languages are in the same situation?!
Some classes have been moved from org.eclipse.smarthome.automation to org.openhab.core.automation. Using the raw API to create rules with JSR223 is working. But there are some org.eclipse.smarthome.core packages that have not been renamed, and I haven't found a way to access them yet.
After testing, this is the only one that worked for me...
Expected Behavior and Current Behavior
Since openHAB 2.x overJSR223 for example javascript nashorn we could access these classes and use it for scripting:
org.eclipse.smarthome.automation.core.util.RuleBuilder
org.eclipse.smarthome.model.persistence.extensions.PersistenceExtensions
org.eclipse.smarthome.automation.handler.TriggerHandler
...
Since openHAB 2.5 access to these classes is broken. JSR223 is unusable.
Current I have tested access only with javascript language, but suspect the other script languages are in the same situation?!
Possible Solution
Probably I overlooked something. I don't assign any announcement or change to this serious behavioral change. I can't yet categorize whether it's an oversight, bug, or a architectural measure. I would very much like to learn about possible solutions! ;-)
Steps to Reproduce (for bugs)
Install openHAB 2.5 nightly and run a script, calling any of these 3 classes like in JavaScript:
var RuleBuilder = Java.type("org.eclipse.smarthome.automation.core.util.RuleBuilder");
RuleBuilder is currently indispensable, and we don't have an alternative.
RuleBuilder is https://github.com/lewie/openhab2-javascript/blob/master/jslib/JSRule.js#L119
The text was updated successfully, but these errors were encountered: