The refactored component is part of both channel-add and channel-edit, so I think yes that affects this as well.
It seems to not affect channel configuration. I have updated the issue with more information.
This question is actually not answered. I hope Iām not making a fuss if this only happens for me. Does anyone else see this problem?
I can confirm that I can see the same issue on the latest snapshot.
I think I can provide a fix soon, so please wait a bit.
I searched in this thread for jruby and didnāt see anything, sorry if I missed it
Upgrade OH3 to OH4 and everything seems fine except jruby rules throwing an error
==> /var/log/openhab/events.log <==
2023-03-11 15:38:31.449 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'OutsideLuxNum' changed from 3065.515869140625 to 3108.8778076171875
==> /var/log/openhab/openhab.log <==
2023-03-11 15:38:31.455 [ERROR] [internal.handler.ScriptActionHandler] - Script execution of rule with UID 'AmbientLightDimmer' failed: Error during evaluation of Ruby in org/jruby/RubyModule.java at line 4311: (NameError) uninitialized constant OutsideLuxNum
here is another
2023-03-11 15:38:32.401 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'Sun_Elevation' changed from 36.37246644373223 Ā° to 35.38033239923391 Ā°
==> /var/log/openhab/openhab.log <==
2023-03-11 15:38:32.413 [ERROR] [internal.handler.ScriptActionHandler] - Script execution of rule with UID 'SunAngle' failed: Error during evaluation of Ruby in <script> at line 1: (NameError) undefined local variable or method `logger' for main:Object
a restart of openHAB didnāt help
Do I need to update my gem or something?
Bit of a ruby noob
The 5.0 version of the jRuby helper library was announced last week and there is ongoing changes which have moved the library into the openHAB project now and have it be included in the add-on same as how the JS Scripting add-on and library works.
This seems like the helper library didnāt load at all.
There are two current issues on 4.0M1 (and snapshot up to build #3363 that Iāve tested)
- Thereās an important PR that didnāt get merged before M1 release. This PR sets the default gem and require, and it is useful (not critical) for new users. It doesnāt affect you if youāve already installed jrubyscripting addon previously. You wouldāve had to set the gem settings in the past, thus overriding the default value anyway.
- There is a current active bug (I think it lies in core) causing a race condition in the script file watcher, affecting the jrubyscripting addon. Iāve submitted a PR to fix it.
Because of this, Iād suggest going back to 3.4.2 or wait for an openhab-snapshot version once problem #2 above is fixed.
If I did so I have no idea what I sent them to or what they should be. So you are saying jruby is broken in OH4? with no work around?
On another note my Hue bridge had to be set to HTTP instead of HTTPS which I guess it defaulted itself to on upgrade
The settings are documented in the installation instructions for the relevant helper libraries:
For openhab-scripting 4.x and openhab-scripting 5.x.
Currently, yes the addon is broken. It loads intermittently due to the race condition. If it does load, it would work. Either version of the helper library should work. Iāve just discovered my PR to fix #2 above didnāt quite solve the problem. Still debugging it right now. Iāll let you know here once itās fixed.
@Andrew_Rowe please uninstall the built in jrubyscripting addon from OH4 and drop this jar into your addons folder: Release jrubyscripting-oh4.0-0.0.1: [lcn] Add shutter positioning/angle, operating hours counters, tunablā¦ Ā· jimtng/openhab-addons Ā· GitHub
Then if you still encounter the same error message, please open a separate topic to track it and tag me on it.
Is there already an option to upgrade using openHABian??
you can try to switch to snapshots. Let me know if that works.
I may not see the point. But as 4.0.0 M1 is released it would be enough to switch to testing releases to install the milestone, woudnāt it ?
But JSONPath Transformation is still available in OH4.x, right? Just JS (Java Script) is replaced.
I think, thatās what also @mstormi meant
If JSONPath Transformation is still available on OH4, I might give it a try.
Yes, JSONPATH is still available. The removal is due to the more generic Script Transformation Service. You can still use JS, but you have to change the call (i.e. set SCRIPT instead of JS, change extension to .script, set js option for the called Script)
SCRIPT can use any rule language which is supported by openHAB (as far as I know), so itās only a breaking change, but not a go-away.
Does anyone know why the SCRIPT transformation was designed to use .script? Is there a reason not to use myscript.js, myscript.rb, myscript.rules?
Yes. Because all transformations use the name of the transformation service as file extension.