openhab-scripters / openhab-helper-libraries

Scripts and modules for use with openHAB
Eclipse Public License 1.0
88 stars 68 forks source link

fix JythonTransform #353

Closed lordjaxom closed 3 years ago

lordjaxom commented 3 years ago

a) changed loading order of TransformationService since in (at least) OpenHAB 2.5.7 both org.openhab.core.transform.TransformationService and org.eclipse.smarthome.core.transform.TransformationService are available but the former is unused and isn't picked up by the component system

b) changed transform parameter "pathname" to "function" as in TransformationService and build "pathname" from config path + transform + function (shamelessly copied from AbstractFileTransformationService#getSourcePath)

5iver commented 3 years ago

I had put a lot of effort into getting this working, including the changes you have, but it still did not function. It was available as an OSGi service, but did not show as a TransformationService. I've moved the script to Examples (#367) and have been working on a Java version of a Jython TransformationService. It looks like this will need to be included in the JythonScriptEngineFactory add-on, but I'm still trying to split it out for people who stay with a manual installation.